const system = require("../../system");
const settings = require("../../../config/settings");
const uiconfig = system.getUiConfig2(settings.wxconfig.appId);
module.exports = (db, DataTypes) => {
      // 版权作者表引用用户信息
    // this.db.models.workcrsubmit.belongsTo(this.db.models.user, { as: 'createuser', constraints: false, });
    // this.db.models.workcrsubmit.belongsTo(this.db.models.user, { as: 'updateuser', constraints: false, });

  return db.define("copyrightauthor", {
    sourceOrderNo: DataTypes.STRING(50),//来源单号--订单号
    name: DataTypes.STRING,
    crType: DataTypes.STRING,
    countryName: DataTypes.STRING,
    applyProvince: DataTypes.STRING,
    applyCity: DataTypes.STRING,
    certificateType: DataTypes.STRING,
    certificateCode: DataTypes.STRING,
    garden: DataTypes.STRING,//园区
    entType: DataTypes.STRING,//企业类别
    sign_info: DataTypes.STRING(50),//署名情况信息
    alias_info: DataTypes.STRING(50),//别名信息
    idNoUrl: DataTypes.TEXT,//证件url
  }, {
      paranoid: true,//假的删除
      underscored: true,
      version: true,
      freezeTableName: true,
      //freezeTableName: true,
      // define the table's name
      tableName: 'cr_copyright_author',
      validate: {
      }
    });
}
