@@ -80,6 +80,16 @@ def format_iso8601(self, dt):
80
80
'contacts' : fields .List (fields .Nested (a_contact , description = 'A list of persons to contact about the event' ))
81
81
})
82
82
83
+ registration_method = api .model ('Registration Method' , {
84
+ 'type' : fields .String (description = 'The means of registration' , enum = ['online' , 'ontheday' ], default = 'ontheday' ),
85
+ 'url' : fields .String (description = 'Online registration URL or registration status change notification' , example = 'http://www.signup.com/thebeggs18' ),
86
+ 'state' : fields .String (description = 'Can competitors register for the event?' , enum = ['open' , 'limited' , 'closed' ], default = 'open' )
87
+ })
88
+
89
+ registration = api .model ('Registration' , {
90
+ 'methods' : fields .List (fields .Nested (registration_method , description = 'A way to register for an event' ))
91
+ })
92
+
83
93
an_event = api .model ('Base Event' , {
84
94
'id' : fields .Integer (description = 'The unique identifier of an event (internal)' , readonly = True ),
85
95
'title' : fields .String (required = True , description = 'The name of the event as promoted publically' , example = 'The John Beggs Memorial' ),
@@ -90,7 +100,8 @@ def format_iso8601(self, dt):
90
100
'event_type' : fields .String (required = True ,description = 'Is the event a road race, time trial, etc?' , enum = ['road race' , 'time trial' , 'hill climb' , 'criterium' , 'stage race' ], default = 'road race' ),
91
101
'status' : fields .Nested (event_status , description = 'Records any schedule changes. If absent assume event is still scheduled normally' ),
92
102
'organised_by' : fields .Nested (organisers , description = 'Group (club and persons) organising the event' ),
93
- 'social_media' : fields .Nested (social_media , description = 'Where to follow the event on social media' )
103
+ 'social_media' : fields .Nested (social_media , description = 'Where to follow the event on social media' ),
104
+ 'registration' : fields .Nested (registration , description = 'Event registration information' )
94
105
})
95
106
96
107
one_day_event = api .inherit ('One Day Event' , an_event , {
0 commit comments