| | |
| | | return json |
| | | |
| | | |
| | | def to_dict(self): |
| | | json = { |
| | | 'roleId': self.id, |
| | | 'createTime': self.created_at.strftime('%Y-%m-%d %H:%M:%S'), |
| | | 'updateTime': self.updated_at.strftime('%Y-%m-%d %H:%M:%S'), |
| | | 'roleName': self.name, |
| | | 'remark': self.description, |
| | | 'iconCls': self.iconCls, |
| | | 'roleSort': self.seq, |
| | | 'status': self.status, |
| | | 'roleKey': self.roleKey, |
| | | 'dataScope': self.dataScope |
| | | } |
| | | return json |
| | | |
| | | class RoleData(BaseModel): |
| | | remark: Optional[str] = "" |
| | | roleName: str |
| | | roleKey: Optional[str] = "" |
| | | dataScope: Optional[int] = 0 |
| | | |
| | | |
| | | class RoleStatus(BaseModel): |
| | |
| | | remark: Optional[str] = "" |
| | | roleName: Optional[str] = "" |
| | | resources: Optional[list] = [] |
| | | roleKey: Optional[str] = "" |
| | | dataScope: Optional[int] = 0 |
| | | editType: int |