1 | const stringSchema = require('./string');
|
2 |
|
3 | module.exports = {
|
4 | type: 'object',
|
5 | requied: ['date', 'timePeriod'],
|
6 | properties: {
|
7 | date: {
|
8 | type: 'string',
|
9 | format: 'date'
|
10 | },
|
11 | timePeriod: {
|
12 | type: 'array',
|
13 | items: {
|
14 | type: 'object',
|
15 | required: ['from', 'to', '_id', 'status'],
|
16 | properties: {
|
17 | from: {
|
18 | type: 'string',
|
19 | format: 'time'
|
20 | },
|
21 | to: {
|
22 | type: 'string',
|
23 | format: 'time'
|
24 | },
|
25 | _id: {
|
26 | type: 'string',
|
27 | format: 'uuid'
|
28 | },
|
29 | status: {
|
30 | type: 'integer'
|
31 | }
|
32 | }
|
33 | }
|
34 | }
|
35 | }
|
36 | };
|