<?php
namespace app\api\validate;


use app\common\validate\BaseValidate;


/**
 * UserAddress验证器
 * Class UserAddressValidate
 * @package app\api\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']);
    }

}