casbinrule.py 542 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. from sqlalchemy import Column, Integer, String
  4. from db.base import Base
  5. class CasbinRule(Base):
  6. __tablename__ = "casbin_rule"
  7. id = Column(Integer, primary_key=True, index=True, autoincrement=True)
  8. ptype = Column(String(255))
  9. v0 = Column(String(255))
  10. v1 = Column(String(255))
  11. v2 = Column(String(255))
  12. v3 = Column(String(255))
  13. v4 = Column(String(255))
  14. v5 = Column(String(255))
  15. def __repr__(self):
  16. return f"<CasbinRule> {self.id}:'{str(self)}'"