增加权限列表

This commit is contained in:
wcq 2023-02-08 17:03:25 +08:00
parent d896a195a7
commit 888efad38c
4 changed files with 16 additions and 0 deletions

0
Crud/AuthRuleCrud.py Normal file
View File

16
Model/AuthRuleModel.py Normal file
View File

@ -0,0 +1,16 @@
import uuid
from sqlalchemy import Column, String, Boolean, ForeignKey, Enum, Text, DateTime, func, Integer
from Utils.SqlAlchemyUtils import Base
class AuthRule(Base):
__tablename__ = "AUTH_RULE_TABLE"
id = Column(String(32), primary_key=True, comment="应用id")
name = Column(String(32), unique=True, comment="应用名称")
secret_key = Column(String(255), comment="验证密匙")
token_key = Column(String(255), comment="app随机token加密密匙", default=lambda: uuid.uuid4().hex)
def to_dict(self):
return {c.name: getattr(self, c.name) for c in self.__table__.columns}

0
Router/AuthRuleRouter.py Normal file
View File

View File