引入casbin权限管理

This commit is contained in:
San Liy 2023-12-20 04:53:13 +08:00
parent 8b921426eb
commit d51625aba2

16
models.py Normal file
View File

@ -0,0 +1,16 @@
from tortoise import fields
from tortoise.models import Model
class User(Model):
id = fields.IntField(pk=True)
name = fields.CharField(max_length=60)
gusers = fields.ForeignKeyField('models.GiteaUser')
state = fields.CharField(max_length=20)
class GiteaUser(Model):
id = fields.IntField(pk=True)
name = fields.CharField(max_length=20)
ac_tk = fields.CharField(max_length=256)
rfs_tk = fields.CharField(max_length=256)