Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 5 |
CRAP | |
0.00% |
0 / 21 |
| OrganizationTable | |
0.00% |
0 / 1 |
|
0.00% |
0 / 5 |
30.00 | |
0.00% |
0 / 21 |
| tableName | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 3 |
|||
| rules | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 6 |
|||
| attributeLabels | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 6 |
|||
| getOrganization | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 3 |
|||
| getTable | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 3 |
|||
| <?php | |
| namespace common\models; | |
| use Yii; | |
| /** | |
| * This is the model class for table "{{%organization_table}}". | |
| * | |
| * @property string $organization_id | |
| * @property string $table_id | |
| * | |
| * @property Organization $organization | |
| * @property Table $table | |
| */ | |
| class OrganizationTable extends \yii\db\ActiveRecord | |
| { | |
| /** | |
| * @inheritdoc | |
| */ | |
| public static function tableName() | |
| { | |
| return '{{%organization_table}}'; | |
| } | |
| /** | |
| * @inheritdoc | |
| */ | |
| public function rules() | |
| { | |
| return [ | |
| [['organization_id', 'table_id'], 'required'], | |
| [['organization_id', 'table_id'], 'integer'] | |
| ]; | |
| } | |
| /** | |
| * @inheritdoc | |
| */ | |
| public function attributeLabels() | |
| { | |
| return [ | |
| 'organization_id' => Yii::t('app', 'Organization ID'), | |
| 'table_id' => Yii::t('app', 'Table ID'), | |
| ]; | |
| } | |
| /** | |
| * @return \yii\db\ActiveQuery | |
| */ | |
| public function getOrganization() | |
| { | |
| return $this->hasOne(Organization::className(), ['id' => 'organization_id']); | |
| } | |
| /** | |
| * @return \yii\db\ActiveQuery | |
| */ | |
| public function getTable() | |
| { | |
| return $this->hasOne(Table::className(), ['id' => 'table_id']); | |
| } | |
| } |