replace-bot/database/models.py

27 lines
519 B
Python
Raw Permalink Normal View History

2022-02-16 18:13:44 +03:00
from datetime import datetime
from peewee import Model, BigIntegerField, CharField, DateTimeField
from load import db
class Users(Model):
user_id = BigIntegerField(null=False)
first_name = CharField(null=True)
last_name = CharField(null=True)
username = CharField(null=True)
date = DateTimeField(default=datetime.now)
class Meta:
database = db
class Chat(Model):
chat_id = BigIntegerField(null=False)
group = CharField(null=False)
class Meta:
database = db