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

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']],
];
}