Add Fruit model
This commit is contained in:
parent
64848f2488
commit
825745c7aa
@ -6,6 +6,6 @@ import uuid
|
||||
class Fruit(Base):
|
||||
__tablename__ = "fruits"
|
||||
id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4()))
|
||||
name = Column(String, nullable=False, index=True)
|
||||
name = Column(String, unique=True, nullable=False, index=True)
|
||||
created_at = Column(DateTime, default=func.now())
|
||||
updated_at = Column(DateTime, default=func.now(), onupdate=func.now())
|
Loading…
x
Reference in New Issue
Block a user