-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1234 from proditis/master
Ansible and metadata
- Loading branch information
Showing
18 changed files
with
270 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
namespace app\models; | ||
|
||
use Yii; | ||
|
||
/** | ||
* This is the model class for table "player_metadata". | ||
* | ||
* @property int $player_id | ||
* @property string|null $identificationFile | ||
* @property string|null $affiliation | ||
* | ||
* @property Player $player | ||
*/ | ||
class PlayerMetadata extends \yii\db\ActiveRecord | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public static function tableName() | ||
{ | ||
return 'player_metadata'; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function rules() | ||
{ | ||
return [ | ||
[['identificationFile', 'affiliation'], 'string', 'max' => 64], | ||
[['player_id'], 'exist', 'skipOnError' => true, 'targetClass' => Player::class, 'targetAttribute' => ['player_id' => 'id']], | ||
]; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function attributeLabels() | ||
{ | ||
return [ | ||
'player_id' => Yii::t('app', 'Player ID'), | ||
'identificationFile' => Yii::t('app', 'Identification File'), | ||
'affiliation' => Yii::t('app', 'Affiliation'), | ||
]; | ||
} | ||
|
||
/** | ||
* Gets query for [[Player]]. | ||
* | ||
* @return \yii\db\ActiveQuery|yii\db\ActiveQuery | ||
*/ | ||
public function getPlayer() | ||
{ | ||
return $this->hasOne(Player::class, ['id' => 'player_id']); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* @return PlayerMetadataQuery the active query used by this AR class. | ||
*/ | ||
public static function find() | ||
{ | ||
return new PlayerMetadataQuery(get_called_class()); | ||
} | ||
} |
Oops, something went wrong.