<?php

declare(strict_types=1);

namespace app\admin\validate;

use think\Validate;

class MallPointsLog extends Validate
{
    protected $failException = true;

    protected $rule = [
        'user_asset_id' => 'require|integer|gt:0',
        'score_value'   => 'require|integer|notIn:0',
    ];

    protected $scene = [
        'add' => ['user_asset_id', 'score_value'],
    ];

    public function __construct()
    {
        $this->field = [
            'user_asset_id' => __('User asset'),
            'score_value'   => __('Points adjustment'),
        ];
        parent::__construct();
    }
}
