<?php

namespace app\admin\validate\life;

use support\Validate;

class CollegeCoursesValidate extends Validate
{
    protected $rule = [
        'courses_id' => 'require|integer',
        'courses_name|名称' => 'require',
        'courses_img|图片' => 'url',
        'courses_introduction|简介' => 'require',
        'courses_type|类型' => 'integer',
//        'courses_time' => '',
//        'courses_long'=>'',
//        'courses_week' => 'integer',
        'courses_category_id|关联分类' => 'require|integer',
        'courses_teacher_id|关联老师' => 'require|integer',
        'courses_num|上课人数' => 'require|integer',
        'courses_join_num|参与人数' => 'integer',
//        'courses_label' => 'chsDash',
        'courses_status|状态' => 'integer',
        'courses_is_del' => 'integer'
    ];

    protected $message = [];

    protected $scene = [
        'add' => ['courses_name', 'courses_img', 'courses_introduction', 'courses_type', 'courses_time', 'courses_week', 'courses_category_id', 'courses_teacher_id', 'courses_num', 'courses_join_num', 'courses_label', 'courses_status', 'courses_is_del'],
        'update' => ['courses_id', 'courses_name', 'courses_img', 'courses_introduction', 'courses_type', 'courses_time', 'courses_week', 'courses_category_id', 'courses_teacher_id', 'courses_num', 'courses_join_num', 'courses_label', 'courses_status', 'courses_is_del']
    ];
}