roles.py 342 B

12345678910111213
  1. from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
  2. from app.models.database import BaseModel
  3. class Roles(BaseModel):
  4. __tablename__ = "roles"
  5. id = Column(Integer, primary_key=True, index=True)
  6. # 角色名称
  7. name = Column(String, nullable=False)
  8. # 角色编码
  9. code = Column(String, nullable=False)