tg-bot/tipbot/db.py

16 lines
349 B
Python
Raw Normal View History

2020-07-20 16:26:04 +00:00
from peewee import *
2020-08-06 05:53:42 +00:00
from tipbot import config
2020-07-20 16:26:04 +00:00
db = SqliteDatabase(config.SQLITE_DB_PATH)
class BaseModel(Model):
class Meta:
database = db
class User(BaseModel):
2021-05-08 07:08:39 +00:00
telegram_id = IntegerField(unique=True)
telegram_user = CharField(unique=True)
account_index = IntegerField(unique=True)
address = CharField(unique=True)