1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace App\Models;
- use App\Models\BaseModel;
- /**
- * @description 内部设备名称
- * @author system;
- * @version 1.0
- * @date 2021-01-25 13:37:36
- *
- */
- class InnerDeviceNamesModel extends BaseModel
- {
- /**
- * 数据表名
- *
- * @var string
- *
- */
- 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();
- }
- }
|