| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?php
- namespace common\models;
- /**
- * This is the model class for table "xhTrainUserCourse".
- *
- * @property integer $id
- * @property integer $userId
- * @property integer $studentId
- * @property integer $courseId
- * @property string $courseName
- * @property string $courseIntro
- * @property string $worksImg
- * @property integer $merchantId
- * @property integer $praiseNum
- * @property integer $status
- * @property integer $attendTime
- * @property integer $addTime
- * @property integer $modTime
- */
- class xhTrainUserCourse extends xhBaseModel
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return 'xhTrainUserCourse';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['userId', 'studentId', 'courseId', 'merchantId', 'praiseNum', 'status', 'attendTime', 'addTime', 'modTime'], 'integer'],
- [['courseName'], 'string', 'max' => 30],
- [['courseIntro', 'worksImg'], 'string', 'max' => 1000],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'userId' => 'User ID',
- 'studentId' => 'Student ID',
- 'courseId' => 'Course ID',
- 'courseName' => 'Course Name',
- 'courseIntro' => 'Course Intro',
- 'worksImg' => 'Works Img',
- 'merchantId' => 'Merchant ID',
- 'praiseNum' => 'Praise Num',
- 'status' => 'Status',
- 'attendTime' => 'Attend Time',
- 'addTime' => 'Add Time',
- 'modTime' => 'Mod Time',
- ];
- }
-
- public function getXhUser()
- {
- return $this->hasOne(xhUser::className(),['id' => 'userId']);
- }
-
- }
|