add_balance

This commit is contained in:
SoHardKI
2019-06-21 18:05:58 +03:00
parent 0727013ddd
commit 1b088402df
313 changed files with 543 additions and 25 deletions

0
common/models/AdditionalFields.php Normal file → Executable file
View File

45
common/models/Balance.php Normal file
View 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);
}
}

0
common/models/CardSkill.php Normal file → Executable file
View File

0
common/models/Company.php Normal file → Executable file
View File

3
common/models/FieldsValue.php Normal file → Executable file
View File

@ -37,12 +37,13 @@ class FieldsValue extends \yii\db\ActiveRecord
{
return [
[['field_id', 'value'], 'required'],
[['card_id', 'field_id', 'order', 'project_id', 'company_id'], 'integer'],
[['card_id', 'field_id', 'order', 'project_id', 'company_id','balance_id'], 'integer'],
[['value'], 'string', 'max' => 255],
[['field_id'], 'exist', 'skipOnError' => true, 'targetClass' => AdditionalFields::class, 'targetAttribute' => ['field_id' => 'id']],
[['company_id'], 'exist', 'skipOnError' => true, 'targetClass' => Company::class, 'targetAttribute' => ['company_id' => 'id']],
[['project_id'], 'exist', 'skipOnError' => true, 'targetClass' => Project::class, 'targetAttribute' => ['project_id' => 'id']],
[['card_id'], 'exist', 'skipOnError' => true, 'targetClass' => UserCard::class, 'targetAttribute' => ['card_id' => 'id']],
[['balance_id'],'exist', 'skipOnError' => true, 'targetClass' => Balance::class, 'targetAttribute' => ['balance_id' => 'id']],
];
}

0
common/models/Hh.php Normal file → Executable file
View File

0
common/models/HhJob.php Normal file → Executable file
View File

0
common/models/LoginForm.php Normal file → Executable file
View File

0
common/models/Position.php Normal file → Executable file
View File

0
common/models/Project.php Normal file → Executable file
View File

0
common/models/ProjectUser.php Normal file → Executable file
View File

0
common/models/Skill.php Normal file → Executable file
View File

0
common/models/Status.php Normal file → Executable file
View File

4
common/models/UseField.php Normal file → Executable file
View File

@ -21,6 +21,7 @@ class UseField extends \yii\db\ActiveRecord
const USE_PROFILE = 0;
const USE_PROJECT = 1;
const USE_COMPANY = 2;
const USE_BALANCE = 3;
/**
@ -68,7 +69,8 @@ class UseField extends \yii\db\ActiveRecord
return [
self::USE_PROFILE => 'Профиль',
self::USE_PROJECT => 'Проект',
self::USE_COMPANY => 'Компания'
self::USE_COMPANY => 'Компания',
self::USE_BALANCE => 'Баланс'
];
}

4
common/models/UseStatus.php Normal file → Executable file
View File

@ -21,6 +21,7 @@ class UseStatus extends \yii\db\ActiveRecord
const USE_PROFILE = 0;
const USE_PROJECT = 1;
const USE_COMPANY = 2;
const USE_BALANCE = 3;
/**
* {@inheritdoc}
@ -67,7 +68,8 @@ class UseStatus extends \yii\db\ActiveRecord
return [
self::USE_PROFILE => 'Профиль',
self::USE_PROJECT => 'Проект',
self::USE_COMPANY => 'Компания'
self::USE_COMPANY => 'Компания',
self::USE_BALANCE => 'Баланс'
];
}

0
common/models/User.php Normal file → Executable file
View File

0
common/models/UserCard.php Normal file → Executable file
View File