package enum // 交易所类型 type ExchangeType int32 const ( ExchangeType_Map ExchangeType = 1 // 地图交易所 ExchangeType_World ExchangeType = 2 // 世界交易所 ) // 交易行为类型 type ExchangeActType int32 const ( ExchangeActType_Sell ExchangeActType = 1 // 出售 ExchangeActType_Wish ExchangeActType = 2 // 求购 ) // 是否是交易行为类型 func IsExchangeActType(actType ExchangeActType) bool { return actType == ExchangeActType_Sell || actType == ExchangeActType_Wish } // 交易商品分类 type ExchangeItemType int32 const ( ExchangeItemType_Resource ExchangeItemType = 1 // 资源 ExchangeItemType_Material ExchangeItemType = 2 // 材料 ExchangeItemType_Equip ExchangeItemType = 3 // 装备 ) // 交易状态 type ExchangeStatus int32 const ( ExchangeStatus_Pending ExchangeStatus = 0 // 待上架 ExchangeStatus_Listed ExchangeStatus = 1 // 已上架 ExchangeStatus_Canceled ExchangeStatus = 2 // 已下架 ExchangeStatus_Filled ExchangeStatus = 3 // 已成交 ExchangeStatus_Retrieve ExchangeStatus = 4 // 已取回 ) type ExchangeUpdateType int32 const ( ExchangeUpdateType_Cancel ExchangeUpdateType = 1 // 下架 ExchangeUpdateType_ReList ExchangeUpdateType = 2 // 重新上架 ExchangeUpdateType_Retrieve ExchangeUpdateType = 3 // 取回 ) // 判断是否是更新类型 func IsExchangeUpdateType(updateType ExchangeUpdateType) bool { return updateType == ExchangeUpdateType_Cancel || updateType == ExchangeUpdateType_ReList || updateType == ExchangeUpdateType_Retrieve } // 交易日志类型 1:购买 2:出售 type ExchangeLogType int32 const ( ExchangeLogType_Buy ExchangeLogType = 1 // 购买 ExchangeLogType_Sell ExchangeLogType = 2 // 出售 ) // 判断交易日志类型 func IsExchangeLogType(logType ExchangeLogType) bool { return logType == ExchangeLogType_Buy || logType == ExchangeLogType_Sell } // 发货状态 0:待发货 1:失败 2:成功 type ExchangeDeliverStatus int32 const ( ExchangeDeliverStatus_Pending ExchangeDeliverStatus = 0 // 待发货 ExchangeDeliverStatus_Failed ExchangeDeliverStatus = 1 // 失败 ExchangeDeliverStatus_Successed ExchangeDeliverStatus = 2 // 成功 ) // 排序 0:不排序 1:升序 2:降序 type ExchangeSortType int32 const ( ExchangeSortType_None ExchangeSortType = 0 // 不排序 ExchangeSortType_Asc ExchangeSortType = 1 // 升序 ExchangeSortType_Desc ExchangeSortType = 2 // 降序 )