You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.3 KiB
67 lines
1.3 KiB
5 years ago
|
<?php
|
||
|
|
||
|
namespace common\models;
|
||
|
|
||
|
use Yii;
|
||
|
|
||
|
/**
|
||
|
* This is the model class for table "right_t".
|
||
|
*
|
||
|
* @property integer $id
|
||
|
* @property integer $user_id
|
||
|
* @property string $created_at
|
||
|
* @property string $updated_at
|
||
|
*/
|
||
|
class RightT extends \common\models\Base
|
||
|
{
|
||
|
/**
|
||
|
* @inheritdoc
|
||
|
*/
|
||
|
public static function tableName()
|
||
|
{
|
||
|
return 'right_t';
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @inheritdoc
|
||
|
*/
|
||
|
public function rules()
|
||
|
{
|
||
|
return [
|
||
|
[['id', 'user_id'], 'required'],
|
||
|
[['id', 'user_id','judge','caozuo_id'], 'integer'],
|
||
|
[['created_at', 'updated_at'], 'safe'],
|
||
|
];
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @inheritdoc
|
||
|
*/
|
||
|
public function attributeLabels()
|
||
|
{
|
||
|
return [
|
||
|
'id' => 'ID',
|
||
|
'user_id' => 'User ID',
|
||
|
'created_at' => 'Created At',
|
||
|
'updated_at' => 'Updated At',
|
||
|
];
|
||
|
}
|
||
|
public function getCar()
|
||
|
{
|
||
|
return $this->hasOne(CarT::className(),['id'=>'id']);
|
||
|
}
|
||
|
|
||
|
public function getUser()
|
||
|
{
|
||
|
return $this->hasOne(UserT::className(),['id'=>'user_id']);
|
||
|
}
|
||
|
public function getCaozuo()
|
||
|
{
|
||
|
return $this->hasOne(UserT::className(),['id'=>'caozuo_id']);
|
||
|
}
|
||
|
public function getInvalid()
|
||
|
{
|
||
|
return $this->hasOne(InvalidT::className(),['id'=>'iv_d']);
|
||
|
}
|
||
|
}
|