<?php

namespace App\Models;

use App\Casts\HttpToHttps;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\NavBar.
 *
 * @property int                             $id
 * @property string                          $name       名称
 * @property string                          $icon       图标
 * @property int                             $sort       排序
 * @property int                             $type       类型
 * @property int                             $status     是否启用
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property \Illuminate\Support\Carbon|null $deleted_at
 * @property \Illuminate\Support\Carbon|null $created_at
 *
 * @method static \Illuminate\Database\Eloquent\Builder|NavBar newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|NavBar newQuery()
 * @method static \Illuminate\Database\Query\Builder|NavBar onlyTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|NavBar query()
 * @method static \Illuminate\Database\Eloquent\Builder|NavBar whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|NavBar whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|NavBar whereIcon($value)
 * @method static \Illuminate\Database\Eloquent\Builder|NavBar whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|NavBar whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|NavBar whereSort($value)
 * @method static \Illuminate\Database\Eloquent\Builder|NavBar whereStatus($value)
 * @method static \Illuminate\Database\Eloquent\Builder|NavBar whereType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|NavBar whereUpdatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|NavBar withTrashed()
 * @method static \Illuminate\Database\Query\Builder|NavBar withoutTrashed()
 *
 * @mixin \Eloquent
 */
class NavBar extends Model
{
    use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'nav_bars';

    protected $casts = [
        'icon' => HttpToHttps::class,
    ];
}
