| Current Path : /var/www/html/mnrb/backend/modules/cryptoaverage/models/ |
| Current File : /var/www/html/mnrb/backend/modules/cryptoaverage/models/CryptoAverage.php |
<?php
namespace backend\modules\cryptoaverage\models;
use Yii;
/**
* This is the model class for table "crypto_average".
*
* @property int $id
* @property string|null $datetime
* @property float|null $price
* @property int|null $qty
* @property string|null $type
* @property float|null $buy
* @property float|null $sell
* @property int|null $netqty
* @property float|null $cumalative
* @property float|null $buyprice
* @property float|null $buyqty
* @property float|null $average
* @property float|null $profitloss
*/
class CryptoAverage extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'crypto_average';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['datetime'], 'safe'],
[['qty', 'netqty', 'orderid','price', 'buy', 'sell', 'cumalative', 'buyprice', 'buyqty', 'average', 'profitloss'], 'number'],
[['userid'], 'integer'],
[['type'], 'string', 'max' => 10],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => Yii::t('app', 'ID'),
'datetime' => Yii::t('app', 'Datetime'),
'price' => Yii::t('app', 'Price'),
'qty' => Yii::t('app', 'Qty'),
'type' => Yii::t('app', 'Type'),
'buy' => Yii::t('app', 'Buy'),
'sell' => Yii::t('app', 'Sell'),
'netqty' => Yii::t('app', 'Netqty'),
'cumalative' => Yii::t('app', 'Cumalative'),
'buyprice' => Yii::t('app', 'Buyprice'),
'buyqty' => Yii::t('app', 'Buyqty'),
'average' => Yii::t('app', 'Average'),
'profitloss' => Yii::t('app', 'Profitloss'),
];
}
}