#ifndef PREDEFINED
#define PREDEFINED

#define VERSION                     "20160612001"

#define INI_FILE_NAME               "Config.ini"
#define USERINI_FILE_NAME           "UserConfig.ini"

#define LOG_NAME                    "log.txt"
#define LOG_SIZE                    2
#define LOG_COUNT                   3

#define INIPATH_LOG_SIZE            "Log/size"
#define DEFAULT_LOG_SIZE            "2"
#define INIPATH_LOG_MAXCOUNT        "Log/maxcount"
#define DEFAULT_LOG_MAXCOUNT        "10"
#define INIPATH_LOG_LEVEL           "Log/level"
#define DEFAULT_LOG_LEVEL           "2"

#define INIPATH_LOGIN_PASSWORD      "Login/password"
#define DEFAULT_LOGIN_PASSWORD      "posoperator@freemud.cn"


#define INIPATH_LOGIN_STATIONID     "Login/stationId"
#define DEFAULT_LOGIN_STATIONID     "0000"
#define INIPATH_LOGIN_OPERATORID    "Login/operatorId"
#define DEFAULT_LOGIN_OPERATORID    "0000"

#define INIPATH_STOREINFO_OPERATOREID   "StoreInfo/operatorId"
#define INIPATH_STOREINFO_POSID         "StoreInfo/posId"
#define INIPATH_STOREINFO_STOREID       "StoreInfo/storeId"
#define INIPATH_STOREINFO_PARTNERID     "StoreInfo/partnerId"
#define INIPATH_STOREINFO_BUSINESSDATE  "StoreInfo/businessDate"
#define INIPATH_STOREINFO_MATESID      "StoreInfo/matesId"


#define INIPATH_COMMFILE_STORE      "CommFiles/store"
#define INIPATH_COMMFILE_MATES      "CommFiles/mates"
#define INIPATH_COMMFILE_PROPS      "CommFiles/props"
#define INIPATH_COMMFILE_BILL       "CommFiles/bill"
#define INIPATH_COMMFILE_VIVIBILL   "CommFiles/vivipath"
#define INIPATH_COMMFILE_REFUND     "CommFiles/refund"
#define INIPATH_COMMFILE_TILL       "CommFiles/till"

#define INIPATH_APP_THEME           "Ui/theme"
#define DEFAULT_APP_THEME           "default"

#define INIPATH_UDP_PORT            "Udp/port"
#define DEFAULT_UDP_PORT            "55555"
#define UDP_KEY                     "beslave"

#define INIPATH_FLOAT_BLINKINTERVAL "Float/blinkInterval"
#define DEFAULT_FLOAT_BLINKINTERVAL "500"
#define INIPATH_FLOAT_SOUNDINTERVAL "Float/soundInterval"
#define DEFAULT_FLOAT_SOUNDINTERVAL "5000"
#define INIPATH_FLOAT_POS           "Float/position"

#define INIPATH_SQL_HOST            "SqlServer/host"
#define INIPATH_SQL_USERNAME        "SqlServer/username"
#define INIPATH_SQL_PASSWORD        "SqlServer/password"
#define INIPATH_SQL_DATABASE        "SqlServer/database"
#define INIPATH_SQL_TIMEOUT         "SqlServer/timeout"
#define DEFAULT_SQL_TIMEOUT         "5"

#define INIPATH_PRINTER_NAME        "Printer/name"

#define INIPATH_FMSERVER_PROXY      "FmServer/proxy"
#define DEFAULT_FMSERVER_PROXY      "0"
#define INIPATH_FMSERVER_URL        "FmServer/url"
#define INIPATH_FMSERVER_HOST       "FmServer/host"
#define INIPATH_FMSERVER_PORT       "FmServer/port"

