OphDrPrescription_Item::relations PHP Method

relations() public method

public relations ( ) : array
return 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('tapers' => array(self::HAS_MANY, 'OphDrPrescription_ItemTaper', 'item_id'), 'prescription' => array(self::BELONGS_TO, 'Element_OphDrPrescription_Details', 'prescription_id'), 'duration' => array(self::BELONGS_TO, 'DrugDuration', 'duration_id'), 'frequency' => array(self::BELONGS_TO, 'DrugFrequency', 'frequency_id'), 'route' => array(self::BELONGS_TO, 'DrugRoute', 'route_id'), 'route_option' => array(self::BELONGS_TO, 'DrugRouteOption', 'route_option_id'), 'user' => array(self::BELONGS_TO, 'User', 'created_user_id'), 'usermodified' => array(self::BELONGS_TO, 'User', 'last_modified_user_id'), 'drug' => array(self::BELONGS_TO, 'Drug', 'drug_id'));
    }