add mover cutler door
This commit is contained in:
@@ -21,6 +21,7 @@ use yii\helpers\ArrayHelper;
|
||||
* @property integer installment_enabled
|
||||
* @property integer installment_count
|
||||
* @property integer installment_money
|
||||
* @property integer door_allowed
|
||||
* @property string $created_at
|
||||
* @property string $updated_at
|
||||
*/
|
||||
@@ -38,6 +39,9 @@ class TicketType extends \common\models\BaseFitnessActiveRecord {
|
||||
|
||||
const INSTALLMENT_OFF = 0;
|
||||
const INSTALLMENT_ON = 1;
|
||||
|
||||
const FLAG_DOOR_ALLOWED_OFF = 0;
|
||||
const FLAG_DOOR_ALLOWED_ON = 1;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
@@ -104,6 +108,13 @@ class TicketType extends \common\models\BaseFitnessActiveRecord {
|
||||
|
||||
[['installment_money',], 'integer'],
|
||||
[['installment_count',], 'integer'],
|
||||
|
||||
////////////////
|
||||
//door_allowed
|
||||
////////////////
|
||||
[['door_allowed',], 'integer'],
|
||||
[['door_allowed',], 'in', 'range' => [ self::FLAG_DOOR_ALLOWED_OFF, self::FLAG_DOOR_ALLOWED_ON ]],
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
@@ -128,6 +139,7 @@ class TicketType extends \common\models\BaseFitnessActiveRecord {
|
||||
'installment_enabled' => Yii::t('common/ticket_type', 'Részlet fizetés a brutto áron felül'),
|
||||
'installment_count' => Yii::t('common/ticket_type', 'Havi részletek száma'),
|
||||
'installment_money' => Yii::t('common/ticket_type', 'Havi részlet összege'),
|
||||
'door_allowed' => Yii::t('common/ticket_type', 'Forgóvilla'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -188,6 +200,11 @@ class TicketType extends \common\models\BaseFitnessActiveRecord {
|
||||
public function isStudent(){
|
||||
return $this->flag_student == ( self::FLAG_STUDENT_ON);
|
||||
}
|
||||
|
||||
public function isDoor(){
|
||||
return $this->door_allowed == ( self::FLAG_STUDENT_ON);
|
||||
}
|
||||
|
||||
public function isInstallment(){
|
||||
return $this->installment_enabled == ( self::INSTALLMENT_ON);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user