<?php

namespace app\admin\validate\life;

use support\Validate;

class FarmPackageGoodsValidate extends Validate
{
    protected $rule = [
        'goods_id' => 'require|integer',
        'goods_package_id' => 'require|integer',
        'goods_name' => 'require',
        'goods_num' => 'require',
        'goods_price' => 'require|float',
        'goods_sort' => 'integer',
    ];

    protected $message = [];

    protected $scene = [
        'add' => ['goods_package_id', 'goods_name', 'goods_num', 'goods_price', 'goods_sort'],
        'update' => ['goods_id', 'goods_package_id', 'goods_name', 'goods_num', 'goods_price', 'goods_sort'],
    ];
}