-
Notifications
You must be signed in to change notification settings - Fork 33
/
Pet.js
48 lines (42 loc) · 763 Bytes
/
Pet.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
* Pet.js
*
* @description :: TODO: You might write a short summary of how this model works and what it represents here.
* @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models
*/
/**
* @swagger
*
* /create:
* exclude: true
*
*/
module.exports = {
primaryKey: 'petID',
attributes: {
petID: {
type: 'number',
autoIncrement: true,
meta: {
swagger: { readOnly: true }
}
},
names: {
type: 'string',
required: true,
example: 'Pet\'s full name'
},
_internalField: {
type: 'string',
meta: {
swagger: { exclude: true }
}
},
owner: {
model: 'User',
},
caredForBy: {
model: 'User',
},
},
};