예제 #1
0
파일: Campaign.php 프로젝트: shayanyi/CRM
 public function relations()
 {
     return array_merge(parent::relations(), array('list' => array(self::BELONGS_TO, 'X2List', array('listId' => 'nameId')), 'attachments' => array(self::HAS_MANY, 'CampaignAttachment', 'campaign')));
 }
예제 #2
0
 /**
  * @return array relational rules.
  */
 public function relations()
 {
     return array_merge(parent::relations(), array('workflow' => array(self::BELONGS_TO, 'Workflow', 'workflowId'), 'workflowStage' => array(self::BELONGS_TO, 'WorkflowStage', 'stageNumber'), 'actionMetaData' => array(self::HAS_ONE, 'ActionMetaData', 'actionId'), 'actionText' => array(self::HAS_ONE, 'ActionText', 'actionId')));
 }
예제 #3
0
파일: Quote.php 프로젝트: dsyman2/X2CRM
 /**
  * @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_merge(parent::relations(), array('products' => array(self::HAS_MANY, 'QuoteProduct', 'quoteId', 'order' => 'lineNumber ASC'), 'contact' => array(self::BELONGS_TO, 'Contacts', array('associatedContacts' => 'nameId'))));
 }
예제 #4
0
파일: Product.php 프로젝트: dsyman2/X2CRM
 /**
  * @return array relational rules.
  */
 public function relations()
 {
     return array_merge(parent::relations(), array('order' => array(self::HAS_MANY, 'QuoteProduct', 'productId')));
 }
예제 #5
0
파일: Contacts.php 프로젝트: dsyman2/X2CRM
 /**
  * @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_merge(parent::relations(), array());
 }