feat: refs #7874 add observationTypeFk col
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
0cd20503d2
commit
7c23acde64
|
@ -1,18 +1,3 @@
|
||||||
-- vn.clientObservationType
|
ALTER TABLE vn.clientObservation
|
||||||
CREATE TABLE IF NOT EXISTS vn.clientObservationType(
|
ADD COLUMN observationTypeFk TINYINT(3) UNSIGNED,
|
||||||
id tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
|
ADD CONSTRAINT clientObservationTypeFk FOREIGN KEY (observationTypeFk) REFERENCES vn.observationType(id);
|
||||||
clientFk int(11) NOT NULL,
|
|
||||||
observationTypeFk tinyint(3) unsigned NOT NULL,
|
|
||||||
description varchar(50) NOT NULL,
|
|
||||||
PRIMARY KEY (id),
|
|
||||||
CONSTRAINT `clientFgn` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
||||||
CONSTRAINT `clientObservationFgn` FOREIGN KEY (`observationTypeFk`) REFERENCES `observationType` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
|
||||||
);
|
|
||||||
|
|
||||||
INSERT INTO salix.ACL
|
|
||||||
SET model = 'ClientObservationType',
|
|
||||||
property = '*',
|
|
||||||
accessType = 'READ',
|
|
||||||
permission = 'ALLOW',
|
|
||||||
principalType = 'ROLE',
|
|
||||||
principalId = 'employee';
|
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
"name": "ClientObservation",
|
"name": "ClientObservation",
|
||||||
"description": "Client notes",
|
"description": "Client notes",
|
||||||
"base": "VnModel",
|
"base": "VnModel",
|
||||||
"mixins": {
|
"mixins": {
|
||||||
"Loggable": true
|
"Loggable": true
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"mysql": {
|
"mysql": {
|
||||||
"table": "clientObservation"
|
"table": "clientObservation"
|
||||||
|
@ -26,6 +26,10 @@
|
||||||
"created": {
|
"created": {
|
||||||
"type": "date",
|
"type": "date",
|
||||||
"description": "Creation date and time"
|
"description": "Creation date and time"
|
||||||
|
},
|
||||||
|
"observationTypeFk": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "Type of observation"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
|
@ -44,14 +48,18 @@
|
||||||
"include": {
|
"include": {
|
||||||
"relation": "worker",
|
"relation": "worker",
|
||||||
"scope": {
|
"scope": {
|
||||||
"fields": ["id"],
|
"fields": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
"include": {
|
"include": {
|
||||||
"relation": "user",
|
"relation": "user",
|
||||||
"scope": {
|
"scope": {
|
||||||
"fields": ["nickname"]
|
"fields": [
|
||||||
|
"nickname"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue