project_user_relation.py 436 B

123456789101112131415
  1. from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
  2. from app.models.database import BaseModel
  3. class ProjectUserRelation(BaseModel):
  4. __tablename__ = "project_user_relation"
  5. id = Column(Integer, primary_key=True, index=True)
  6. # 用户id
  7. user_id = Column(Integer, nullable=False)
  8. # 项目id
  9. project_id = Column(Integer, nullable=False)
  10. # 角色id
  11. role_id = Column(Integer, nullable=False)