<?php

namespace app\admin\validate\life;

use support\Validate;

class CinemaValidate extends Validate
{
    protected $rule = [
        'cinema_id' => 'integer',
        'cinema_name|名称' => 'max:255',
        'cinema_img|图片' => 'url',
        'cinema_video|视频' => 'url',
        'cinema_price|价格' => 'float',
        'cinema_seat|座位数量' => 'integer',
        'cinema_join|已预订数量' => 'integer',
        'cinema_length|时长' => 'integer',
        'cinema_week|上映时间' => 'integer',
        'cinema_time' => '',
//        'cinema_label' => 'regex:/^[0-9\,]+$/',
//        'cinema_mold' => 'regex:/^[0-9\,]+$/',
//        'cinema_director' => 'integer',
//        'cinema_star' => 'regex:/^[0-9\,]+$/',
//        'cinema_introduction' => 'chsDash',
//        'cinema_performers' => 'regex:/^[0-9\,]+$/',
        'cinema_is_del' => 'integer',
        'cinema_status' => 'integer',
    ];

    protected $message = [];

    protected $scene = [
        'add' => ['cinema_name', 'cinema_img', 'cinema_video', 'cinema_price', 'cinema_seat', 'cinema_join', 'cinema_length', 'cinema_week', 'cinema_label', 'cinema_director', 'cinema_star', 'cinema_introduction', 'cinema_performers'],
        'update' => ['cinema_name', 'cinema_img', 'cinema_video', 'cinema_price', 'cinema_seat', 'cinema_join', 'cinema_length', 'cinema_week', 'cinema_label', 'cinema_director', 'cinema_star', 'cinema_introduction', 'cinema_performers'],

    ];
}