| Total Complexity | 3 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 8 | class Comment extends Model |
||
| 9 | { |
||
| 10 | public static $listField = [ |
||
| 11 | 'pid' => ['title' => '父ID', 'width' => 80], |
||
| 12 | 'entityName' => ['title' => '模型', 'width' => 100], |
||
| 13 | 'userName' => ['title' => '用户名', 'width' => 100], |
||
| 14 | 'content' => ['title' => '内容', 'width' => 400], |
||
| 15 | 'reply_count' => ['title' => '回复数', 'width' => 80, 'sort' => true], |
||
| 16 | 'like' => ['title' => '喜欢', 'width' => 80, 'sort' => true], |
||
| 17 | 'dislike' => ['title' => '不喜欢', 'width' => 80, 'sort' => true], |
||
| 18 | ]; |
||
| 19 | |||
| 20 | public static $searchField = [ |
||
| 21 | 'content' => '内容', |
||
| 22 | ]; |
||
| 23 | |||
| 24 | const STATUS_ENABLE = 1; |
||
| 25 | const STATUS_DISABLE = 0; |
||
| 26 | |||
| 27 | const ADMIN_YES = 1; |
||
| 28 | const ADMIN_NO = 0; |
||
| 29 | |||
| 30 | protected $guarded = []; |
||
| 31 | |||
| 32 | public function user() |
||
| 33 | { |
||
| 34 | return $this->belongsTo('App\Model\Admin\User', 'user_id'); |
||
| 35 | } |
||
| 36 | |||
| 37 | public function replyUser() |
||
| 40 | } |
||
| 41 | |||
| 42 | public function entity() |
||
| 45 | } |
||
| 46 | } |
||
| 47 |