<?php

namespace app\workerapi\validate\shops;

use app\common\validate\BaseValidate;

class ShopAddressValidate extends BaseValidate
{
    protected $rule = [
        'id' => 'require',
        'worker_id' => 'require',
        'area' => 'require',
        'address' => 'require',
        'house_number' => 'require',
        'contact_number' => 'require',
        'contact_people' => 'require',

    ];

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

    public function sceneAdd()
    {
        return $this->only(['worker_id','area','address','house_number','contact_number','contact_people']);
    }

    public function sceneEdit()
    {
        return $this->only(['id','worker_id','area','address','house_number','contact_number','contact_people']);
    }

    public function sceneDelete()
    {
        return $this->only(['id']);
    }

    /**
     * 获取场景详细信息
     *
     * 此方法主要用于获取当前场景的唯一标识符
     * 它通过仅暴露场景ID来限制返回的信息量，以满足特定需求
     *
     * @return array 包含场景ID的数组
     */
    public function sceneDetail()
    {
        return $this->only(['id']);
    }
}