-
Notifications
You must be signed in to change notification settings - Fork 1
/
place.coffee
45 lines (36 loc) · 851 Bytes
/
place.coffee
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
Schemas = {}
@Places = new Mongo.Collection("places");
Schemas.Place = new SimpleSchema
name:
type: String
label: "Nome"
max: 200
optional: false
summary:
type: String
label: "Descrição"
optional: true
max: 1000
user:
type: String
optional: false
autoValue: -> this.userId
location:
type: String
autoform:
type: 'map'
afFieldInput:
geolocation: true
searchBox: true
autolocate: true
googleMap:
zoom: 8
'location.lat':
type: String
'location.lng':
type: String
createDate:
type: Date,
optional: false,
autoValue: -> new Date()
Places.attachSchema(Schemas.Place)