Merge branch 'dev' into 4153-supplier.fiscal-data
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
d60f6769b4
|
@ -0,0 +1,5 @@
|
|||
INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalType, principalId)
|
||||
VALUES
|
||||
('ClaimRma', '*', 'READ', 'ALLOW', 'ROLE', 'claimManager'),
|
||||
('ClaimRma', '*', 'WRITE', 'ALLOW', 'ROLE', 'claimManager');
|
||||
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE `vn`.`claim` ADD rma varchar(100) NULL ;
|
|
@ -0,0 +1,7 @@
|
|||
CREATE TABLE `vn`.`claimRma` (
|
||||
id INT UNSIGNED auto_increment NOT NULL PRIMARY KEY,
|
||||
code varchar(100) NOT NULL,
|
||||
created timestamp DEFAULT current_timestamp() NOT NULL,
|
||||
workerFk INTEGER UNSIGNED NOT NULL
|
||||
)
|
||||
ENGINE=InnoDB;
|
|
@ -47,7 +47,7 @@ module.exports = Self => {
|
|||
{
|
||||
relation: 'claimState',
|
||||
scope: {
|
||||
fields: ['id', 'description']
|
||||
fields: ['id', 'code', 'description']
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
"Claim": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"ClaimContainer": {
|
||||
"dataSource": "claimStorage"
|
||||
},
|
||||
"ClaimBeginning": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
|
@ -41,7 +44,7 @@
|
|||
"ClaimObservation": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"ClaimContainer": {
|
||||
"dataSource": "claimStorage"
|
||||
}
|
||||
"ClaimRma": {
|
||||
"dataSource": "vn"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"name": "ClaimRma",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "claimRma"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"id": true,
|
||||
"description": "Identifier"
|
||||
},
|
||||
"code": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"created": {
|
||||
"type": "date"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"worker": {
|
||||
"type": "belongsTo",
|
||||
"model": "worker",
|
||||
"foreignKey": "workerFk"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -46,6 +46,9 @@
|
|||
},
|
||||
"packages": {
|
||||
"type": "number"
|
||||
},
|
||||
"rma": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
|
@ -54,6 +57,12 @@
|
|||
"model": "ClaimState",
|
||||
"foreignKey": "claimStateFk"
|
||||
},
|
||||
"claimRma": {
|
||||
"type": "belongsTo",
|
||||
"model": "ClaimRma",
|
||||
"foreignKey": "rma",
|
||||
"primaryKey": "code"
|
||||
},
|
||||
"client": {
|
||||
"type": "belongsTo",
|
||||
"model": "Client",
|
||||
|
|
|
@ -7,8 +7,12 @@ const componentsPath = path.resolve(__dirname, './core/components');
|
|||
|
||||
module.exports = {
|
||||
async boot(app) {
|
||||
// Init database instance
|
||||
// Extended locale intl polyfill
|
||||
const IntlPolyfill = require('intl');
|
||||
Intl.NumberFormat = IntlPolyfill.NumberFormat;
|
||||
Intl.DateTimeFormat = IntlPolyfill.DateTimeFormat;
|
||||
|
||||
// Init database instance
|
||||
require('./core/database').init(app.dataSources);
|
||||
require('./core/smtp').init();
|
||||
require('./core/cluster').init();
|
||||
|
|
Loading…
Reference in New Issue