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.

62 lines
1.3 KiB

2 months ago
<?php
namespace app\model;
/**
*
* // 印度期权
* @property int id
* @property string stock_name
* @property string stock_code
* @property string status
* @property string info
* @property int tape
* @property string create_time
* @property string update_time
* @property float forced_closure
* @property float keep_decimal
* @property float up_limit
* @property float down_limit
*/
class StockOptionInrListModel extends BaseModel
{
// 印度期权
protected $name = 'stock_option_inr_list';
protected $pk = 'id';
// 发布状态
const STATUS_OFF = 0;
const STATUS_ON = 1;
public static $statusList = [
self::STATUS_OFF => '未启用',
self::STATUS_ON => '已启用',
];
// 交易所类型
const BSE = 'BSE';
const NSE = 'NSE';
public static $tapeList = [
self::BSE => 1,
self::NSE => 2,
];
public static $tapeListText = [
1 => self::BSE,
2 => self::NSE,
];
public function getStatusTextAttr($value, $data)
{
$result = StockOptionInrListModel::$statusList[$data['status']]??'';
return $result;
}
public function getTapeTextAttr($value, $data)
{
$result = StockOptionInrListModel::$tapeListText[$data['tape']]??'BSE';
return $result;
}
}