gitea_push2qq/orm.py

14 lines
326 B
Python
Raw Normal View History

2023-12-19 02:49:42 +08:00
from tortoise import Model, fields
class User(Model):
id = fields.IntField(pk=True)
name = fields.CharField(max_length=60)
state = fields.CharField(max_length=20)
class UserGroup(Model):
id = fields.IntField(pk=True)
name = fields.CharField(max_length=60)
user = fields.ForeignKeyField('orm.User')