<?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\user;


use app\common\validate\BaseValidate;


/**
 * UserAddress验证器
 * Class UserAddressValidate
 * @package app\adminapi\validate\user
 */
class UserAddressValidate extends BaseValidate
{

     /**
      * 设置校验规则
      * @var string[]
      */
    protected $rule = [
        'id' => 'require',
        'user_id' => 'require',
        'area' => 'require',
        'address' => 'require',
        'house_number' => 'require',
        'contact_number' => 'require',
        'contact_people' => 'require',

    ];


    /**
     * 参数描述
     * @var string[]
     */
    protected $field = [
        'id' => 'id',
        'user_id' => '用户ID',
        'area' => '城市',
        'address' => '具体地址',
        'house_number' => '门牌号',
        'contact_number' => '联系号码',
        'contact_people' => '联系人',

    ];


    /**
     * @notes 添加场景
     * @return UserAddressValidate
     * @author likeadmin
     * @date 2024/07/18 13:51
     */
    public function sceneAdd()
    {
        return $this->only(['user_id','area','address','house_number','contact_number','contact_people']);
    }


    /**
     * @notes 编辑场景
     * @return UserAddressValidate
     * @author likeadmin
     * @date 2024/07/18 13:51
     */
    public function sceneEdit()
    {
        return $this->only(['id','user_id','area','address','house_number','contact_number','contact_people']);
    }


    /**
     * @notes 删除场景
     * @return UserAddressValidate
     * @author likeadmin
     * @date 2024/07/18 13:51
     */
    public function sceneDelete()
    {
        return $this->only(['id']);
    }


    /**
     * @notes 详情场景
     * @return UserAddressValidate
     * @author likeadmin
     * @date 2024/07/18 13:51
     */
    public function sceneDetail()
    {
        return $this->only(['id']);
    }

}