<?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\Tabbar.
 *
 * @property int                             $id
 * @property string                          $name          名称
 * @property string                          $icon          图标
 * @property string                          $selected_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|Tabbar newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|Tabbar newQuery()
 * @method static \Illuminate\Database\Query\Builder|Tabbar onlyTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|Tabbar query()
 * @method static \Illuminate\Database\Eloquent\Builder|Tabbar whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Tabbar whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Tabbar whereIcon($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Tabbar whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Tabbar whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Tabbar whereSort($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Tabbar whereStatus($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Tabbar whereType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Tabbar whereUpdatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|Tabbar withTrashed()
 * @method static \Illuminate\Database\Query\Builder|Tabbar withoutTrashed()
 *
 * @mixin \Eloquent
 */
class Tabbar extends Model
{
    use HasDateTimeFormatter;
    use SoftDeletes;

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