bourse stock
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
6.0 KiB

<?php
namespace app\admin\validate;
class OrderValidate extends AdminBaseValidate
{
protected $rule = [
'page' => 'require|integer',
'limit' => 'require|integer',
'order_id' => 'alphaNum',
'order_no' => 'alphaNum',
'user_no' => 'alphaNum',
'digital_id' => 'upper',
'contract_id' => 'alphaDash',
'stock_id' => 'alphaDash',
'stock_code' => 'alphaDash',
'status' => 'integer',
'start_time' => 'date|dateFormat:Y-m-d H:i:s',
'end_time' => 'date|dateFormat:Y-m-d H:i:s',
];
protected $message = [
'page.require' => '分页参数无效',
'page.integer' => '分页参数无效',
'limit.require' => '分页参数无效',
'limit.integer' => '分页参数无效',
'order_id.alphaNum' => '订单号无效',
'user_no.alphaNum' => '用户号无效',
'digital_id.upper' => '交易对无效',
'contract_id.upper' => '合约代码无效',
'stock_id.upper' => '股票代码无效',
'start_time.date' => '搜索日期无效',
'start_time.dateFormat' => '搜索日期无效',
'end_time.date' => '搜索日期无效',
'end_time.dateFormat' => '搜索日期无效',
];
protected $scene = [
// 现货
'digitalPlace' => ['page', 'limit', 'order_id', 'user_no', 'digital_id', 'start_time', 'end_time'],
'digitalBack' => ['page', 'limit', 'order_id', 'user_no', 'digital_id', 'start_time', 'end_time'],
'digitalDeal' => ['page', 'limit', 'order_id', 'user_no', 'digital_id', 'start_time', 'end_time'],
// 合约
'contractHold' => ['page', 'limit', 'order_id', 'user_no', 'contract_id', 'start_time', 'end_time'],
'contractPlace' => ['page', 'limit', 'order_id', 'user_no', 'contract_id', 'start_time', 'end_time'],
'contractBack' => ['page', 'limit', 'order_id', 'user_no', 'contract_id', 'start_time', 'end_time'],
'contractClear' => ['page', 'limit', 'order_id', 'user_no', 'contract_id', 'start_time', 'end_time'],
// 合约
'forexHold' => ['page', 'limit', 'order_id', 'user_no', 'contract_id', 'start_time', 'end_time'],
'forexPlace' => ['page', 'limit', 'order_id', 'user_no', 'contract_id', 'start_time', 'end_time'],
'forexBack' => ['page', 'limit', 'order_id', 'user_no', 'contract_id', 'start_time', 'end_time'],
'forexClear' => ['page', 'limit', 'order_id', 'user_no', 'contract_id', 'start_time', 'end_time'],
// 股票
'stockHold' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'stockPlace' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'stockBack' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'stockClear' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
// 美股股票
'us_stockHold' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'us_stockPlace' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'us_stockBack' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'us_stockClear' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
// 印尼股票
'idn_stockHold' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'idn_stockPlace' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'idn_stockBack' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'idn_stockClear' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
// 马来西亚股票
'mys_stockHold' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'mys_stockPlace' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'mys_stockBack' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'mys_stockClear' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
// 泰国股票
'tha_stockHold' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'tha_stockPlace' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'tha_stockBack' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'tha_stockClear' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
// 印度股票
'in_stockHold' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'in_stockPlace' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'in_stockBack' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'in_stockClear' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
// 申购订单
'pre_stock' => ['page', 'limit', 'order_no', 'user_no', 'market_type'],
// 基金订单
'fund_stock' => ['page', 'limit', 'order_no', 'user_no', 'start_time', 'end_time'],
'fund_stock_info' => ['id'],
'fund_interest_list' => ['page', 'limit', 'user_no', 'start_time', 'end_time'],
// 香港股票
'hk_stockHold' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'hk_stockPlace' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'hk_stockBack' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
'hk_stockClear' => ['page', 'limit', 'order_id', 'user_no', 'stock_id', 'start_time', 'end_time'],
// 大宗交易
'block_stock' => ['page', 'limit', 'user_no'],
];
}