generated from Luis/nextjs-python-web-template
georgs #23
@@ -1,6 +1,6 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import List, Optional
|
from typing import List
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ class EntityCreate(EntityBase):
|
|||||||
class Entity(EntityCreate):
|
class Entity(EntityCreate):
|
||||||
producers: List[Producer] = []
|
producers: List[Producer] = []
|
||||||
consumers: List[Consumer] = []
|
consumers: List[Consumer] = []
|
||||||
repository: Optional[Repository] = None
|
repository: List[Repository] = []
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
orm_mode = True
|
orm_mode = True
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class Entity(Base):
|
|||||||
## Relations ##
|
## Relations ##
|
||||||
producers = relationship("Producer", back_populates="entity")
|
producers = relationship("Producer", back_populates="entity")
|
||||||
consumers = relationship("Consumer", back_populates="entity")
|
consumers = relationship("Consumer", back_populates="entity")
|
||||||
repository = relationship("Repository", uselist=False, back_populates="entity")
|
repository = relationship("Repository", back_populates="entity")
|
||||||
|
|
||||||
|
|
||||||
class ProducerAbstract(Base):
|
class ProducerAbstract(Base):
|
||||||
|
|||||||
Reference in New Issue
Block a user