deartibers
2 years ago
12 changed files with 377 additions and 10 deletions
@ -0,0 +1,97 @@ |
|||
/* eslint-disable*/ |
|||
'use strict'; |
|||
|
|||
module.exports = dc => { |
|||
const DataTypes = dc.ORM; |
|||
const sequelize = dc.orm; |
|||
const Mirror = sequelize.define("mirror", { |
|||
id: { |
|||
type: DataTypes.INTEGER, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: true, |
|||
field: "id", |
|||
autoIncrement: true, |
|||
unique: "mirror_id_uindex" |
|||
}, |
|||
template: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "模板标识", |
|||
primaryKey: false, |
|||
field: "template", |
|||
autoIncrement: false |
|||
}, |
|||
createUser: { |
|||
type: DataTypes.INTEGER, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "create_user", |
|||
autoIncrement: false |
|||
}, |
|||
createTime: { |
|||
type: DataTypes.DATE, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "create_time", |
|||
autoIncrement: false |
|||
}, |
|||
updateTime: { |
|||
type: DataTypes.DATE, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "update_time", |
|||
autoIncrement: false |
|||
}, |
|||
title: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "title", |
|||
autoIncrement: false |
|||
}, |
|||
showHeader: { |
|||
type: DataTypes.BOOLEAN, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "show_header", |
|||
autoIncrement: false |
|||
}, |
|||
publish: { |
|||
type: DataTypes.BOOLEAN, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "publish", |
|||
autoIncrement: false |
|||
}, |
|||
mid: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "mid", |
|||
autoIncrement: false |
|||
} |
|||
}, { |
|||
tableName: "mirror", |
|||
comment: "", |
|||
indexes: [] |
|||
}); |
|||
dc.models.Mirror = Mirror; |
|||
return Mirror; |
|||
}; |
@ -0,0 +1,56 @@ |
|||
/* eslint-disable*/ |
|||
'use strict'; |
|||
|
|||
module.exports = dc => { |
|||
const DataTypes = dc.ORM; |
|||
const sequelize = dc.orm; |
|||
const MirrorCamera = sequelize.define("mirrorCamera", { |
|||
id: { |
|||
type: DataTypes.INTEGER, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: true, |
|||
field: "id", |
|||
autoIncrement: true, |
|||
unique: "mirror_camera_id_uindex" |
|||
}, |
|||
cameraId: { |
|||
type: DataTypes.INTEGER, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "camera_id", |
|||
autoIncrement: false, |
|||
references: { |
|||
key: "id", |
|||
model: "camera" |
|||
} |
|||
}, |
|||
mirrorIds: { |
|||
type: DataTypes.ARRAY(DataTypes.INTEGER), |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "mirror_ids", |
|||
autoIncrement: false |
|||
}, |
|||
filterIds: { |
|||
type: DataTypes.ARRAY(DataTypes.INTEGER), |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "filter_ids", |
|||
autoIncrement: false |
|||
} |
|||
}, { |
|||
tableName: "mirror_camera", |
|||
comment: "", |
|||
indexes: [] |
|||
}); |
|||
dc.models.MirrorCamera = MirrorCamera; |
|||
return MirrorCamera; |
|||
}; |
@ -0,0 +1,47 @@ |
|||
/* eslint-disable*/ |
|||
'use strict'; |
|||
|
|||
module.exports = dc => { |
|||
const DataTypes = dc.ORM; |
|||
const sequelize = dc.orm; |
|||
const MirrorFilter = sequelize.define("mirrorFilter", { |
|||
id: { |
|||
type: DataTypes.INTEGER, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: true, |
|||
field: "id", |
|||
autoIncrement: true, |
|||
unique: "mirror_filter_id_uindex" |
|||
}, |
|||
name: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "name", |
|||
autoIncrement: false |
|||
}, |
|||
groupId: { |
|||
type: DataTypes.INTEGER, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "group_id", |
|||
autoIncrement: false, |
|||
references: { |
|||
key: "id", |
|||
model: "mirrorFilterGroup" |
|||
} |
|||
} |
|||
}, { |
|||
tableName: "mirror_filter", |
|||
comment: "", |
|||
indexes: [] |
|||
}); |
|||
dc.models.MirrorFilter = MirrorFilter; |
|||
return MirrorFilter; |
|||
}; |
@ -0,0 +1,56 @@ |
|||
/* eslint-disable*/ |
|||
'use strict'; |
|||
|
|||
module.exports = dc => { |
|||
const DataTypes = dc.ORM; |
|||
const sequelize = dc.orm; |
|||
const MirrorFilterGroup = sequelize.define("mirrorFilterGroup", { |
|||
id: { |
|||
type: DataTypes.INTEGER, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: true, |
|||
field: "id", |
|||
autoIncrement: true, |
|||
unique: "mirror_filter_group_id_uindex" |
|||
}, |
|||
name: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "name", |
|||
autoIncrement: false |
|||
}, |
|||
forbidden: { |
|||
type: DataTypes.BOOLEAN, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "forbidden", |
|||
autoIncrement: false |
|||
}, |
|||
mirrorId: { |
|||
type: DataTypes.INTEGER, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "mirror_id", |
|||
autoIncrement: false, |
|||
references: { |
|||
key: "id", |
|||
model: "mirror" |
|||
} |
|||
} |
|||
}, { |
|||
tableName: "mirror_filter_group", |
|||
comment: "", |
|||
indexes: [] |
|||
}); |
|||
dc.models.MirrorFilterGroup = MirrorFilterGroup; |
|||
return MirrorFilterGroup; |
|||
}; |
@ -0,0 +1,65 @@ |
|||
/* eslint-disable*/ |
|||
'use strict'; |
|||
|
|||
module.exports = dc => { |
|||
const DataTypes = dc.ORM; |
|||
const sequelize = dc.orm; |
|||
const MirrorTree = sequelize.define("mirrorTree", { |
|||
id: { |
|||
type: DataTypes.INTEGER, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: true, |
|||
field: "id", |
|||
autoIncrement: true, |
|||
unique: "mirror_tree_id_uindex" |
|||
}, |
|||
name: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "name", |
|||
autoIncrement: false |
|||
}, |
|||
level: { |
|||
type: DataTypes.INTEGER, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "层级标注", |
|||
primaryKey: false, |
|||
field: "level", |
|||
autoIncrement: false |
|||
}, |
|||
dependence: { |
|||
type: DataTypes.INTEGER, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "dependence", |
|||
autoIncrement: false |
|||
}, |
|||
mirrorId: { |
|||
type: DataTypes.INTEGER, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: false, |
|||
field: "mirror_id", |
|||
autoIncrement: false, |
|||
references: { |
|||
key: "id", |
|||
model: "mirror" |
|||
} |
|||
} |
|||
}, { |
|||
tableName: "mirror_tree", |
|||
comment: "", |
|||
indexes: [] |
|||
}); |
|||
dc.models.MirrorTree = MirrorTree; |
|||
return MirrorTree; |
|||
}; |
@ -0,0 +1,4 @@ |
|||
alter table "gbCamera" |
|||
add did varchar(128); |
|||
|
|||
comment on column "gbCamera".did is '设备自定义id'; |
Loading…
Reference in new issue