const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
  return db.define("cclue", {
    product_id: DataTypes.STRING, comment:'线索类型ID(商品ID)',
    deliver_id: DataTypes.STRING ,defaultValue:'', comment:'交付商ID',
    product_name: DataTypes.STRING, comment:'线索类型名称（商品名称）',
    contact_mobile: DataTypes.STRING, comment:'联系电话',
    contacts: DataTypes.STRING ,comment:'联系人',
    status: DataTypes.STRING(3) ,defaultValue:'10', comment:'线索状态 10 待跟进 20 跟进中 30 已完成 40 已关闭',
    operator_id: DataTypes.BIGINT ,defaultValue:'', comment:'业务员id',
    operator_path: DataTypes.BIGINT ,defaultValue:'', comment:'业务员权限路径',
    close_reason: DataTypes.STRING ,defaultValue:'', comment:'关闭原因 10 客户无意向 20 客户联系不上 30 客户暂时不需要 40 客户已购买其他家 50 其他',
    close_remarks: DataTypes.INTEGER ,defaultValue:'', comment:'关闭备注',
    callback_url: DataTypes.STRING ,defaultValue:'', comment:'阿里回调地址'
  }, {
    paranoid: true,
    underscored: true,
    version: true,
    freezeTableName: true,
    tableName: 'c_clue',
    validate: {},
    indexes: [],
  });
}