@@ -57,6 +57,13 @@ class ActiveChoices(models.TextChoices):
57
57
HISTORICAL = False , _ ('Historical' )
58
58
59
59
60
+ class DemograohicDisaggregation (models .TextChoices ):
61
+ """
62
+ A class representing choices for demographic disaggregation.
63
+ """
64
+ pass # TODO: Add choices for demographic disaggregation or split into separate classes if needed. Should be discussed.
65
+
66
+
60
67
class SignalCategory (TimeStampedModel ):
61
68
"""
62
69
A model representing a signal category.
@@ -145,6 +152,66 @@ def __str__(self) -> str:
145
152
return str (self .name )
146
153
147
154
155
+ class GeographicScope (TimeStampedModel ): # TODO: Requirements for this model are not clear. Need to be discussed.
156
+ """
157
+ A model representing a geographic scope.
158
+ """
159
+ name : models .CharField = models .CharField (
160
+ help_text = _ ('Name' ),
161
+ max_length = 128 ,
162
+ unique = True
163
+ )
164
+
165
+ def __str__ (self ) -> str :
166
+ """
167
+ Returns the name of the geographic scope as a string.
168
+
169
+ :return: The name of the geographic scope as a string.
170
+ :rtype: str
171
+ """
172
+ return str (self .name )
173
+
174
+
175
+ class DemograficScope (TimeStampedModel ):
176
+ """
177
+ A model representing a demographic scope.
178
+ """
179
+ name : models .CharField = models .CharField (
180
+ help_text = _ ('Name' ),
181
+ max_length = 128 ,
182
+ unique = True
183
+ )
184
+
185
+ def __str__ (self ) -> str :
186
+ """
187
+ Returns the name of the demographic scope as a string.
188
+
189
+ :return: The name of the demographic scope as a string.
190
+ :rtype: str
191
+ """
192
+ return str (self .name )
193
+
194
+
195
+ class OrganisationsAccess (TimeStampedModel ): # TODO: Requirements for this model are not clear. Need to be discussed.
196
+ """
197
+ A model representing an access list.
198
+ """
199
+ organisation_name : models .CharField = models .CharField (
200
+ help_text = _ ('Organisation Name' ),
201
+ max_length = 128 ,
202
+ )
203
+
204
+
205
+ class SharingOrganisation (TimeStampedModel ): # TODO: Requirements for this model are not clear. Need to be discussed.
206
+ """
207
+ A model representing a sharing organisation.
208
+ """
209
+ organisation_name : models .CharField = models .CharField (
210
+ help_text = _ ('Organisation Name' ),
211
+ max_length = 128 ,
212
+ )
213
+
214
+
148
215
class Signal (TimeStampedModel ):
149
216
"""
150
217
A model representing a signal.
@@ -206,6 +273,21 @@ class Signal(TimeStampedModel):
206
273
max_length = 128 ,
207
274
choices = TimeLabelChoices .choices
208
275
)
276
+ reporting_cadence : models .CharField = models .CharField (
277
+ help_text = _ ('Reporting Cadence' ),
278
+ max_length = 128 ,
279
+ choices = ReportingCadence .choices
280
+ )
281
+ demographic_scope : models .ManyToManyField = models .ManyToManyField (
282
+ 'signals.DemograficScope' ,
283
+ related_name = 'signals' ,
284
+ help_text = _ ('Demographic Scope' )
285
+ )
286
+ demographic_disaggregation : models .CharField = models .CharField ( # TODO: Choices for this field are not clear. Need to be discussed.
287
+ help_text = _ ('Demographic Disaggregation' ),
288
+ max_length = 128 ,
289
+ choices = DemograohicDisaggregation .choices
290
+ )
209
291
category : models .ForeignKey = models .ForeignKey (
210
292
'signals.SignalCategory' ,
211
293
related_name = 'signals' ,
@@ -253,6 +335,26 @@ class Signal(TimeStampedModel):
253
335
help_text = _ ('Source Subdivision' ),
254
336
on_delete = models .PROTECT ,
255
337
)
338
+ data_censoring : models .TextField = models .TextField (
339
+ help_text = _ ('Data Censoring' ),
340
+ null = True ,
341
+ blank = True
342
+ )
343
+ missingness : models .TextField = models .TextField (
344
+ help_text = _ ('Missingness' ),
345
+ null = True ,
346
+ blank = True
347
+ )
348
+ organisations_access_list : models .ManyToManyField = models .ManyToManyField ( # TODO: Requirements for this field are not clear. Need to be discussed.
349
+ 'signals.OrganisationsAccess' ,
350
+ help_text = _ ('Organisations Access List' )
351
+ )
352
+
353
+ organisations_sharing_list : models .ManyToManyField = models .ManyToManyField ( # TODO: Requirements for this field are not clear. Need to be discussed.
354
+ 'signals.SharingOrganisation' ,
355
+ help_text = _ ('Organisations Sharing List' )
356
+ )
357
+
256
358
last_updated : models .DateField = models .DateField (
257
359
help_text = _ ('Last Updated' ),
258
360
null = True ,
0 commit comments