<?php
namespace App\Models;
use App\Models\BaseModel;
/**
 *  @description 消息列表
 *  @author  system;
 *  @version    1.0
 *  @date 2017-06-30 10:16:20
 *
 */
class SystemInfoModel extends BaseModel
{
    /**
     * 数据表名
     *
     * @var string
     *
     */
    protected $table = 'system_info';
    /**
    主键
     */
    protected $primaryKey = 'id';

    //分页
    protected $perPage = PAGE_NUMS;

    /**
     * 可以被集体附值的表的字段
     *
     * @var string
     */
    protected $fillable = [
                           'user_id',
                           'message'
                          ];

    public function user()
    {
        return $this->hasOne('App\Models\UserInfoModel','id','user_id');
    }
}