예제 #1
0
파일: Note.php 프로젝트: jslight/helpdesk
 /**
  * @return AttachmentQuery
  */
 public function getAttachment()
 {
     return $this->hasOne(Attachment::className(), ['note_id' => 'id'])->inverseOf('note');
 }
예제 #2
0
파일: Goods.php 프로젝트: cboy868/nana
 public function getAttach()
 {
     return $this->hasOne(Attachment::className(), ['id' => 'cover']);
 }