Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 6 |
CRAP | |
0.00% |
0 / 31 |
| MeetingNote | |
0.00% |
0 / 1 |
|
0.00% |
0 / 6 |
42.00 | |
0.00% |
0 / 31 |
| tableName | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 3 |
|||
| behaviors | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 5 |
|||
| rules | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 7 |
|||
| attributeLabels | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 10 |
|||
| getMeeting | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 3 |
|||
| find | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 3 |
|||
| <?php | |
| namespace common\models; | |
| use Yii; | |
| use yii\behaviors\TimestampBehavior; | |
| /** | |
| * This is the model class for table "{{%meeting_note}}". | |
| * | |
| * @property string $id | |
| * @property string $content | |
| * @property integer $type | |
| * @property string $created_at | |
| * @property string $updated_at | |
| * @property string $meeting_id | |
| * | |
| * @property Meeting $meeting | |
| */ | |
| class MeetingNote extends \yii\db\ActiveRecord | |
| { | |
| const TYPE_ADMIN = 0; | |
| const TYPE_HOST = 1; | |
| const TYPE_GUEST = 2; | |
| /** | |
| * @inheritdoc | |
| */ | |
| public static function tableName() | |
| { | |
| return '{{%meeting_note}}'; | |
| } | |
| /** | |
| * @inheritdoc | |
| */ | |
| public function behaviors() | |
| { | |
| return [ | |
| TimestampBehavior::className(), | |
| ]; | |
| } | |
| /** | |
| * @inheritdoc | |
| */ | |
| public function rules() | |
| { | |
| return [ | |
| [['content', 'type', 'meeting_id'], 'required'], | |
| [['content'], 'string'], | |
| [['type', 'created_at', 'updated_at', 'meeting_id'], 'integer'] | |
| ]; | |
| } | |
| /** | |
| * @inheritdoc | |
| */ | |
| public function attributeLabels() | |
| { | |
| return [ | |
| 'id' => Yii::t('app', 'ID'), | |
| 'content' => Yii::t('app', 'Content'), | |
| 'type' => Yii::t('app', 'Type'), | |
| 'created_at' => Yii::t('app', 'Created At'), | |
| 'updated_at' => Yii::t('app', 'Updated At'), | |
| 'meeting_id' => Yii::t('app', 'Meeting ID'), | |
| ]; | |
| } | |
| /** | |
| * @return \yii\db\ActiveQuery | |
| */ | |
| public function getMeeting() | |
| { | |
| return $this->hasOne(Meeting::className(), ['id' => 'meeting_id']); | |
| } | |
| /** | |
| * @inheritdoc | |
| * @return MeetingNoteQuery | |
| */ | |
| public static function find() | |
| { | |
| return new MeetingNoteQuery(get_called_class()); | |
| } | |
| } |