#define INIPATH_CUSTOM_BORDERCOMPLETE   "Custom/btnComplete"
#define DEFAULT_CUSTOM_BORDERCOMPLETE   "0"
#define INIPATH_CUSTOM_OPERATOR         "Custom/operator"
#define DEFAULT_CUSTOM_OPERATOR         "0"
#define INIPATH_NOTIFY_ACCEPTTIMER      "Custom/notifyAcceptTimer"
#define INIPATH_SHOW_CANCEL             "Custom/showCancel"
#define INIPATH_STOREID_PREFIX          "Custom/storeIdPrefix"
#define INIPATH_MAX_RETRY               "App/maxRetry"

#define INIPATH_CHANNEL_COLOR           "Color/"

#define FLOATFORM_POSX      20
#define FLOATFORM_POSY      20

#define JSON_KEY_REQTYPE            "reqtype"
#define JSON_KEY_STATIONID          "station_id"
#define JSON_KEY_OPERATORID         "operator_id"
#define JSON_KEY_AUTOCONFIRM        "autoconfirm"
#define JSON_KEY_STOREID            "store_id"
#define JSON_KEY_STORENAME          "store_name"
#define JSON_KEY_VER                "ver"
#define JSON_KEY_TRANSID            "trans_id"
#define JSON_KEY_TTANSACTIONS       "transactions"
#define JSON_KEY_CODE               "code"
#define JSON_KEY_EBCODE             "ebcode"
#define JSON_KEY_USERNAME           "username"
#define JSON_KEY_PASSWORD           "password"
#define JSON_KEY_CURRENTUSER        "current_user"
#define JSON_KEY_STATUSCODE         "statusCode"
#define JSON_KEY_MSG                "msg"
#define JSON_KEY_ORDERS             "orders"
#define JSON_KEY_DELIVERS           "deliverymans"
#define JSON_KEY_ORDER              "order"
#define JSON_KEY_STATUS             "status"
#define JSON_KEY_REASONCODE         "reason_code"
#define JSON_KEY_ORDERID            "order_id"
#define JSON_KEY_DELIVERYTYPE       "delivery_type"
#define JSON_KEY_DELIVERYID         "deliveryman_id"
#define JSON_KEY_DELIVERYNAME       "deliveryman_name"
#define JSON_KEY_DELIVERYPHONE      "deliveryman_phone"
#define JSON_KEY_DELIVERSTATUS      "delivery_status"
#define JSON_KEY_POSORDERID         "posorder_id"
#define JSON_KEY_CHANNEL            "channel"
#define JSON_KEY_COUPON             "coupon"
#define JSON_KEY_PRODUCTS           "products"
#define JSON_KEY_TIMESTAMPS         "timestamp"
#define JSON_KEY_TOKEN              "token"
#define JSON_KEY_SYNCTIME           "sync_time"

#define JSON_REPLY_STATUSCODE_OK    100

#define OPERABTN_NAME_REPRINT             "重新打印"
#define OPERABTN_NAME_HOLD                "稍后处理"
#define OPERABTN_NAME_MAKE                "开始制作"
#define OPERABTN_NAME_CONFIRM             "自配送"
#define OPERABTN_NAME_SELFSEND            "送餐"
#define OPERABTN_NAME_SEND                "骑士取餐"
#define OPERABTN_NAME_COMPLETE            "完成"
#define OPERABTN_NAME_REJECT              "拒绝接单"
#define OPERABTN_NAME_DEAFULT             "无"
#define OPERABTN_NAME_READ                "已读"
#define OPERABTN_NAME_CLOSE               "关闭"
#define OPERABTN_NAME_REFUND_ACCEPT       "同意"
#define OPERABTN_NAME_REFUND_REJECT       "拒绝"
#define OPERABTN_NAME_CONFIRM_MATE        "确认加料"
#define OPERABTN_PROPERTY_NAME            "order_id"
#define CHANNEL_ID_BD                     "bdwm"
#define CHANNEL_ID_ELE                    "eleme"

#define ORDERREJECT_NO_SHIP               8

