-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathLevel.ts
37 lines (32 loc) · 1.13 KB
/
Level.ts
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
import { t } from 'ttag';
import SimpleSchema from 'simpl-schema';
import './SimpleSchemaExtensions';
import { LocalizedStringSchema, LocalizedString } from './LocalizedString';
export interface Level {
/**
* Name of the level
*/
name?: LocalizedString;
/**
* Index of the level
*/
index?: Number;
}
export const LevelSchema = new SimpleSchema({
name: {
type: LocalizedStringSchema,
label: t`Level Name`,
optional: true,
accessibility: {
question: t`Optional name of the level (matching level lettering/numbering used inside the structure). Is useful for elevator routing (e.g. “take the elevator to level ‘Rooftop terrace’ or ‘Platforms’ or ‘-1’”).`
}
},
index: {
type: Number,
optional: true,
accessibility: {
question: t`Numeric index of the level that indicates relative position of this level in relation to other levels (levels with higher indices are assumed to be located above levels with lower indices).
Ground level should have index 0, with levels above ground indicated by positive indices and levels below ground by negative indices.`
}
}
});