| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace common\models;
- class xhStudent extends xhBaseModel
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return 'xhStudent';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['id','userId', 'merchantId', 'visitTime', 'addTime', 'modTime'], 'integer'],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'userId' => 'User ID',
- 'merchantId' => 'Merchant ID',
- 'visitTime' => 'visitTime',
- 'addTime' => 'Add Time',
- 'modTime' => 'Mod Time',
- ];
- }
-
- public function getXhUser()
- {
- return $this->hasOne(xhUser::className(), ['id' => 'userId']);
- }
-
- }
|