/* eslint-disable*/
'use strict';

module.exports = dc => {
  const DataTypes = dc.ORM;
  const sequelize = dc.orm;
  const ReportSpotCheckPreview = sequelize.define("reportSpotCheckPreview", {
    id: {
      type: DataTypes.INTEGER,
      allowNull: false,
      defaultValue: null,
      comment: null,
      primaryKey: true,
      field: "id",
      autoIncrement: true,
      unique: "report_spot_check_preview_id_uindex"
    },
    percentage: {
      type: DataTypes.INTEGER,
      allowNull: false,
      defaultValue: null,
      comment: "抽查比例",
      primaryKey: false,
      field: "percentage",
      autoIncrement: false
    },
    departmentId: {
      type: DataTypes.INTEGER,
      allowNull: false,
      defaultValue: null,
      comment: "幸运乡镇",
      primaryKey: false,
      field: "department_id",
      autoIncrement: false,
      references: {
        key: "id",
        model: "department"
      }
    },
    date: {
      type: DataTypes.DATE,
      allowNull: true,
      defaultValue: null,
      comment: "预览时间",
      primaryKey: false,
      field: "date",
      autoIncrement: false
    },
    reportCount: {
      type: DataTypes.INTEGER,
      allowNull: false,
      defaultValue: null,
      comment: "当时上报总数",
      primaryKey: false,
      field: "report_count",
      autoIncrement: false
    },
    checked: {
      type: DataTypes.BOOLEAN,
      allowNull: true,
      defaultValue: null,
      comment: null,
      primaryKey: false,
      field: "checked",
      autoIncrement: false
    }
  }, {
    tableName: "report_spot_check_preview",
    comment: "",
    indexes: []
  });
  dc.models.ReportSpotCheckPreview = ReportSpotCheckPreview;
  return ReportSpotCheckPreview;
};