<?php

namespace App\Models;

use App\Models\BaseModel;

/**
 * @description 咨询列表
 * @author  system;
 * @version    1.0
 * @date 2018-05-24 11:11:11
 *
 */
class AlbumNewsModel extends BaseModel
{
    /**
     * 数据表名
     *
     * @var string
     *
     */
    protected $table = 'album_news';
    /**
     * 主键
     */
    protected $primaryKey = 'id';

    //分页
    protected $perPage = PAGE_NUMS;

    /**
     * 可以被集体附值的表的字段
     *
     * @var string
     */
    protected $fillable = [
        'store_id',
        'title',
        'content',
        'sort',
        'thumb'
    ];

    public function comments()
    {
        return $this->hasMany('App\Models\AlbumCommentsModel', '_id', 'id');
    }

}