| 1234567891011121314151617181920212223242526272829303132333435363738394041 | 
							- <?php
 
- /**
 
-  * Created by PhpStorm.
 
-  * Author: NODELOG
 
-  * DateTime: 2017/3/8 17:34
 
-  * Description:
 
-  */
 
- namespace api\modules\v1\models;
 
- use api\common\models\User;
 
- class Notify extends \common\models\Notify
 
- {
 
-     public function fields()
 
-     {
 
-         return [
 
-             'from',
 
-             'to',
 
-             'title'
 
-         ];
 
-     }
 
-     public function extraFields()
 
-     {
 
-         return [
 
-             'content',
 
-         ];
 
-     }
 
-     public function getFrom()
 
-     {
 
-         return $this->hasOne(User::className(), ['id' => 'from_uid']);
 
-     }
 
-     public function getTo()
 
-     {
 
-         return $this->hasOne(User::className(), ['id' => 'to_uid']);
 
-     }
 
- }
 
 
  |