<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台（PHP版）
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码，建议反馈是我们前进的动力
// | 开源版本可自由商用，可去除界面版权logo
// | gitee下载：https://gitee.com/likeshop_gitee/likeadmin
// | github下载：https://github.com/likeshop-github/likeadmin
// | 访问官网：https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------

namespace app\adminapi\validate\tenant;


use app\common\validate\BaseValidate;


/**
 * TenantRegister验证器
 * Class TenantRegisterValidate
 * @package app\adminapi\validate
 */
class TenantRegisterValidate extends BaseValidate
{

     /**
      * 设置校验规则
      * @var string[]
      */
    protected $rule = [
        'id' => 'require',
        'name' => 'require',
        'head_name' => 'require',
        'mobile' => 'require',
        'door_images' => 'require',
        'business_images' => 'require',
        'city' => 'require',
        'area_name' => 'require',
        'lon' => 'require',
        'lat' => 'require',
        'sale_id' => 'require',
        'openid' => 'require',
    ];

    /**
     * 参数描述
     * @var string[]
     */
    protected $field = [
        'id' => 'id',
        'name' => '门店名称',
        'head_name' => '负责人名称',
        'mobile' => '电话',
        'door_images' => '门头照片',
        'business_images' => '营业执照',
        'city' => '城市',
        'area_name' => '地区名称',
        'lon' => '经度',
        'lat' => '维度',
        'sale_id' => '所属销售id',
        'openid' => '微信openid',
    ];


    /**
     * @notes 添加场景
     * @return TenantRegisterValidate
     * @author likeadmin
     * @date 2025/02/25 09:29
     */
    public function sceneAdd()
    {
        return $this->only(['name','head_name','mobile','city','lon','lat','sale_id']);
    }
    public function sceneApiAdd()
    {
        return $this->only(['name','head_name','mobile','business_images','city','area_name','lon','lat','sale_id','openid']);
    }

    /**
     * @notes 编辑场景
     * @return TenantRegisterValidate
     * @author likeadmin
     * @date 2025/02/25 09:29
     */
    public function sceneEdit()
    {
        return $this->only(['id','name','head_name','mobile','city','lon','lat','sale_id']);
    }


    /**
     * @notes 删除场景
     * @return TenantRegisterValidate
     * @author likeadmin
     * @date 2025/02/25 09:29
     */
    public function sceneDelete()
    {
        return $this->only(['id']);
    }


    /**
     * @notes 详情场景
     * @return TenantRegisterValidate
     * @author likeadmin
     * @date 2025/02/25 09:29
     */
    public function sceneDetail()
    {
        return $this->only(['id']);
    }

}