12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace addons\qingdongams\validate;
- use think\Validate;
- class Quote extends Validate {
- /**
- * 验证规则
- */
- protected $rule = [
- 'create_staff_id' => 'number',
- 'number' => 'max:50',
- 'contacts_id' => 'number',
- 'customer_id' => 'number',
- 'quote_date' => 'max:50',
- 'product_ids' => 'max:250',
- 'discount_amount' => 'max:250',
- 'quote_amount' => 'max:250',
- ];
- /**
- * 提示消息
- */
- protected $message = [];
- /**
- * 字段描述
- */
- protected $field = [
- 'create_staff_id' => '创建人',
- 'number' => '产品编码',
- 'customer_id' => '客户',
- 'contacts_id' => '客户联系人',
- 'quote_date' => '报价时间',
- 'discount_amount' => '优惠金额',
- 'quote_amount' => '报价金额',
- ];
- /**
- * 验证场景
- */
- protected $scene = [
- 'create' => [
- 'create_staff_id',
- 'number',
- 'customer_id',
- 'contacts_id',
- 'quote_date',
- 'discount_amount',
- 'quote_amount',
- ],
- 'edit' => [],
- ];
- }
|