123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- from tortoise.models import Model
- from tortoise.fields import (
- IntField,
- BigIntField,
- CharField,
- TextField,
- BooleanField,
- DateField,
- ForeignKeyField,
- FloatField,
- )
- class Action(Model):
- id = IntField(pk=True)
- name = CharField(max_length=64, unique=True)
- template = TextField()
- kind = IntField()
- class Gif(Model):
- id = IntField(pk=True)
- action = ForeignKeyField("models.Action", related_name="gifs")
- file_id = CharField(max_length=64, unique=True)
- class StickerPack(Model):
- id = IntField(pk=True)
- short_name = CharField(max_length=256, unique=True)
- sid = BigIntField()
- hash = BigIntField()
- stickers_count = IntField(default=0)
- class Admin(Model):
- id = IntField(pk=True)
- user_id = BigIntField(unique=True)
- class BirthDay(Model):
- id = IntField(pk=True)
- peer_id = BigIntField()
- user_id = BigIntField()
- date = DateField()
- class VPNServer(Model):
- id = IntField(pk=True)
- name = CharField(max_length=64, unique=True)
- ip = CharField(max_length=15, unique=True)
- class AllowedChat(Model):
- id = IntField(pk=True)
- peer_id = BigIntField(unique=True)
- class MarkovChat(Model):
- id = IntField(pk=True)
- peer_id = BigIntField(unique=True)
- opt_reply_prob = FloatField(default=1.0)
- opt_message_prob = FloatField(default=0.8)
|