<?php

declare(strict_types=1);

namespace app\admin\validate;

use think\Validate;

class UserScoreLog extends Validate
{
    protected $failException = true;

    protected $rule = [
        'user_id' => 'require',
        'score'   => 'require',
        'memo'    => 'require',
    ];

    protected $message = [];

    protected $field = [];

    protected $scene = [
        'add'  => ['user_id', 'score', 'memo'],
        'edit' => ['user_id', 'score', 'memo'],
    ];

    public function __construct()
    {
        $this->field = [
            'user_id' => __('user_id'),
            'score'   => __('score'),
            'memo'    => __('memo'),
        ];
        parent::__construct();
    }
}
