lottery_store_template.ts 2.6 KB
module.exports = function(sequelize:any, DataTypes:any) {
    return sequelize.define('lottery_store_template', {
      id: {
        type: DataTypes.INTEGER(11),
        allowNull: false,
        primaryKey: true,
        autoIncrement: true
      },
      title: {
        type: DataTypes.STRING(255),
        allowNull: true
      },
      content: {
        type: DataTypes.TEXT,
        allowNull: true
      },
      url: {
        type: DataTypes.STRING(500),
        allowNull: true
      },
      publish_time: {
        type: DataTypes.STRING(20),
        allowNull: true,
      },
      frequency: {
        type: DataTypes.INTEGER(2),
        allowNull: true
      },
      main_image_url: {
        type: DataTypes.STRING(500),
        allowNull: true
      },
      template_status: {
        type: DataTypes.INTEGER(1),
        allowNull: true
      },
      created_at: {
        type: DataTypes.DATE,
        allowNull: true,
      },
      updated_at: {
        type: DataTypes.DATE,
        allowNull: true,
      },
      deleted_at: {
        type: DataTypes.DATE,
        allowNull: true,
      },
      module_id: {
        type: DataTypes.INTEGER(11),
        allowNull: true
      },
      sub_module_id: {
        type: DataTypes.INTEGER(11),
        allowNull: true
      },
      is_top: {
        type: DataTypes.INTEGER(1),
        allowNull: true
      },
      shopkeeper_qr_code: {
        type: DataTypes.STRING(500),
        allowNull: true
      },
      shopkeeper_image: {
        type: DataTypes.STRING(500),
        allowNull: true
      },
      ejs_body: {
        type: DataTypes.TEXT,
        allowNull: true
      },
      ejs_config: {
        type: DataTypes.JSON,
        allowNull: true
      },
      lotteryids: {
        type: DataTypes.JSON,
        allowNull: true,
        comment: '彩种id数组'
      },
      sub_module_ids: {
        type: DataTypes.JSON,
        allowNull: true
      },
      sub_module_parent_ids: {
        type: DataTypes.JSON,
        allowNull: true
      },
      enable: {
        type: DataTypes.INTEGER(1),
        allowNull: true,
        comment: '是否启用模版'
      } ,
      bobao:{
        type: DataTypes.INTEGER(1),
        allowNull: true,
        comment: '是否启用播报'
      },
      func_name: {
        type: DataTypes.STRING(50),
        allowNull: true,
        comment: '海报数据源函数'
      },
      top_sort: {
        type: DataTypes.INTEGER(8),
        allowNull: true
      },
      posters_key: {
        type: DataTypes.STRING(255),
        allowNull: true,
        comment: '足球生成海报key'
      }
    }, {
      tableName: 'lottery_store_template'
    });
  };