Exemple #1
0
# coding: utf-8
from sqlalchemy import Column, DateTime, Float, ForeignKey, Integer, String, Table, text
from sqlalchemy.orm import relationship
from service.data_base.sql_manager import SqlManager

# sqlacodegen mysql://root:[email protected]/canteen --outfile 1210.py
# u_perm_groups = relationship(u'UPermGroup', secondary='u_userinfo_has_u_perm_group')

Base = SqlManager.get_instance().base_model
metadata = Base.metadata


class CompanyInfo(Base):
    __tablename__ = 'company_info'

    id = Column(Integer, primary_key=True)
    vch_uid = Column(String(45), nullable=False)
    vch_name = Column(String(45))
    vch_boss_name = Column(String(45))
    num_boss_phone = Column(Integer)
    vch_email = Column(String(45))
    vch_address = Column(String(45))


class DeprecatedUUserScheduleStatu(Base):
    __tablename__ = 'deprecated_u_user_schedule_status'

    id = Column(Integer, primary_key=True)
    vch_name = Column(String(45))

Exemple #2
0
#_*_ encoding=utf-8 _*_
#!/usr/bin/env python
from app.app_manager import AppManager
from service.data_base.sql_manager import SqlManager


import wx
import sys
import json

app = wx.App()

config = open(sys.path[0] + "\\..\\man_config.json", "r")
content = config.read()
config_json = json.loads(content)
SqlManager.get_instance().initialize(config_json['db_address'], config_json['db_user'], config_json["db_password"])

from app.manager.logic.ctrl import CtrlManagerLogin
CtrlManagerLogin.get_instance().initialize(config_json['user'], config_json["password"],
                                           config_json["disk_num"] + ":" + config_json["img_path"])

AppManager.get_instance().initialize('manager')
AppManager.get_instance().switch_to_application('Login', 'manager')
app.MainLoop()