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/SendLogT.php

73 lines
1.5 KiB

5 years ago
<?php
namespace common\models;
use Yii;
/**
* This is the model class for table "send_log_t".
*
* @property integer $id
* @property integer $car_id
* @property integer $order_id
* @property integer $user_id
* @property integer $send_time
* @property string $created_at
* @property string $updated_at
*/
class SendLogT extends \common\models\Base
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'send_log_t';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['car_id', 'order_id', 'user_id', 'send_time'], 'required'],
[['car_id', 'order_id', 'user_id', 'send_time'], 'integer'],
[['created_at', 'updated_at'], 'safe'],
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'car_id' => 'Car ID',
'order_id' => 'Order ID',
'user_id' => 'User ID',
'send_time' => 'Send Time',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
];
}
public function getUser()
{
return $this->hasOne(UserT::className(),['id'=>'user_id']);
}
public function getOrder()
{
return $this->hasOne(OrderT::className(),['id'=>'order_id']);
}
public function getCar()
{
return $this->hasOne(CarT::className(),['id'=>'car_id']);
}
}