add product model and seed script
This commit is contained in:
5
common/models/product.js
Normal file
5
common/models/product.js
Normal file
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function(Product) {
|
||||
|
||||
};
|
||||
34
common/models/product.json
Normal file
34
common/models/product.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "product",
|
||||
"plural": "products",
|
||||
"base": "PersistedModel",
|
||||
"idInjection": true,
|
||||
"options": {
|
||||
"validateUpsert": true
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"price": {
|
||||
"type": "number",
|
||||
"required": true
|
||||
},
|
||||
"added": {
|
||||
"type": "date",
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"validations": [],
|
||||
"relations": {},
|
||||
"acls": [],
|
||||
"methods": {}
|
||||
}
|
||||
Reference in New Issue
Block a user