add rfid_key to card and key
This commit is contained in:
@@ -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