mirror of
https://git.wownero.com/lza_menace/lza-wowbot.git
synced 2024-08-15 03:23:51 +00:00
adding simple peewee db orm
This commit is contained in:
parent
79a7521a0f
commit
fcbdf6954e
1 changed files with 15 additions and 0 deletions
15
ircbot/db.py
Normal file
15
ircbot/db.py
Normal 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()
|
Loading…
Reference in a new issue