From d51625aba2793880b23b120cbdf7be8292475dd9 Mon Sep 17 00:00:00 2001 From: adk23333 <2633103794@qq.com> Date: Wed, 20 Dec 2023 04:53:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E5=85=A5casbin=E6=9D=83=E9=99=90?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 models.py diff --git a/models.py b/models.py new file mode 100644 index 0000000..cf8ceb2 --- /dev/null +++ b/models.py @@ -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)