const system=require("../../system");
const settings=require("../../../config/settings");
const uiconfig=system.getUiConfig2(settings.wxconfig.appId);
module.exports = (db, DataTypes) => {
  return db.define("usercustomer", {
    user_id:DataTypes.INTEGER,//connection.js已经在关系中建立
    customerInfo_id:DataTypes.INTEGER,//connection.js已经在关系中建立
    app_id:DataTypes.INTEGER,
    userName:DataTypes.STRING,
    onlyCode:DataTypes.STRING(50),
    customerNum:DataTypes.BIGINT,//客户号
    sort:{
      type:DataTypes.DOUBLE,
      defaultValue:1,
    },
    notes:DataTypes.STRING,
    isFirst:{
      type:DataTypes.INTEGER,
      defaultValue:1,
    },
    customerContact:DataTypes.STRING(50),//联系人
    customerMobile:DataTypes.STRING(20),//联系人电话
  },{
     paranoid: true,//假的删除
     underscored: true,
     version: true,
     freezeTableName: true,
     //freezeTableName: true,
     // define the table's name
     tableName: 'b_user_customer',
     validate: {
     }
  });
}
