-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathi_tabbed_forms.js
More file actions
29 lines (25 loc) · 1020 Bytes
/
i_tabbed_forms.js
File metadata and controls
29 lines (25 loc) · 1020 Bytes
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
import mongoose from 'mongoose';
var Schema = mongoose.Schema;
var ISchema = new Schema({
surname: {type: String, required: true, list: {}, form: {tab: 'first'}, index: true},
forename: {type: String, list: true, form: {tab: 'first'}},
address: {
line1: {type: String, form: {label: 'Address', tab: 'first'}},
line2: {type: String, form: {label: null, tab: 'first'}},
line3: {type: String, form: {label: null, tab: 'first'}},
town: {type: String, form: {label: 'Town', tab: 'first'}},
postcode: {type: String, form: {label: 'Postcode', tab: 'first'}}
},
weight: {type: Number, form: {label: 'Weight (lbs)', tab: 'second'}},
dateOfBirth: {type: Date, form: {tab: 'second'}},
accepted: {type: Boolean, form: {tab: 'second'}},
interviewScore: {type: Number, form: {tab: 'second'}, list: {}},
freeText: {type: String, form: {type: 'textarea', rows: 5, tab: 'second'}}
});
var I;
try {
I = mongoose.model('I');
} catch (e) {
I = mongoose.model('I', ISchema);
}
export default I;