adding simple peewee db orm

This commit is contained in:
lza_menace 2020-07-13 00:02:04 -07:00
parent 79a7521a0f
commit fcbdf6954e

15
ircbot/db.py Normal file
View file

@ -0,0 +1,15 @@
import datetime
from peewee import *
import config
db = SqliteDatabase(config.SQLITE_DB_PATH)
class BaseModel(Model):
class Meta:
database = db
class User(BaseModel):
irc_nick = CharField()
account_index = IntegerField()
address_index = IntegerField()