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.
 
 
 
 
simple-yewu/common/models/InvalidNew.php

70 lines
1.6 KiB

<?php
namespace common\models;
use Yii;
/**
* This is the model class for table "invalid_new".
*
* @property integer $id
* @property integer $car_id
* @property string $car_no
* @property string $insurer1_date
* @property string $insurer2_date
* @property string $phone
* @property string $xdate
* @property integer $invalid_id
* @property integer $num
* @property integer $user_id
*/
class InvalidNew extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'invalid_new';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['car_id', 'invalid_id', 'num', 'user_id'], 'integer'],
[['insurer1_date', 'insurer2_date'], 'safe'],
[['user_id'], 'required'],
[['car_no', 'phone', 'xdate'], 'string', 'max' => 50],
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'car_id' => 'Car ID',
'car_no' => 'Car No',
'insurer1_date' => 'Insurer1 Date',
'insurer2_date' => 'Insurer2 Date',
'phone' => 'Phone',
'xdate' => 'Xdate',
'invalid_id' => 'Invalid ID',
'num' => 'Num',
'user_id' => 'User ID',
];
}
public function getInvalids()
{
return $this->hasOne(InvalidT::className(), ['id' => 'invalid_id']);
}
public function getUser()
{
return $this->hasOne(UserT::className(),['id'=>'user_id']);
}
}