/* eslint-disable*/ 'use strict'; module.exports = dc => { const DataTypes = dc.ORM; const sequelize = dc.orm; const CameraRemark = sequelize.define("cameraRemark", { id: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, comment: null, primaryKey: true, field: "id", autoIncrement: true, unique: "camera_remark_id_uindex" }, cameraId: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, comment: null, primaryKey: false, field: "camera_id", autoIncrement: false, references: { key: "id", model: "camera" } }, remark: { type: DataTypes.STRING, allowNull: false, defaultValue: null, comment: null, primaryKey: false, field: "remark", autoIncrement: false } }, { tableName: "camera_remark", comment: "", indexes: [] }); dc.models.CameraRemark = CameraRemark; const Camera = dc.models.Camera; CameraRemark.belongsTo(Camera, { foreignKey: 'cameraId', targetKey: 'id' }); Camera.hasMany(CameraRemark, { foreignKey: 'cameraId', sourceKey: 'id' }); return CameraRemark; };