17 lines
454 B
Python
17 lines
454 B
Python
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)
|