<?php
namespace App\Models;
use App\Models\BaseModel;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
 *  @description 内部设备名称
 *  @author  system;
 *  @version    1.0
 *  @date 2021-01-25 13:37:36
 *
 */
class InnerDeviceNamesModel extends BaseModel
{
    /**
     * 数据表名
     *
     * @var string
     *
     */
    use SoftDeletes;
    protected $table = 'inner_device_names';
    /**
    主键
     */
    protected $primaryKey = 'id';

    //分页
    protected $perPage = PAGE_NUMS;

    /**
     * 可以被集体附值的表的字段
     *
     * @var string
     */
    protected $fillable = [
                           'name',
                           'sort',
                           'status'
                          ];
    public static function getOptions(){
            return self::where('id', '>', 0)->orderBy('sort')->get()->toArray();
    }

}