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

module.exports = dc => {
    const DataTypes = dc.ORM;
    const sequelize = dc.orm;
    const Report = sequelize.define("report", {
        id: {
            type: DataTypes.INTEGER,
            allowNull: false,
            defaultValue: null,
            comment: null,
            primaryKey: true,
            field: "id",
            autoIncrement: true,
            unique: "report_id_uindex"
        },
        reportType: {
            type: DataTypes.STRING,
            allowNull: false,
            defaultValue: null,
            comment: "上报类型 巡查:patrol / 养护:conserve",
            primaryKey: false,
            field: "report_type",
            autoIncrement: false
        },
        projectType: {
            type: DataTypes.STRING,
            allowNull: false,
            defaultValue: null,
            comment: "工程类型 道路:road / 桥梁:birdge / 涵洞:culvert",
            primaryKey: false,
            field: "project_type",
            autoIncrement: false
        },
        road: {
            type: DataTypes.STRING,
            allowNull: true,
            defaultValue: null,
            comment: null,
            primaryKey: false,
            field: "road",
            autoIncrement: false
        },
        roadSectionStart: {
            type: DataTypes.STRING,
            allowNull: true,
            defaultValue: null,
            comment: null,
            primaryKey: false,
            field: "road_section_start",
            autoIncrement: false
        },
        roadSectionEnd: {
            type: DataTypes.STRING,
            allowNull: true,
            defaultValue: null,
            comment: null,
            primaryKey: false,
            field: "road_section_end",
            autoIncrement: false
        },
        longitude: {
            type: DataTypes.DOUBLE,
            allowNull: true,
            defaultValue: null,
            comment: null,
            primaryKey: false,
            field: "longitude",
            autoIncrement: false
        },
        latitude: {
            type: DataTypes.DOUBLE,
            allowNull: true,
            defaultValue: null,
            comment: null,
            primaryKey: false,
            field: "latitude",
            autoIncrement: false
        },
        content: {
            type: DataTypes.STRING,
            allowNull: true,
            defaultValue: null,
            comment: null,
            primaryKey: false,
            field: "content",
            autoIncrement: false
        },
        scenePic: {
            type: DataTypes.ARRAY(DataTypes.STRING),
            allowNull: true,
            defaultValue: null,
            comment: null,
            primaryKey: false,
            field: "scene_pic",
            autoIncrement: false
        },
        conserveBeforePic: {
            type: DataTypes.ARRAY(DataTypes.STRING),
            allowNull: true,
            defaultValue: null,
            comment: null,
            primaryKey: false,
            field: "conserve_before_pic",
            autoIncrement: false
        },
        conserveUnderwayPic: {
            type: DataTypes.ARRAY(DataTypes.STRING),
            allowNull: true,
            defaultValue: null,
            comment: null,
            primaryKey: false,
            field: "conserve_underway_pic",
            autoIncrement: false
        },
        conserveAfterPic: {
            type: DataTypes.ARRAY(DataTypes.STRING),
            allowNull: true,
            defaultValue: null,
            comment: null,
            primaryKey: false,
            field: "conserve_after_pic",
            autoIncrement: false
        },
        userId: {
            type: DataTypes.INTEGER,
            allowNull: true,
            defaultValue: null,
            comment: null,
            primaryKey: false,
            field: "user_id",
            autoIncrement: false
        },
        time: {
            type: DataTypes.DATE,
            allowNull: false,
            defaultValue: null,
            comment: null,
            primaryKey: false,
            field: "time",
            autoIncrement: false
        },
        address: {
            type: DataTypes.STRING,
            allowNull: true,
            defaultValue: null,
            comment: null,
            primaryKey: false,
            field: "address",
            autoIncrement: false
        },
    }, {
        tableName: "report",
        comment: "",
        indexes: []
    });
    dc.models.Report = Report;
    return Report;
};