增加权限列表
This commit is contained in:
parent
d896a195a7
commit
888efad38c
|
@ -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}
|
||||
|
Loading…
Reference in New Issue