from cheers import db class GiftTransaction(db.Model): def __init__(self, sender, receiver, value, message, is_anonymous, created_at): self.sender = sender self.receiver = receiver self.value = value self.message = message self.is_anonymous = is_anonymous self.created_at = created_at db.mapper(GiftTransaction, db.Table('gift_transaction', db.metadata, autoload=True))
from cheers import db class UserHash(db.Model): def __init__(self, user_id, user_hash): self.user_id = user_id self.user_hash = user_hash db.mapper(UserHash, db.Table('user_hash', db.metadata, autoload=True))
from cheers import db class Profile(db.Model): def __init__(self, user_id, nickname, icon_path, email, department, introduction): self.user_id = user_id self.nickname = nickname self.icon_path = icon_path self.email = email self.department = department self.introduction = introduction db.mapper(Profile, db.Table('profile', db.metadata, autoload=True))
from cheers import db class User(db.Model): def __init__(self, user_id, email, gift, stock): self.user_id = user_id self.email = email self.gift = gift self.stock = stock db.mapper(User, db.Table('user', db.metadata, autoload=True))
from cheers import db class Authentication(db.Model): def __init__(self, user_id, encrypted_password, hmac_key): self.user_id = user_id self.encrypted_password = encrypted_password self.hmac_key = hmac_key db.mapper(Authentication, db.Table('authentication', db.metadata, autoload=True))