Browse Source

fase 1

master
Yusmardianto 4 years ago
parent
commit
7727569a66
7 changed files with 137 additions and 0 deletions
  1. +52
    -0
      api/transaction/config/routes.json
  2. +8
    -0
      api/transaction/controllers/transaction.js
  3. +8
    -0
      api/transaction/models/transaction.js
  4. +55
    -0
      api/transaction/models/transaction.settings.json
  5. +8
    -0
      api/transaction/services/transaction.js
  6. +6
    -0
      extensions/users-permissions/models/User.settings.json
  7. +0
    -0
      public/uploads/.gitkeep

+ 52
- 0
api/transaction/config/routes.json View File

@@ -0,0 +1,52 @@
{
"routes": [
{
"method": "GET",
"path": "/transactions",
"handler": "transaction.find",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/transactions/count",
"handler": "transaction.count",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/transactions/:id",
"handler": "transaction.findOne",
"config": {
"policies": []
}
},
{
"method": "POST",
"path": "/transactions",
"handler": "transaction.create",
"config": {
"policies": []
}
},
{
"method": "PUT",
"path": "/transactions/:id",
"handler": "transaction.update",
"config": {
"policies": []
}
},
{
"method": "DELETE",
"path": "/transactions/:id",
"handler": "transaction.delete",
"config": {
"policies": []
}
}
]
}

+ 8
- 0
api/transaction/controllers/transaction.js View File

@@ -0,0 +1,8 @@
'use strict';

/**
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/controllers.html#core-controllers)
* to customize this controller
*/

module.exports = {};

+ 8
- 0
api/transaction/models/transaction.js View File

@@ -0,0 +1,8 @@
'use strict';

/**
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/models.html#lifecycle-hooks)
* to customize this model
*/

module.exports = {};

+ 55
- 0
api/transaction/models/transaction.settings.json View File

@@ -0,0 +1,55 @@
{
"kind": "collectionType",
"collectionName": "transactions",
"info": {
"name": "Transaction"
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": true
},
"attributes": {
"product_order": {
"type": "string"
},
"product_name": {
"type": "string"
},
"product_quantity": {
"type": "biginteger"
},
"product_price": {
"type": "biginteger"
},
"product_color": {
"type": "string"
},
"product_courier": {
"type": "string"
},
"cust_name": {
"type": "string"
},
"cust_telp": {
"type": "string"
},
"cust_address": {
"type": "string"
},
"note": {
"type": "text"
},
"product_img": {
"model": "file",
"via": "related",
"allowedTypes": [
"images",
"files",
"videos"
],
"plugin": "upload",
"required": false
}
}
}

+ 8
- 0
api/transaction/services/transaction.js View File

@@ -0,0 +1,8 @@
'use strict';

/**
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/services.html#core-services)
* to customize this service
*/

module.exports = {};

+ 6
- 0
extensions/users-permissions/models/User.settings.json View File

@@ -70,6 +70,12 @@
"lastName": {
"type": "string",
"required": true
},
"telp": {
"type": "biginteger"
},
"address": {
"type": "richtext"
}
}
}

+ 0
- 0
public/uploads/.gitkeep View File


Loading…
Cancel
Save