Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RuiPengLoopbackApi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄卓然
RuiPengLoopbackApi
Commits
e0c8dc48
Commit
e0c8dc48
authored
5 years ago
by
余海军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
aaab4c87
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
506 additions
and
0 deletions
+506
-0
main.js
common/models/main.js
+5
-0
main.json
common/models/main.json
+93
-0
RuiPengLoopbackApi.yaml
definitions/RuiPengLoopbackApi.yaml
+404
-0
model-config.json
server/model-config.json
+4
-0
No files found.
common/models/main.js
0 → 100644
View file @
e0c8dc48
'use strict'
;
module
.
exports
=
function
(
Main
)
{
};
This diff is collapsed.
Click to expand it.
common/models/main.json
0 → 100644
View file @
e0c8dc48
{
"name"
:
"Main"
,
"base"
:
"PersistedModel"
,
"idInjection"
:
false
,
"options"
:
{
"validateUpsert"
:
true
},
"mysql"
:
{
"schema"
:
"wordpress"
,
"table"
:
"main"
},
"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"
}
},
"rpRegion"
:
{
"type"
:
"String"
,
"required"
:
false
,
"length"
:
65535
,
"precision"
:
null
,
"scale"
:
null
,
"mysql"
:
{
"columnName"
:
"rp_region"
,
"dataType"
:
"text"
,
"dataLength"
:
65535
,
"dataPrecision"
:
null
,
"dataScale"
:
null
,
"nullable"
:
"Y"
}
},
"rpArea"
:
{
"type"
:
"String"
,
"required"
:
false
,
"length"
:
65535
,
"precision"
:
null
,
"scale"
:
null
,
"mysql"
:
{
"columnName"
:
"rp_area"
,
"dataType"
:
"text"
,
"dataLength"
:
65535
,
"dataPrecision"
:
null
,
"dataScale"
:
null
,
"nullable"
:
"Y"
}
},
"clinicShortname"
:
{
"type"
:
"String"
,
"required"
:
false
,
"length"
:
65535
,
"precision"
:
null
,
"scale"
:
null
,
"mysql"
:
{
"columnName"
:
"clinic_shortname"
,
"dataType"
:
"text"
,
"dataLength"
:
65535
,
"dataPrecision"
:
null
,
"dataScale"
:
null
,
"nullable"
:
"Y"
}
},
"accrual"
:
{
"type"
:
"Number"
,
"required"
:
false
,
"length"
:
null
,
"precision"
:
23
,
"scale"
:
null
,
"mysql"
:
{
"columnName"
:
"accrual"
,
"dataType"
:
"double"
,
"dataLength"
:
null
,
"dataPrecision"
:
23
,
"dataScale"
:
null
,
"nullable"
:
"Y"
}
}
},
"validations"
:
[],
"relations"
:
{},
"acls"
:
[],
"methods"
:
{}
}
This diff is collapsed.
Click to expand it.
definitions/RuiPengLoopbackApi.yaml
View file @
e0c8dc48
...
@@ -19363,6 +19363,392 @@ paths:
...
@@ -19363,6 +19363,392 @@ paths:
type
:
number
type
:
number
format
:
double
format
:
double
deprecated
:
false
deprecated
:
false
/Mains
:
post
:
tags
:
-
Main
summary
:
Create a new instance of the model and persist it into the data source.
operationId
:
Main.create
parameters
:
-
name
:
data
in
:
body
description
:
Model instance data
required
:
false
schema
:
description
:
Model instance data
$ref
:
'
#/definitions/Main'
responses
:
'
200'
:
description
:
Request was successful
schema
:
$ref
:
'
#/definitions/Main'
deprecated
:
false
patch
:
tags
:
-
Main
summary
:
>-
Patch an existing model instance or insert a new one into the data
source.
operationId: Main.patchOrCreate
parameters:
- name: data
in: body
description: Model instance data
required: false
schema:
description: Model instance data
$ref: '#/definitions/Main'
responses:
'200':
description: Request was successful
schema:
$ref: '#/definitions/Main'
deprecated: false
put
:
tags
:
-
Main
summary
:
>-
Replace an existing model instance or insert a new one into the data
source.
operationId: Main.replaceOrCreate__put_Mains
parameters:
- name: data
in: body
description: Model instance data
required: false
schema:
description: Model instance data
$ref: '#/definitions/Main'
responses:
'200':
description: Request was successful
schema:
$ref: '#/definitions/Main'
deprecated: false
get
:
tags
:
-
Main
summary
:
Find all instances of the model matched by filter from the data source.
operationId
:
Main.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/Main'
deprecated
:
false
/Mains/replaceOrCreate
:
post
:
tags
:
-
Main
summary
:
>-
Replace an existing model instance or insert a new one into the data
source.
operationId: Main.replaceOrCreate__post_Mains_replaceOrCreate
parameters:
- name: data
in: body
description: Model instance data
required: false
schema:
description: Model instance data
$ref: '#/definitions/Main'
responses:
'200':
description: Request was successful
schema:
$ref: '#/definitions/Main'
deprecated: false
/Mains/upsertWithWhere
:
post
:
tags
:
-
Main
summary
:
>-
Update an existing model instance or insert a new one into the data
source based on the where criteria.
operationId: Main.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/Main'
responses:
'200':
description: Request was successful
schema:
$ref: '#/definitions/Main'
deprecated: false
'
/Mains/{id}/exists'
:
get
:
tags
:
-
Main
summary
:
Check whether a model instance exists in the data source.
operationId
:
'
Main.exists__get_Mains_{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
'
/Mains/{id}'
:
head
:
tags
:
-
Main
summary
:
Check whether a model instance exists in the data source.
operationId
:
'
Main.exists__head_Mains_{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
:
-
Main
summary
:
'
Find
a
model
instance
by
{{id}}
from
the
data
source.'
operationId
:
Main.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/Main'
deprecated
:
false
put
:
tags
:
-
Main
summary
:
>-
Replace attributes for a model instance and persist it into the data
source.
operationId: 'Main.replaceById__put_Mains_{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/Main'
responses:
'200':
description: Request was successful
schema:
$ref: '#/definitions/Main'
deprecated: false
delete
:
tags
:
-
Main
summary
:
'
Delete
a
model
instance
by
{{id}}
from
the
data
source.'
operationId
:
Main.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
:
-
Main
summary
:
>-
Patch attributes for a model instance and persist it into the data
source.
operationId: Main.prototype.patchAttributes
parameters:
- name: id
in: path
description: Main 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/Main'
responses:
'200':
description: Request was successful
schema:
$ref: '#/definitions/Main'
deprecated: false
'
/Mains/{id}/replace'
:
post
:
tags
:
-
Main
summary
:
>-
Replace attributes for a model instance and persist it into the data
source.
operationId: 'Main.replaceById__post_Mains_{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/Main'
responses:
'200':
description: Request was successful
schema:
$ref: '#/definitions/Main'
deprecated: false
/Mains/findOne
:
get
:
tags
:
-
Main
summary
:
Find first instance of the model matched by filter from the data source.
operationId
:
Main.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/Main'
deprecated
:
false
/Mains/update
:
post
:
tags
:
-
Main
summary
:
'
Update
instances
of
the
model
matched
by
{{where}}
from
the
data
source.'
operationId
:
Main.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/Main'
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
/Mains/count
:
get
:
tags
:
-
Main
summary
:
Count instances of the model matched by where from the data source.
operationId
:
Main.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
:
definitions
:
DashboardHospitalAwenCount
:
DashboardHospitalAwenCount
:
properties
:
properties
:
...
@@ -20265,6 +20651,24 @@ definitions:
...
@@ -20265,6 +20651,24 @@ definitions:
type
:
number
type
:
number
format
:
double
format
:
double
additionalProperties
:
false
additionalProperties
:
false
Main
:
properties
:
id
:
maxLength
:
36
type
:
string
rpRegion
:
maxLength
:
65535
type
:
string
rpArea
:
maxLength
:
65535
type
:
string
clinicShortname
:
maxLength
:
65535
type
:
string
accrual
:
type
:
number
format
:
double
additionalProperties
:
false
basePath
:
/api/ruipeng
basePath
:
/api/ruipeng
swagger
:
'
2.0'
swagger
:
'
2.0'
info
:
info
:
...
...
This diff is collapsed.
Click to expand it.
server/model-config.json
View file @
e0c8dc48
...
@@ -212,5 +212,9 @@
...
@@ -212,5 +212,9 @@
"MainVrrevenue"
:
{
"MainVrrevenue"
:
{
"dataSource"
:
"ruipeng"
,
"dataSource"
:
"ruipeng"
,
"public"
:
true
"public"
:
true
},
"Main"
:
{
"dataSource"
:
"ruipeng"
,
"public"
:
true
}
}
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment