@@ -1177,6 +1177,27 @@ class Tenant:
11771177 tenant_filter_field : str = "__all__"
11781178
11791179
1180+ class Facility (HopeModel ):
1181+ id = models .UUIDField (primary_key = True )
1182+ created_at = models .DateTimeField (null = True )
1183+ updated_at = models .DateTimeField (null = True )
1184+ name = models .CharField (max_length = 255 , null = True )
1185+ admin_area = models .ForeignKey (Area , on_delete = models .DO_NOTHING , related_name = "facility_admin_area" , null = True )
1186+ business_area = models .ForeignKey (
1187+ BusinessArea , on_delete = models .DO_NOTHING , related_name = "facility_business_area" , null = True
1188+ )
1189+
1190+ class Meta :
1191+ managed = False
1192+ db_table = "household_facility"
1193+
1194+ class Tenant :
1195+ tenant_filter_field : str = "__all__"
1196+
1197+ def __str__ (self ) -> str :
1198+ return str (self .name )
1199+
1200+
11801201class Household (HopeModel ):
11811202 id = models .UUIDField (primary_key = True )
11821203 rdi_merge_status = models .CharField (max_length = 10 , null = True )
@@ -1300,6 +1321,9 @@ class Household(HopeModel):
13001321 longitude = models .FloatField (blank = True , null = True )
13011322 identification_key = models .CharField (max_length = 255 , blank = True , null = True )
13021323 originating_id = models .CharField (unique = True , max_length = 150 , blank = True , null = True )
1324+ facility = models .ForeignKey (
1325+ Facility , on_delete = models .DO_NOTHING , related_name = "household_facility" , blank = True , null = True
1326+ )
13031327
13041328 class Meta :
13051329 managed = False
@@ -1922,6 +1946,7 @@ class Payment(HopeModel):
19221946 )
19231947 extras = models .JSONField (null = True )
19241948 sent_to_fsp_date = models .DateTimeField (blank = True , null = True )
1949+ collector_type = models .CharField (max_length = 120 , null = True )
19251950
19261951 class Meta :
19271952 managed = False
@@ -2281,7 +2306,6 @@ class Program(HopeModel):
22812306 is_visible = models .BooleanField (null = True )
22822307 household_count = models .IntegerField (null = True )
22832308 individual_count = models .IntegerField (null = True )
2284- programme_code = models .CharField (max_length = 4 , blank = True , null = True )
22852309 partner_access = models .CharField (max_length = 50 , null = True )
22862310 biometric_deduplication_enabled = models .BooleanField (null = True )
22872311 business_area = models .ForeignKey (
@@ -2294,7 +2318,7 @@ class Program(HopeModel):
22942318 Beneficiarygroup , on_delete = models .DO_NOTHING , related_name = "program_beneficiary_group" , null = True
22952319 )
22962320 collision_detector = models .CharField (max_length = 200 , null = True )
2297- slug = models .CharField (max_length = 4 , null = True )
2321+ code = models .CharField (max_length = 4 , null = True )
22982322 reconciliation_window_in_days = models .IntegerField (null = True )
22992323 send_reconciliation_window_expiry_notifications = models .BooleanField (null = True )
23002324 identification_key_individual_label = models .CharField (max_length = 255 , blank = True , null = True )
@@ -2755,6 +2779,7 @@ class Targetingcriteriarule(HopeModel):
27552779 payment_plan = models .ForeignKey (
27562780 PaymentPlan , on_delete = models .DO_NOTHING , related_name = "targetingcriteriarule_payment_plan" , null = True
27572781 )
2782+ alternative_collectors_ids = models .TextField (null = True )
27582783
27592784 class Meta :
27602785 managed = False
0 commit comments