guild/common/models/Balance.php
2019-06-21 18:05:58 +03:00

45 lines
829 B
PHP

<?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);
}
}