123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?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();
- }
- }
|