tg-bot/tipbot/db.py

15 lines
279 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):
telegram_id = IntegerField()
telegram_user = CharField()
account_index = IntegerField()