<?php

namespace App\Models;

use Illuminate\Database\Eloquent\SoftDeletes;
use Slowlyo\OwlAdmin\Models\BaseModel as Model;

/**
 * 代理商项目分类
 */
class AgentProjectCate extends Model
{
	use SoftDeletes;

	protected $table = 'agent_project_cate';

    /**
     * @Author FelixYin
     * @description 代理商项目分类所属系统项目分类
     */
    public function parentCate()
    {
        return $this->belongsTo('App\Models\ProjectCate', 'cate_id');
    }

    /**
     * @Author FelixYin
     * @description 代理商项目分类包含服务项目
     */
    public function projects()
    {
        return $this->hasMany('App\Models\AgentProject', 'cate_id', 'id');
    }
}