feat: refs #6600 Add photoMotivation column to item table and create itemPhotoComment table
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
084f31e441
commit
790a637d4d
|
@ -1 +0,0 @@
|
||||||
ALTER TABLE vn.item ADD COLUMN photoMotivation VARCHAR(255);
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
ALTER TABLE vn.item ADD COLUMN photoMotivation VARCHAR(255);
|
||||||
|
|
||||||
|
CREATE TABLE vn.itemPhotoComment (
|
||||||
|
id int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
itemFk int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (id),
|
||||||
|
FOREIGN KEY (itemFk) REFERENCES vn.item(id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||||
|
UNIQUE (itemFk)
|
||||||
|
);
|
|
@ -35,6 +35,9 @@
|
||||||
"ItemPackingType": {
|
"ItemPackingType": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
"ItemPhotoComment": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
"ItemTag": {
|
"ItemTag": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
|
|
@ -215,7 +215,13 @@
|
||||||
"type": "hasOne",
|
"type": "hasOne",
|
||||||
"model": "Packaging",
|
"model": "Packaging",
|
||||||
"foreignKey": "itemFk"
|
"foreignKey": "itemFk"
|
||||||
|
},
|
||||||
|
"photoComment": {
|
||||||
|
"type": "hasOne",
|
||||||
|
"model": "itemPhotoComment",
|
||||||
|
"foreignKey": "itemFk"
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
"scopes": {
|
"scopes": {
|
||||||
"withName": {
|
"withName": {
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"name": "ItemPhotoComment",
|
||||||
|
"base": "VnModel",
|
||||||
|
"mixins": {
|
||||||
|
"Loggable": true
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "itemPhotoComment"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "number",
|
||||||
|
"id": true,
|
||||||
|
"description": "Id"
|
||||||
|
},
|
||||||
|
"itemFk": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue