File size: 482 Bytes
71e71e8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | from peewee import *
from src.model.BaseModel import BaseModel
class SystemUpdate(BaseModel):
"""
SystemUpdate class
"""
title = CharField()
description = CharField(max_length=999)
chat_id = CharField()
message_id = BigIntegerField()
class Meta:
db_table = "system_update"
@staticmethod
def get_latest_update():
return SystemUpdate.select().order_by(SystemUpdate.date.desc()).get_or_none()
SystemUpdate.create_table()
|