add equipment_type objects
This commit is contained in:
68
common/models/EventEquipmentType.php
Normal file
68
common/models/EventEquipmentType.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace common\models;
|
||||
|
||||
use Yii;
|
||||
|
||||
/**
|
||||
* This is the model class for table "event_equipment_type".
|
||||
*
|
||||
* @property integer $id
|
||||
* @property string $name
|
||||
* @property string $created_at
|
||||
* @property string $updated_at
|
||||
*
|
||||
* @property EventEquipmentTypeAssignment[] $eventEquipmentTypeAssignments
|
||||
* @property EventRegistrationEquipmentTypeAssignment[] $eventRegistrationEquipmentTypeAssignments
|
||||
*/
|
||||
class EventEquipmentType extends \yii\db\ActiveRecord
|
||||
{
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public static function tableName()
|
||||
{
|
||||
return 'event_equipment_type';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
[['created_at', 'updated_at'], 'required'],
|
||||
[['created_at', 'updated_at'], 'safe'],
|
||||
[['name'], 'string', 'max' => 255]
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function attributeLabels()
|
||||
{
|
||||
return [
|
||||
'id' => Yii::t('common/event', 'ID'),
|
||||
'name' => Yii::t('common/event', 'Name'),
|
||||
'created_at' => Yii::t('common/event', 'Created At'),
|
||||
'updated_at' => Yii::t('common/event', 'Updated At'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \yii\db\ActiveQuery
|
||||
*/
|
||||
public function getEventEquipmentTypeAssignments()
|
||||
{
|
||||
return $this->hasMany(EventEquipmentTypeAssignment::className(), ['id_event_equipment_type' => 'id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \yii\db\ActiveQuery
|
||||
*/
|
||||
public function getEventRegistrationEquipmentTypeAssignments()
|
||||
{
|
||||
return $this->hasMany(EventRegistrationEquipmentTypeAssignment::className(), ['id_event_equipment_type' => 'id']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user