From 00132e8442a4aed7b8e63ba28b6df3f1a12c49c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E6=B5=B7=E5=86=9B?= <yuhaijun@haomo.studio.com> Date: Thu, 19 Sep 2019 20:22:07 +0800 Subject: [PATCH] add --- common/models/inter-doctor.js | 5 + common/models/inter-doctor.json | 63 +++++ definitions/RuiPengLoopbackApi.yaml | 400 ++++++++++++++++++++++++++++ server/model-config.json | 4 + 4 files changed, 472 insertions(+) create mode 100644 common/models/inter-doctor.js create mode 100644 common/models/inter-doctor.json diff --git a/common/models/inter-doctor.js b/common/models/inter-doctor.js new file mode 100644 index 0000000..0a6197d --- /dev/null +++ b/common/models/inter-doctor.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function(Interdoctor) { + +}; diff --git a/common/models/inter-doctor.json b/common/models/inter-doctor.json new file mode 100644 index 0000000..0ba2c0b --- /dev/null +++ b/common/models/inter-doctor.json @@ -0,0 +1,63 @@ +{ + "name": "InterDoctor", + "base": "PersistedModel", + "idInjection": false, + "options": { + "validateUpsert": true + }, + "mysql": { + "schema": "wordpress", + "table": "inter_doctor" + }, + "properties": { + "id": { + "type": "String", + "required": false, + "length": 36, + "precision": null, + "scale": null, + "mysql": { + "columnName": "id", + "dataType": "varchar", + "dataLength": 36, + "dataPrecision": null, + "dataScale": null, + "nullable": "Y" + } + }, + "name": { + "type": "String", + "required": true, + "length": 4, + "precision": null, + "scale": null, + "mysql": { + "columnName": "name", + "dataType": "varchar", + "dataLength": 4, + "dataPrecision": null, + "dataScale": null, + "nullable": "N" + } + }, + "value": { + "type": "Number", + "required": false, + "length": null, + "precision": 11, + "scale": 2, + "mysql": { + "columnName": "value", + "dataType": "float", + "dataLength": null, + "dataPrecision": 11, + "dataScale": 2, + "nullable": "Y" + } + } + }, + "validations": [], + "relations": {}, + "acls": [], + "methods": {} +} diff --git a/definitions/RuiPengLoopbackApi.yaml b/definitions/RuiPengLoopbackApi.yaml index 8130122..35262a2 100644 --- a/definitions/RuiPengLoopbackApi.yaml +++ b/definitions/RuiPengLoopbackApi.yaml @@ -59518,6 +59518,392 @@ paths: type: number format: double deprecated: false + /InterDoctors: + post: + tags: + - InterDoctor + summary: Create a new instance of the model and persist it into the data source. + operationId: InterDoctor.create + parameters: + - name: data + in: body + description: Model instance data + required: false + schema: + description: Model instance data + $ref: '#/definitions/InterDoctor' + responses: + '200': + description: Request was successful + schema: + $ref: '#/definitions/InterDoctor' + deprecated: false + patch: + tags: + - InterDoctor + summary: >- + Patch an existing model instance or insert a new one into the data + source. + operationId: InterDoctor.patchOrCreate + parameters: + - name: data + in: body + description: Model instance data + required: false + schema: + description: Model instance data + $ref: '#/definitions/InterDoctor' + responses: + '200': + description: Request was successful + schema: + $ref: '#/definitions/InterDoctor' + deprecated: false + put: + tags: + - InterDoctor + summary: >- + Replace an existing model instance or insert a new one into the data + source. + operationId: InterDoctor.replaceOrCreate__put_InterDoctors + parameters: + - name: data + in: body + description: Model instance data + required: false + schema: + description: Model instance data + $ref: '#/definitions/InterDoctor' + responses: + '200': + description: Request was successful + schema: + $ref: '#/definitions/InterDoctor' + deprecated: false + get: + tags: + - InterDoctor + summary: Find all instances of the model matched by filter from the data source. + operationId: InterDoctor.find + parameters: + - name: filter + in: query + description: >- + Filter defining fields, where, include, order, offset, and limit - + must be a JSON-encoded string (`{"where":{"something":"value"}}`). + See + https://loopback.io/doc/en/lb3/Querying-data.html#using-stringified-json-in-rest-queries + for more details. + required: false + type: string + format: JSON + responses: + '200': + description: Request was successful + schema: + type: array + items: + $ref: '#/definitions/InterDoctor' + deprecated: false + /InterDoctors/replaceOrCreate: + post: + tags: + - InterDoctor + summary: >- + Replace an existing model instance or insert a new one into the data + source. + operationId: InterDoctor.replaceOrCreate__post_InterDoctors_replaceOrCreate + parameters: + - name: data + in: body + description: Model instance data + required: false + schema: + description: Model instance data + $ref: '#/definitions/InterDoctor' + responses: + '200': + description: Request was successful + schema: + $ref: '#/definitions/InterDoctor' + deprecated: false + /InterDoctors/upsertWithWhere: + post: + tags: + - InterDoctor + summary: >- + Update an existing model instance or insert a new one into the data + source based on the where criteria. + operationId: InterDoctor.upsertWithWhere + parameters: + - name: where + in: query + description: Criteria to match model instances + required: false + type: string + format: JSON + - name: data + in: body + description: An object of model property name/value pairs + required: false + schema: + description: An object of model property name/value pairs + $ref: '#/definitions/InterDoctor' + responses: + '200': + description: Request was successful + schema: + $ref: '#/definitions/InterDoctor' + deprecated: false + '/InterDoctors/{id}/exists': + get: + tags: + - InterDoctor + summary: Check whether a model instance exists in the data source. + operationId: 'InterDoctor.exists__get_InterDoctors_{id}_exists' + parameters: + - name: id + in: path + description: Model id + required: true + type: string + format: JSON + responses: + '200': + description: Request was successful + schema: + type: object + properties: + exists: + type: boolean + deprecated: false + '/InterDoctors/{id}': + head: + tags: + - InterDoctor + summary: Check whether a model instance exists in the data source. + operationId: 'InterDoctor.exists__head_InterDoctors_{id}' + parameters: + - name: id + in: path + description: Model id + required: true + type: string + format: JSON + responses: + '200': + description: Request was successful + schema: + type: object + properties: + exists: + type: boolean + deprecated: false + get: + tags: + - InterDoctor + summary: 'Find a model instance by {{id}} from the data source.' + operationId: InterDoctor.findById + parameters: + - name: id + in: path + description: Model id + required: true + type: string + format: JSON + - name: filter + in: query + description: >- + Filter defining fields and include - must be a JSON-encoded string + ({"something":"value"}) + required: false + type: string + format: JSON + responses: + '200': + description: Request was successful + schema: + $ref: '#/definitions/InterDoctor' + deprecated: false + put: + tags: + - InterDoctor + summary: >- + Replace attributes for a model instance and persist it into the data + source. + operationId: 'InterDoctor.replaceById__put_InterDoctors_{id}' + parameters: + - name: id + in: path + description: Model id + required: true + type: string + format: JSON + - name: data + in: body + description: Model instance data + required: false + schema: + description: Model instance data + $ref: '#/definitions/InterDoctor' + responses: + '200': + description: Request was successful + schema: + $ref: '#/definitions/InterDoctor' + deprecated: false + delete: + tags: + - InterDoctor + summary: 'Delete a model instance by {{id}} from the data source.' + operationId: InterDoctor.deleteById + parameters: + - name: id + in: path + description: Model id + required: true + type: string + format: JSON + responses: + '200': + description: Request was successful + schema: + type: object + deprecated: false + patch: + tags: + - InterDoctor + summary: >- + Patch attributes for a model instance and persist it into the data + source. + operationId: InterDoctor.prototype.patchAttributes + parameters: + - name: id + in: path + description: InterDoctor id + required: true + type: string + format: JSON + - name: data + in: body + description: An object of model property name/value pairs + required: false + schema: + description: An object of model property name/value pairs + $ref: '#/definitions/InterDoctor' + responses: + '200': + description: Request was successful + schema: + $ref: '#/definitions/InterDoctor' + deprecated: false + '/InterDoctors/{id}/replace': + post: + tags: + - InterDoctor + summary: >- + Replace attributes for a model instance and persist it into the data + source. + operationId: 'InterDoctor.replaceById__post_InterDoctors_{id}_replace' + parameters: + - name: id + in: path + description: Model id + required: true + type: string + format: JSON + - name: data + in: body + description: Model instance data + required: false + schema: + description: Model instance data + $ref: '#/definitions/InterDoctor' + responses: + '200': + description: Request was successful + schema: + $ref: '#/definitions/InterDoctor' + deprecated: false + /InterDoctors/findOne: + get: + tags: + - InterDoctor + summary: Find first instance of the model matched by filter from the data source. + operationId: InterDoctor.findOne + parameters: + - name: filter + in: query + description: >- + Filter defining fields, where, include, order, offset, and limit - + must be a JSON-encoded string (`{"where":{"something":"value"}}`). + See + https://loopback.io/doc/en/lb3/Querying-data.html#using-stringified-json-in-rest-queries + for more details. + required: false + type: string + format: JSON + responses: + '200': + description: Request was successful + schema: + $ref: '#/definitions/InterDoctor' + deprecated: false + /InterDoctors/update: + post: + tags: + - InterDoctor + summary: 'Update instances of the model matched by {{where}} from the data source.' + operationId: InterDoctor.updateAll + parameters: + - name: where + in: query + description: Criteria to match model instances + required: false + type: string + format: JSON + - name: data + in: body + description: An object of model property name/value pairs + required: false + schema: + description: An object of model property name/value pairs + $ref: '#/definitions/InterDoctor' + responses: + '200': + description: Request was successful + schema: + description: Information related to the outcome of the operation + type: object + properties: + count: + description: The number of instances updated + type: number + format: double + deprecated: false + /InterDoctors/count: + get: + tags: + - InterDoctor + summary: Count instances of the model matched by where from the data source. + operationId: InterDoctor.count + parameters: + - name: where + in: query + description: Criteria to match model instances + required: false + type: string + format: JSON + responses: + '200': + description: Request was successful + schema: + type: object + properties: + count: + type: number + format: double + deprecated: false definitions: DashboardHospitalAwenCount: properties: @@ -61827,6 +62213,20 @@ definitions: required: - name additionalProperties: false + InterDoctor: + properties: + id: + maxLength: 36 + type: string + name: + maxLength: 4 + type: string + value: + type: number + format: double + required: + - name + additionalProperties: false basePath: /api/ruipeng swagger: '2.0' info: diff --git a/server/model-config.json b/server/model-config.json index 38a1929..5063f6d 100644 --- a/server/model-config.json +++ b/server/model-config.json @@ -628,5 +628,9 @@ "InterZhihu": { "dataSource": "ruipeng", "public": true + }, + "InterDoctor": { + "dataSource": "ruipeng", + "public": true } } -- 2.21.0