Entidades Client y Address, customer renombrado a client
This commit is contained in:
parent
8e81cec20e
commit
0aac38f2ff
|
@ -1,9 +1,7 @@
|
||||||
{
|
{
|
||||||
|
|
||||||
"db": {
|
"db": {
|
||||||
"name": "db",
|
"name": "db",
|
||||||
"connector": "memory",
|
"connector": "memory",
|
||||||
"file": "db.json"
|
"file": "db.json"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,3 +17,4 @@
|
||||||
coverage
|
coverage
|
||||||
node_modules
|
node_modules
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
db.json
|
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"name": "Address",
|
||||||
|
"base": "PersistedModel",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "Number",
|
||||||
|
"id": true,
|
||||||
|
"description": "Identifier"
|
||||||
|
},
|
||||||
|
"street": {
|
||||||
|
"type": "string",
|
||||||
|
"required": "true"
|
||||||
|
},
|
||||||
|
"city": {
|
||||||
|
"type": "string",
|
||||||
|
"required": "true"
|
||||||
|
},
|
||||||
|
"postcode": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"province": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"country": {
|
||||||
|
"type": "string",
|
||||||
|
"required": "true"
|
||||||
|
},
|
||||||
|
"phone": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,74 @@
|
||||||
|
{
|
||||||
|
"name": "Client",
|
||||||
|
"base": "PersistedModel",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "Number",
|
||||||
|
"id": true,
|
||||||
|
"description": "Identifier"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"required": "true"
|
||||||
|
},
|
||||||
|
"salesPerson": {
|
||||||
|
"type": "Number",
|
||||||
|
"required": "true"
|
||||||
|
},
|
||||||
|
"fi": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Fiscal indetifier"
|
||||||
|
},
|
||||||
|
"alias": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"socialName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"dischargeDate": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"phone": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"fax": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"quality": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"active": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"credit": {
|
||||||
|
"type": "Number"
|
||||||
|
},
|
||||||
|
"creditAndCaution": {
|
||||||
|
"type": "Number"
|
||||||
|
},
|
||||||
|
"iban": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"payMethod": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"surcharge": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "The client has equivalence surcharge"
|
||||||
|
},
|
||||||
|
"hasToInvoice": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Global invoicing enabled for the client"
|
||||||
|
},
|
||||||
|
"invoiceByEmail": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Send invoices by email"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"db": {
|
||||||
|
"name": "db",
|
||||||
|
"connector": "memory",
|
||||||
|
"file": "db.json"
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,10 +16,6 @@
|
||||||
"User": {
|
"User": {
|
||||||
"dataSource": "db"
|
"dataSource": "db"
|
||||||
},
|
},
|
||||||
"Customer": {
|
|
||||||
"dataSource": "db",
|
|
||||||
"public": true
|
|
||||||
},
|
|
||||||
"AccessToken": {
|
"AccessToken": {
|
||||||
"dataSource": "db",
|
"dataSource": "db",
|
||||||
"public": false
|
"public": false
|
||||||
|
@ -36,7 +32,12 @@
|
||||||
"dataSource": "db",
|
"dataSource": "db",
|
||||||
"public": false
|
"public": false
|
||||||
},
|
},
|
||||||
"Message": {
|
"Client": {
|
||||||
"dataSource": null
|
"dataSource": "db",
|
||||||
|
"public": true
|
||||||
|
},
|
||||||
|
"Address": {
|
||||||
|
"dataSource": "db",
|
||||||
|
"public": true
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,14 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>Salix</title>
|
|
||||||
</head>
|
|
||||||
<body ng-app="login">
|
|
||||||
<vn-login></vn-login>
|
|
||||||
<script
|
|
||||||
type="text/javascript"
|
|
||||||
src="/salix.customer.js">
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,15 +0,0 @@
|
||||||
{
|
|
||||||
"name": "AccessTokenIp",
|
|
||||||
"base": "AccessToken",
|
|
||||||
"idInjection": false,
|
|
||||||
"properties": {
|
|
||||||
"ip": {
|
|
||||||
"type": "string",
|
|
||||||
"default": "1.1.1.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"validations": [],
|
|
||||||
"relations": {},
|
|
||||||
"acls": [],
|
|
||||||
"methods": {}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"name": "UserIp",
|
|
||||||
"base": "User",
|
|
||||||
"properties": {},
|
|
||||||
"validations": [],
|
|
||||||
"relations": {
|
|
||||||
"accessTokens": {
|
|
||||||
"type": "hasMany",
|
|
||||||
"model": "AccessTokenIp",
|
|
||||||
"foreignKey": "userId",
|
|
||||||
"options": {
|
|
||||||
"disableInclude": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"acls": [],
|
|
||||||
"methods": {}
|
|
||||||
}
|
|
|
@ -1,30 +0,0 @@
|
||||||
{
|
|
||||||
"name": "Customer",
|
|
||||||
"properties": {
|
|
||||||
"name": {
|
|
||||||
"type": "String",
|
|
||||||
"required": "true"
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Number",
|
|
||||||
"id": true,
|
|
||||||
"description": "Customer ID"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"validations": [],
|
|
||||||
"relations": {},
|
|
||||||
"acls": [
|
|
||||||
{
|
|
||||||
"principalType": "ROLE",
|
|
||||||
"principalId": "$unauthenticated",
|
|
||||||
"permission": "DENY"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"principalType": "ROLE",
|
|
||||||
"principalId": "$everyone",
|
|
||||||
"permission": "ALLOW",
|
|
||||||
"property": "create"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"methods": {}
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
module.exports = function(Message) {
|
|
||||||
Message.greet = function(msg, cb) {
|
|
||||||
process.nextTick(function() {
|
|
||||||
msg = msg || 'hello';
|
|
||||||
cb(null, 'Sender says ' + msg + ' to receiver');
|
|
||||||
});
|
|
||||||
};
|
|
||||||
};
|
|
|
@ -1,29 +0,0 @@
|
||||||
{
|
|
||||||
"name": "Message",
|
|
||||||
"base": "Model",
|
|
||||||
"properties": {},
|
|
||||||
"validations": [],
|
|
||||||
"relations": {},
|
|
||||||
"acls": [],
|
|
||||||
"methods": {
|
|
||||||
"greet": {
|
|
||||||
"isStatic": true,
|
|
||||||
"accepts": [
|
|
||||||
{
|
|
||||||
"arg": "msg",
|
|
||||||
"type": "string",
|
|
||||||
"http": {
|
|
||||||
"source": "query"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"returns": {
|
|
||||||
"arg": "greeting",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"http": {
|
|
||||||
"verb": "get"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
'use strict';
|
|
||||||
|
|
||||||
module.exports = function(Usera) {
|
|
||||||
|
|
||||||
};
|
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
"name": "UserA",
|
|
||||||
"base": "PersistedModel",
|
|
||||||
"idInjection": true,
|
|
||||||
"options": {
|
|
||||||
"validateUpsert": true
|
|
||||||
},
|
|
||||||
"properties": {},
|
|
||||||
"validations": [],
|
|
||||||
"relations": {},
|
|
||||||
"acls": [],
|
|
||||||
"methods": {}
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"db": {
|
|
||||||
"name": "db",
|
|
||||||
"connector": "memory"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -38,7 +38,7 @@ http {
|
||||||
proxy_pass http://127.0.0.1:3001/$1$is_args$args;
|
proxy_pass http://127.0.0.1:3001/$1$is_args$args;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ ^/customer(?:/(.*))?$ {
|
location ~ ^/client(?:/(.*))?$ {
|
||||||
proxy_pass http://127.0.0.1:3002/$1$is_args$args;
|
proxy_pass http://127.0.0.1:3002/$1$is_args$args;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,12 +16,11 @@
|
||||||
"workingDir": "."
|
"workingDir": "."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"uid": "customer",
|
"uid": "client",
|
||||||
"append": true,
|
"append": true,
|
||||||
"watch": true,
|
"watch": true,
|
||||||
"script": "server.js",
|
"script": "server.js",
|
||||||
"sourceDir": "./@salix-services/customer/server",
|
"sourceDir": "./@salix-services/client/server",
|
||||||
"workingDir": "."
|
"workingDir": "."
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
Loading…
Reference in New Issue