#define DETAILTIP_RESERVATION             "此单为预订单，需要在 %1 送达"
#define DETAILTITLE_SHOP_DELIVERY         "自配送"
#define DETAILTIP_SHOP_DELIVERY           "此单无骑士接单，是否使用自配送接单?"
#define DETAILTITLE_MAKING                "制   作"
#define DETAILTITLE_CONFIRM_MATE          "确认加料"
#define DETAILTIP_CONFIRM_MATE            "请根据订单[备注]信息确认加料，必要时致电顾客以确认。"
#define DETAILTITLE_DELIVERING            "配   送"
#define DETAILTITLE_COMPLETE              "完   成"
#define DETAILTITLE_REFUND                "退   款"
#define DETAILTIP_REFUND                  "此单用户已申请退款，是否同意?"
#define DETAILTITLE_OTHER                 "争议订单"
#define DETAILTITLE_RESERVATION           "预订单"
#define DETAILTIP_BD_SEND                 "订单[%1]为现金结账，需收取骑士 %2 元现金。"
#define DETAILTIP_AUTO_CANCEL             "订单[%1]无骑士接单，且不支持自配送，已自动取消。"

#define PROPERTY_BTNSELECT_NAME           "name"
#define PROPERTY_BTNSELECT_ID             "id"
#define PROPERTY_BTNSELECT_SHIFTID        "shift_id"
#define PROPERTY_BTNSELECT_SHIFTNAME      "shift_name"

#define STATEBTN_NAME_USE                 "可接单"
#define STATEBTN_NAME_NUSE                "不可接单"

#define CUROPEBTN_DEFAULT                 "未选择"

#define ORDERSTATUS_DEFAULT               -23
#define ORDERSTATUS_NEW                   1
#define ORDERSTATUS_CONFIRMED             2
#define ORDERSTATUS_CANCELED              3
#define ORDERSTATUS_SHIPPING              4
#define ORDERSTATUS_SHIP_PENDING          5
#define ORDERSTATUS_ARRIVED               6
#define ORDERSTATUS_COMPLETE              200
#define ORDERSTATUS_LOCKED                -1
#define ORDERSTATUS_REFUND                20
#define ORDERSTATUS_REFUND_ACCEPT         30
#define ORDERSTATUS_REFUND_REJECT         40
#define ORDERSTATUS_REFUND_COMPLETE       100

//! Order virtual table id
#define TABLE_VID_NO_DRIVER                 701
#define TABLE_VID_RESERVATION               702
#define TABLE_VID_SHIPSELF                  703
#define TABLE_VID_MAKING                    704
#define TABLE_VID_SELF_MAKING               705
#define TABLE_VID_SHIPING                   706
#define TABLE_VID_SELF_SHIPING              707
#define TABLE_VID_FINISH                    708
#define TABLE_VID_SELF_FINISH               709
#define TABLE_VID_PENDING                   710
#define TABLE_VID_SELF_PENDING              711
#define TABLE_VID_REFUND                    712
#define TABLE_VID_SELF_REFUND               713
#define TABLE_VID_CONFIRM_MATE              714

#define TABLE_VID_UNKNOWN                   777

#define SHIPSTATUS_PENDING                0
#define SHIPSTATUS_CONFIRMED              1
#define SHIPSTATUS_CANCELED               2
#define SHIPSTATUS_SHIPPING               3
#define SHIPSTATUS_ARRIVED                4


#define SHIPTYPE_SELF                       0
#define SHIPTYPE_PLATFORM                   1

#define ORDERTYPE_WALKIN                    1
#define ORDERTYPE_RESERVATION               2

#define NTFORM_LOADING                    "正在通信......"
#define NTFORM_FAILED                     "未定义操作"


#define OBJREF(Class)                     (Class::Instance())
#define OBJPTR(Class)                     (&Class::Instance())

#define FMTAKEOUT_DEBUG                     0
#define FMTAKEOUT_NODT                      0
#define FMTAKEOUT_TYPE                      1
#define FMTAKEOUT_MATES                     0
#define FMTAKEOUT_RESERVATION               0

#endif // PREDEFINED

