You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
313 B
Python
18 lines
313 B
Python
2 years ago
|
from datetime import datetime
|
||
|
|
||
|
from peewee import *
|
||
|
from playhouse.sqliteq import SqliteQueueDatabase
|
||
|
|
||
|
|
||
|
db = SqliteQueueDatabase('chat.db')
|
||
|
|
||
|
|
||
|
class Message(Model):
|
||
|
message = CharField()
|
||
|
datestamp = DateTimeField(default=datetime.utcnow)
|
||
|
|
||
|
class Meta:
|
||
|
database = db
|
||
|
|
||
|
|
||
|
db.create_tables([Message])
|