replace-bot/database/models.py
2022-02-16 17:13:44 +02:00

27 lines
519 B
Python

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