<?php

namespace App\Models;

use Illuminate\Database\Eloquent\SoftDeletes;

class GoodsType extends Model
{
    use SoftDeletes;
    /**
     * 数组中的属性会被隐藏。
     *
     * @var array
     */
    protected $hidden = ['deleted_at'];

    public function parentType()
    {
        return $this->hasOne(GoodsType::class, 'id', 'parent_id');
    }
}
