init
This commit is contained in:
17
backend/app/models/person.py
Normal file
17
backend/app/models/person.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from sqlalchemy import Column, String, Text, DateTime
|
||||
from sqlalchemy.sql import func
|
||||
|
||||
from app.database import Base
|
||||
|
||||
|
||||
class Person(Base):
|
||||
__tablename__ = "persons"
|
||||
|
||||
id = Column(String, primary_key=True)
|
||||
name = Column(String, nullable=False)
|
||||
nickname = Column(String, default="") # 文字稿中的昵称
|
||||
filename = Column(String, nullable=False)
|
||||
file_path = Column(String, nullable=False)
|
||||
photo_path = Column(String, default="")
|
||||
info = Column(Text, default="") # JSON
|
||||
uploaded_at = Column(DateTime, server_default=func.now())
|
||||
Reference in New Issue
Block a user