123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- /**
- * CardBatchValidate.php
- * User: ZhouBenXu
- * Date: 2024/6/27
- * Time: 上午9:54
- * Notes:
- */
- namespace app\admin\validate\card;
- use support\Validate;
- class CardBatchValidate extends Validate
- {
- protected $rule = [
- 'card_batch_id' => 'require', // 批次创建用户 user_id
- 'join_card_batch_user_id' => 'require', // 批次创建用户 user_id
- 'join_card_batch_category_id' => 'require', // 批次卡分类ID
- 'card_batch_status' => 'require', // 批次状态 CREATE=已创建|PRODUCTED=制作完成|ENABLED=启用|DISABLED=禁用
- 'card_batch_name' => 'require', // 卡批次名称
- 'card_batch_prefix' => 'require', // 卡批次前缀
- 'card_batch_suffix' => 'require', // 卡批次后缀
- 'card_batch_serial_begin' => 'require', // 卡批次序号起始
- 'card_batch_serial_end' => 'require', // 卡批次序号结束
- 'card_batch_amount' => 'require', // 卡批次面额
- 'card_batch_added' => 'require', // 卡批次增值赠送
- 'card_batch_validtimes' => 'require', // 卡批次有效期时间戳 0=永久 天
- 'validtimes_status' => 'require', // 修改时有效期状态 0 永久 1增加 2减少
- ];
- protected $message = [];
- protected $scene = [
- 'add' => ['join_card_batch_user_id', 'join_card_batch_category_id', 'card_batch_status', 'card_batch_name', 'card_batch_prefix', 'card_batch_suffix', 'card_batch_serial_begin', 'card_batch_serial_end', 'card_batch_amount', 'card_batch_added', 'card_batch_validtimes'],
- 'save' => ['join_card_batch_user_id','card_batch_id','validtimes_status','card_batch_name'],
- 'info' => [],
- 'changeStatus' => []
- ];
- }
|