Element_OphTrOperationbooking_Operation::relations PHP Méthode

relations() public méthode

public relations ( ) : array
Résultat array relational rules.
    public function relations()
    {
        // NOTE: you may need to adjust the relation name and the related
        // class name for the relations automatically generated below.
        return array('element_type' => array(self::HAS_ONE, 'ElementType', 'id', 'on' => "element_type.class_name='" . get_class($this) . "'"), 'eventType' => array(self::BELONGS_TO, 'EventType', 'event_type_id'), 'event' => array(self::BELONGS_TO, 'Event', 'event_id'), 'op_user' => array(self::BELONGS_TO, 'User', 'created_user_id'), 'op_usermodified' => array(self::BELONGS_TO, 'User', 'last_modified_user_id'), 'eye' => array(self::BELONGS_TO, 'Eye', 'eye_id'), 'procedureItems' => array(self::HAS_MANY, 'OphTrOperationbooking_Operation_Procedures', 'element_id'), 'procedures' => array(self::MANY_MANY, 'Procedure', 'ophtroperationbooking_operation_procedures_procedures(element_id, proc_id)'), 'anaesthetic_type' => array(self::BELONGS_TO, 'AnaestheticType', 'anaesthetic_type_id'), 'anaesthetic_choice' => array(self::BELONGS_TO, 'OphTrOperationbooking_Anaesthetic_Choice', 'anaesthetic_choice_id'), 'site' => array(self::BELONGS_TO, 'Site', 'site_id'), 'priority' => array(self::BELONGS_TO, 'OphTrOperationbooking_Operation_Priority', 'priority_id'), 'status' => array(self::BELONGS_TO, 'OphTrOperationbooking_Operation_Status', 'status_id'), 'date_letter_sent' => array(self::HAS_ONE, 'OphTrOperationbooking_Operation_Date_Letter_Sent', 'element_id', 'order' => 'date_letter_sent.id DESC'), 'cancellation_user' => array(self::BELONGS_TO, 'User', 'cancellation_user_id'), 'cancellation_reason' => array(self::BELONGS_TO, 'OphTrOperationbooking_Operation_Cancellation_Reason', 'cancellation_reason_id'), 'cancelledBookings' => array(self::HAS_MANY, 'OphTrOperationbooking_Operation_Booking', 'element_id', 'condition' => 'booking_cancellation_date is not null', 'order' => 'booking_cancellation_date'), 'booking' => array(self::HAS_ONE, 'OphTrOperationbooking_Operation_Booking', 'element_id', 'condition' => 'booking_cancellation_date is null'), 'cancelledBooking' => array(self::HAS_ONE, 'OphTrOperationbooking_Operation_Booking', 'element_id', 'condition' => 'booking_cancellation_date is not null'), 'latestBooking' => array(self::BELONGS_TO, 'OphTrOperationbooking_Operation_Booking', 'latest_booking_id'), 'firstBooking' => array(self::HAS_ONE, 'OphTrOperationbooking_Operation_Booking', 'element_id', 'order' => 'created_date ASC'), 'allBookings' => array(self::HAS_MANY, 'OphTrOperationbooking_Operation_Booking', 'element_id'), 'referral' => array(self::BELONGS_TO, 'Referral', 'referral_id'), 'fixed_rtt' => array(self::BELONGS_TO, 'RTT', 'rtt_id'), 'organising_admission_user' => array(self::BELONGS_TO, 'User', 'organising_admission_user_id'), 'consultant' => array(self::BELONGS_TO, 'User', 'named_consultant_id'));
    }