add rfid_key to card and key
This commit is contained in:
@@ -37,5 +37,6 @@ return [
|
||||
'Update' => 'Módosítás',
|
||||
'Update {modelClass}: ' => '{modelClass} módosítása:',
|
||||
'Updated At' => 'Módosítás ideje',
|
||||
'OLD' => 'Régi Rendszer'
|
||||
'OLD' => 'Régi Rendszer',
|
||||
'RFID key' => 'RFID szám'
|
||||
];
|
||||
|
||||
@@ -6,6 +6,8 @@ return [
|
||||
'Status' => 'Státusz',
|
||||
'Search' => 'Keresés',
|
||||
'Type' => 'Típus',
|
||||
'Key' => 'Kulcs',
|
||||
'Created At' => 'Létrehozva',
|
||||
'RFID key' => 'RFID szám',
|
||||
];
|
||||
?>
|
||||
|
||||
@@ -42,6 +42,7 @@ class Card extends \common\models\BaseFitnessActiveRecord
|
||||
[['number', 'type','status'], 'required'],
|
||||
[['status', 'type'], 'integer'],
|
||||
[['number'], 'string', 'max' => 20],
|
||||
[['rfid_key'], 'string', 'max' => 25],
|
||||
[['number'], 'unique' ]
|
||||
];
|
||||
}
|
||||
@@ -54,6 +55,7 @@ class Card extends \common\models\BaseFitnessActiveRecord
|
||||
return [
|
||||
'id_card' => Yii::t('common/card', 'Id Card'),
|
||||
'number' => Yii::t('common/card', 'Number'),
|
||||
'rfid_key' => Yii::t('common/card', 'RFID key'),
|
||||
'status' => Yii::t('common/card', 'Status'),
|
||||
'type' => Yii::t('common/card', 'Type'),
|
||||
'created_at' => Yii::t('common/card', 'Created At'),
|
||||
|
||||
@@ -39,6 +39,7 @@ class Key extends \yii\db\ActiveRecord
|
||||
//[['created_at', 'updated_at'], 'required'],//kötelezőek
|
||||
//[['created_at', 'updated_at'], 'safe'], //bármi lehet
|
||||
[['number'], 'string', 'max' => 255],
|
||||
[['rfid_key'], 'string', 'max' => 25],
|
||||
[['number' ], 'unique'],
|
||||
];
|
||||
}
|
||||
@@ -61,6 +62,7 @@ class Key extends \yii\db\ActiveRecord
|
||||
return [
|
||||
'id_key' => Yii::t('common/key', 'Id Key'),
|
||||
'number' => Yii::t('common/key', 'Number'),
|
||||
'rfid_key' => Yii::t('common/key', 'RFID key'),
|
||||
'status' => Yii::t('common/key', 'Status'),
|
||||
'type' => Yii::t('common/key', 'Type'),
|
||||
'created_at' => Yii::t('common/key', 'Created At'),
|
||||
@@ -80,5 +82,14 @@ class Key extends \yii\db\ActiveRecord
|
||||
self::TYPE_NORMAL => Yii::t('common/key', 'Key'),
|
||||
];
|
||||
}
|
||||
|
||||
public function getHumanType(){
|
||||
$result = "";
|
||||
$types = self::types();
|
||||
if ( array_key_exists($this->type, $types) ){
|
||||
$result = $types[$this->type];
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user