Browse Source

添加 videoUrl

dev
巴林闲侠 1 year ago
parent
commit
e95900a269
  1. 2
      api/app/lib/controllers/report/index.js
  2. 9
      api/app/lib/models/report.js
  3. 2
      scripts/1.2.4/schema/1.update_report.sql

2
api/app/lib/controllers/report/index.js

@ -44,7 +44,7 @@ async function reportList(ctx) {
},
attributes: ['id', 'road', 'time', 'projectType', 'roadSectionStart', 'performerId', 'roadSectionEnd', 'reportType',
'content', 'longitude', 'latitude', 'projectName', 'handleState', 'codeRoad', 'handleContent', 'handlePic'],
'content', 'longitude', 'latitude', 'projectName', 'handleState', 'codeRoad', 'handleContent', 'handlePic','videoUrl'],
include: [{
model: models.User,
attributes: ['name']

9
api/app/lib/models/report.js

@ -223,6 +223,15 @@ module.exports = dc => {
field: "handle_pic",
autoIncrement: false
},
videoUrl: {
type: DataTypes.ARRAY(DataTypes.STRING),
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "video_url",
autoIncrement: false
},
}, {
tableName: "report",
comment: "",

2
scripts/1.2.4/schema/1.update_report.sql

@ -0,0 +1,2 @@
alter table report
add video_url varchar(1024) [];
Loading…
Cancel
Save