/** * 此文件内容为常用的系统枚举及变量。 */ /** * 系统部署时的配置文件。 * * @type {string} */ "use strict"; let configFile = "config."; if (process.env.IM_PROFILE === "prod") { configFile += "prod"; } else if (process.env.IM_PROFILE === "test") { configFile += "test"; } else { configFile += "dev"; } exports.CONFIG_FILE = configFile; /** * 消息内容类型。 */ exports.CONTENT_TYPE = { PlainText: 1, // 信息 Image: 2, // 图片信息 Audio: 3, // 语音信息 Article: 4, // 文章信息 GoTo: 5, // 跳转信息 SessionBegin: 6,// 咨询开始 SessionEnd: 7, // 咨询结束 commaValues: function () { return "1,2,3,4,5,6,7"; } }; /** * 客户端平台。 */ exports.PLATFORM = { iOS: 0, Android: 1 }; /** * 组类型。 */ exports.GROUP_TYPE = { AdminTeam: 1, DiscussionGroup: 2 }; /** * 模型事件。 * * @type {{Error: string, DataNotFound: string, OK: string}} */ exports.MODEL_EVENTS = { Error: "error", // 数据库访问出错 DataNotFound: "no_data", // 找不到指定的数据 OK: "ok" // 操作结束或有数据返回 }; /** * 默认整型最大值。 * @type {number} */ exports.MAX_INT = 9007199254740992; /** * 默认分页大小。 * * @type {number} */ exports.DEFAULT_PAGE_SIZE = 100;