From fcbdf6954e70c0feafa363cb0393f844939d824e Mon Sep 17 00:00:00 2001 From: lza_menace Date: Mon, 13 Jul 2020 00:02:04 -0700 Subject: [PATCH] adding simple peewee db orm --- ircbot/db.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 ircbot/db.py diff --git a/ircbot/db.py b/ircbot/db.py new file mode 100644 index 0000000..ea8b7c9 --- /dev/null +++ b/ircbot/db.py @@ -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()