<?php
namespace app\admin\validate\medical;

use think\Validate;

class SubjectValidate extends Validate
{
    protected $rule =   [
        'subject_id'             => 'require',
        'subject_pid'            => 'require',
        'subject_name'           => 'require',
        'subject_type'           => 'require',
    ];

    protected $message  =   [
        'subject_id.require'          => '预约科目ID不能为空',
        'subject_pid.require'          => '父级ID不能为空',
        'subject_name.require'         => '预约科目名称不能为空',
        'subject_type.require'         => '门诊类型不能为空',
    ];

    //场景
    protected $scene = [
        'add'           => ['subject_pid','subject_name','subject_type'],
        'info'          => ['subject_id'],
        'update'        => ['subject_id']
    ];
}
