add_balance
This commit is contained in:
45
common/models/Balance.php
Normal file
45
common/models/Balance.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace common\models;
|
||||
|
||||
use common\classes\Debug;
|
||||
|
||||
/**
|
||||
* This is the model class for table "company".
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $type
|
||||
* @property int $summ
|
||||
* @property int $dt_add
|
||||
*/
|
||||
class Balance extends \yii\db\ActiveRecord
|
||||
{
|
||||
public static function tableName()
|
||||
{
|
||||
return 'balance';
|
||||
}
|
||||
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
[['type', 'summ', 'dt_add'], 'integer'],
|
||||
];
|
||||
}
|
||||
|
||||
public function attributeLabels()
|
||||
{
|
||||
return [
|
||||
'id' => 'id',
|
||||
'type' => 'Тип',
|
||||
'summ' => 'Сумма',
|
||||
'dt_add' => 'Дата добавления',
|
||||
];
|
||||
}
|
||||
|
||||
public function afterFind()
|
||||
{
|
||||
parent::afterFind(); // TODO: Change the autogenerated stub
|
||||
$this->dt_add = date('d-m-Y',$this->dt_add);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user