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.
|
|
|
from datetime import datetime
|
|
|
|
|
|
|
|
from peewee import *
|
|
|
|
from playhouse.sqliteq import SqliteQueueDatabase
|
|
|
|
|
|
|
|
|
|
|
|
db = SqliteQueueDatabase('data/lws-web.db')
|
|
|
|
|
|
|
|
|
|
|
|
class Admin(Model):
|
|
|
|
username = CharField()
|
|
|
|
password = CharField()
|
|
|
|
address = CharField()
|
|
|
|
view_key = CharField()
|
|
|
|
date = DateTimeField(default=datetime.utcnow)
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
database = db
|
|
|
|
|
|
|
|
|
|
|
|
class Wallet(Model):
|
|
|
|
name = CharField()
|
|
|
|
description = TextField()
|
|
|
|
address = CharField()
|
|
|
|
view_key = CharField()
|
|
|
|
restore_height = IntegerField()
|
|
|
|
date = DateTimeField(default=datetime.utcnow)
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
database = db
|
|
|
|
|
|
|
|
|
|
|
|
db.create_tables([Admin, Wallet])
|