diff --git a/api/app/lib/controllers/report/index.js b/api/app/lib/controllers/report/index.js index 1facea74..e4fc1476 100644 --- a/api/app/lib/controllers/report/index.js +++ b/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'] diff --git a/api/app/lib/models/report.js b/api/app/lib/models/report.js index 03b77eec..71dafb37 100644 --- a/api/app/lib/models/report.js +++ b/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: "", diff --git a/scripts/1.2.4/schema/1.update_report.sql b/scripts/1.2.4/schema/1.update_report.sql new file mode 100644 index 00000000..a0f79c58 --- /dev/null +++ b/scripts/1.2.4/schema/1.update_report.sql @@ -0,0 +1,2 @@ +alter table report + add video_url varchar(1024) []; \ No newline at end of file