引入casbin权限管理
This commit is contained in:
parent
8b921426eb
commit
d51625aba2
16
models.py
Normal file
16
models.py
Normal 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)
|
Loading…
Reference in New Issue
Block a user