Add List model
This commit is contained in:
parent
5d1ac634ac
commit
9c90381a89
12
models/list.py
Normal file
12
models/list.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from sqlalchemy import Column, String, DateTime, func
|
||||||
|
from sqlalchemy.dialects.postgresql import UUID
|
||||||
|
from core.database import Base
|
||||||
|
|
||||||
|
class List(Base):
|
||||||
|
__tablename__ = "lists"
|
||||||
|
|
||||||
|
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||||
|
name = Column(String, nullable=False)
|
||||||
|
description = Column(String)
|
||||||
|
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