#ifndef PREDEFINE_H
#define PREDEFINE_H

#include <QDebug>

#define APP_THEME               "deaufult"
#define APP_VERSION             "1.20160923.01"     //TODO

#define SERVER_PASSWORD         "posoperator@freemud.cn"
//#define SERVER_PASSWORD         "pos@freemud.cn"

#define CONFIG_NAME             "config.ini"
#define USERCONFIG_NAME         "userConfig.ini"

#define UI_CASHIER              "<font color='#ff0000'>未选择</font>"
#define UI_STOREID              "<font color='#ff0000'>未登录</font>"

#define INI_HOST                "SqlServer/host"
#define INI_USERNAME            "SqlServer/username"
#define INI_PASSWORD            "SqlServer/password"
#define INI_DATABASE            "SqlServer/database"
#define INI_SERVER              "FmServer/url"
#define INI_SERVER1             "FmServer/url1"
#define INI_PRINTERNAME         "Printer/name"
#define INI_FLOATPOSTION        "Float/postion"
#define INI_FLOATOPACITY        "Float/opacity"
#define INI_BLINKINTERVAL       "Float/blinkInterval"
#define INI_SOUNDINTERVAL       "Float/soundInterval"
#define INI_LISTENPORT          "RefundListener/port"

#define JSON_REQTYPE            "reqtype"
#define JSON_CURRENTUSER        "current_user"
#define JSON_USERNAME           "username"
#define JSON_PASSWORD           "password"
#define JSON_STATIONID          "station_id"
#define JSON_OPERATORID         "operator_id"
#define JSON_STATUSCODE         "statusCode"
#define JSON_STATUS             "status"
#define JSON_STATUSDESC         "status_desc"
#define JSON_STOCK              "stock"
#define JSON_STOCKID            "sku_id"
#define JSON_STOCKARRAY         "skus"
#define JSON_STOCKUPC           "sku_upc"
#define JSON_MESSAGE            "msg"
#define JSON_TIMESTAMPS         "timestamp"
#define JSON_STORENAME          "store_name"
#define JSON_AUTOCONFIRM        "autoconfirm"
#define JSON_TOKEN              "token"
#define JSON_POSVERSION         "pos_version"
#define JSON_ORDERS             "orders"
#define JSON_PRODUCTS           "products"
#define JSON_ORDERID            "order_id"
#define JSON_REASON             "reason"
#define JSON_REASONCODE         "reason_code"
#define JSON_SYNCTIME           "sync_time"
#define JSON_STOREID            "store_id"
#define JSON_CHANNEL            "channel"
#define JSON_DELIVERS           "deliverymans"
#define JSON_DELIVERYID         "deliveryman_id"
#define JSON_DELIVERYNAME       "deliveryman_name"
#define JSON_DELIVERYPHONE      "deliveryman_phone"
#define JSON_ORDER              "order"
#define JSON_SHOPSTATUS         "channels"
#define JSON_CHANNELNAME        "name"
#define JSON_SHOPSTATUSDESC     "status_desc"

// 订单的操作码
#define OPERATION_GETDELIVERS   "getDelivers"
#define OPERATION_CONFRIM       "confirm"
#define OPERATION_REFUSE        "refuse"
#define OPERATION_SENDOUT       "sendOut"
#define OPERATION_COMPLETE      "complete"
#define OPERATION_REFUND        "refund"
#define OPERATION_REFUSEREFUND  "refuseRefund"
#define OPERATION_AGREEREFUND   "agreeRefund"
// 订单操作名
#define OPERATIONNAME_GETDELIVERS   "接单"
#define OPERATIONNAME_REFUSE        "拒单"
#define OPERATIONNAME_SENDOUT       "送出"
#define OPERATIONNAME_COMPLETE      "完成"
#define OPERATIONNAME_REFUSEREFUND  "拒绝"
#define OPERATIONNAME_AGREEREFUND   "同意"

// 属性名称
#define PROPERTY_ID             "id"            // 人员编号
#define PROPERTY_NAME           "name"          // 人员姓名
#define PROPERTY_PHONE          "phone"         // 人员电话
#define PROPERTY_SHIFTID        "shiftId"       // 班次编号
#define PROPERTY_SHIFTNAME      "shiftName"     // 班次名称


// 服务器返回正确值
#define JSON_STATUSCODE_OK      100
// 默认拉取订单的间隔时间
#define VALUE_PULLSYNCTIME      10000
// 默认网络超时时间
#define VALUE_NETTIMEOUT        10000
// 默认重新尝试登录的时间
#define VALUE_RELOGINTIME       20000
// 新订单提示音音频时长
#define VALUE_NEWORDERTIME      6000        //TODO
// 需退款提示音音频时长
#define VALUE_REFUNDORDERTIME   5000        //TODO
// 同步库存默认时长
#define VALUE_SYNSTOCKINTERVAL  5*60*1000   //TODO
// 拒绝退款理由
#define VALUE_REFUSEREFUND_REASON  "拒绝退款"

#endif // PREDEFINE_H
