care.facility.models.facility_flag module

class FacilityFlag(id, external_id, created_date, modified_date, deleted, flag, facility)

Bases: BaseFlag

facility

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

cache_key_template = 'facility_flag_cache:{entity_id}:{flag_name}'
all_flags_cache_key_template = 'facility_all_flags_cache:{entity_id}'
flag_type = 'FACILITY'
entity_field_name = 'facility'
classmethod check_facility_has_flag(facility_id: int, flag_name: FlagName) bool
classmethod get_all_flags(facility_id: int) tuple[FlagName]
exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

created_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

deleted

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

external_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

facility_id
flag

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

modified_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.