后端开发完成

This commit is contained in:
Your Name
2026-01-26 18:21:34 +08:00
parent 40d2f3f6ac
commit b3876bba89
64 changed files with 1736 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
from sqlalchemy import Column, Integer, String, DateTime
from sqlalchemy.sql import func
from app.database.database import Base
class User(Base):
"""用户模型"""
__tablename__ = "users"
id = Column(Integer, primary_key=True, index=True)
username = Column(String(50), unique=True, index=True, nullable=False)
password = Column(String(100), nullable=False)
department = Column(String(50), nullable=False)
role = Column(String(20), nullable=False) # admin, marketing, other
created_at = Column(DateTime(timezone=True), server_default=func.now())
updated_at = Column(DateTime(timezone=True), onupdate=func.now())