示例#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']);
 }