class Statistics(Document): player = LongField(primary_key=True, required=True) totals = IntField(default=0, required=False) wins = IntField(default=0, required=False) losts = IntField(default=0, required=False) timestamp = DateTimeField(required=False)
class sysrules(Document): # These are the rule of the system. code = LongField(required=True) name = StringField(required=True) description = StringField(required=True)
class product_type(Document): prod_type = LongField(required=True) avatar = StringField(required=False, default="dinner.png")
class ProductTax(Document): product = LongField(required=True) tax = LongField(required=True)
class paytype_det(Document): code = LongField(reference=False) typid = LongField(required=True) denomination = DictField(required=False) reference = BooleanField(required=True, default=False) percent_extra = FloatField(required=True, default=0.00)
class terms(Document): # Store the terms of the meals code = LongField(required=True) _name = StringField(required=True) notes = StringField()
class Bill2Print(Document): # Bills that are ready to be printed. bill = LongField(required=True, unique=True) preorder = LongField(required=True) cashbox = LongField(required=True)
class GameDoc(Document): game_id = LongField() create_date = LongField() player_games = EmbeddedDocumentListField(PlayerGameDoc) meta = {'indexes': [{'fields': ['game_id'], 'unique': True}]}
class ProductPreCompound(Document): # Compounds of the preorder id = ObjectIdField() preorder = LongField(required=True) product = LongField(required=True) compound = LongField(required=True)
class Withdrawal(Document): user = ReferenceField(User, required=True) amount = LongField(required=True) date = DateTimeField(required=True) tx_hash = StringField()
class SessionConfigs(Document): sesssionExpirationTime = LongField(required=True, default=60) carryOverSlots = BooleanField(required=True, default=True) bot = StringField(required=True) user = StringField(required=True) timestamp = DateTimeField(default=datetime.utcnow)
class Tip(Document): from_user = ReferenceField(User, required=True) to_user = ReferenceField(User, required=True) amount = LongField(required=True) date = DateTimeField(required=True) tx_hash = StringField()
class Wallet(Document): wallet_address = WalletAddressField(required=True, unique=True) actual_balance = LongField(default=0) locked_balance = LongField(default=0)
class TradingInfoUpdateMetaItem(Document): # D W M Y H Min freq = StringField(required=True) # 上次成功更新的时间,以 ms 表示 last_ok_date = LongField(required=True)
class products_move(Document): code = LongField(required=True) product = LongField(required=True) amount = FloatField(required=True)
class ProductSaleCompanion(Document): # Companion of the Product on the sale id = ObjectIdField() preorder = LongField(required=True) product = LongField(required=True) companion = LongField(required=True)
class product_term(Document): # Association between the product and the term. product = LongField(required=True) term = LongField(required=True) status = LongField(required=True, default=11) name = StringField(required=True)
class ProductSaleCompound(Document): # Compound of products to sale id = ObjectIdField() preorder = LongField(required=True) product = LongField(required=True) compound = LongField(required=True)
class archieve_preorder(Document): preorder = LongField(required=True) reason = StringField(required=True) created_by = LongField(required=True) created_date = LongField(required=True) created_hour = LongField(required=True)
class UsertypeMenu(Document): # The class that store the relation between the type of user and the menu user_type = LongField(required=True) module = LongField(required=True) created_by = LongField(required=True) created_date = LongField(required=True)
class warehouse_prods(Document): code = LongField(required=True) warehouse = LongField(required=True) product = LongField(required=True) amount = FloatField(required=True) status = FloatField(required=True, default=11)
class UserArea(Document): #The association between the user and the area. user_code = LongField(required=True) area = LongField(required=True) status = LongField(required=True, default=11)
class tax(Document): code = LongField(required=True) percent = FloatField(required=True) name = StringField(required=True)
class group_module_asc(Document): module = LongField(required=True) group = LongField(required=True)
class billtype_det(Document): typid = LongField(required=True) reference = BooleanField(required=False, default=False) percent_extra = FloatField(required=False, default=0.00)
class Country(Document): code = LongField(required=True) name = StringField(required=True) countryCode = StringField(required=True)
class rules_company(Document): # The users that have granted the permission of the rule. rule_code = LongField(required=True) company_code = LongField(required=True) rule_name = StringField(required=True)
class MermaProd(Document): code = LongField(required=True) product = LongField(required=True) amount = FloatField(required=True) merma = LongField(required=True)
class item_buy(Document): price = FloatField(required=True, default=0.00) item = LongField(required=True) bill = LongField(required=True, default=0) amount = FloatField(required=True)
class EventStats(EmbeddedDocument): meta = { # For backwards compatibility reasons "strict": False, } last_update = LongField()