const system = require("../../system");
const settings = require("../../../config/settings");
const uiconfig = system.getUiConfig2(settings.wxconfig.appId);
module.exports = (db, DataTypes) => {
  return db.define("trademarktransactionneed", {
    // 引用表的信息:
    // this.db.models.trademarktransactionneed.belongsTo(this.db.models.company, {constraints: false, });//来源，默认1即平台
    // this.db.models.trademarktransactionneed.belongsTo(this.db.models.user, {constraints: false, });
    // this.db.models.trademarktransactionneed.belongsTo(this.db.models.trademarktransaction, {constraints: false, });  
    // this.db.models.trademarktransactionneed.belongsTo(this.db.models.user, {as:"tmowner",constraints: false, });//商标所属业务员

    tm_name:DataTypes.STRING(200),//商标名称
    ncl_one_code:DataTypes.STRING(200),//商标大类编码
    tm_code: DataTypes.STRING(50),//商标号
    tm_applier: DataTypes.STRING(50),//商标申请主体
    platform_quoted_price: DataTypes.STRING(50),//平台售价
    buyer_name:DataTypes.STRING(50),//买家姓名
    buyer_mobile:DataTypes.STRING(50),//联系电话
    buyer_quoted_price:DataTypes.STRING(50),//买家报价
    notes: DataTypes.STRING,//备注
    op_notes: DataTypes.STRING(50),//操作备注   
  }, {
      paranoid: true,//假的删除
      underscored: true,
      version: true,
      freezeTableName: true,
      //freezeTableName: true,
      // define the table's name
      tableName: 'bi_trademarktransaction_need',
      validate: {

      },
      indexes: [
      ]
    });
}
