57 lines
1.4 KiB
PHP
57 lines
1.4 KiB
PHP
<?php
|
||
|
||
namespace app\models;
|
||
|
||
use Yii;
|
||
|
||
/**
|
||
* This is the model class for table "cx_qc_data".
|
||
*
|
||
* @property int $id
|
||
* @property string|null $union 车辆编号
|
||
* @property string|null $data json数据
|
||
* @property int|null $created_at 写入数据库的时间,中间可能会发生redis写入数据库挂掉的情况,请使用下个时间
|
||
* @property int|null $data_time 获取到数据的时间
|
||
* @property string|null $type 类型:如 Detail
|
||
* @property int|null $status 状态,1、正常,0.非法数据
|
||
*/
|
||
class QcData extends \yii\db\ActiveRecord
|
||
{
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public static function tableName()
|
||
{
|
||
return 'cx_qc_data';
|
||
}
|
||
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public function rules()
|
||
{
|
||
return [
|
||
[['data'], 'string'],
|
||
[['created_at', 'data_time', 'status'], 'integer'],
|
||
[['union'], 'string', 'max' => 32],
|
||
[['type'], 'string', 'max' => 20],
|
||
];
|
||
}
|
||
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public function attributeLabels()
|
||
{
|
||
return [
|
||
'id' => 'ID',
|
||
'union' => 'Union',
|
||
'data' => 'Data',
|
||
'created_at' => 'Created At',
|
||
'data_time' => 'Data Time',
|
||
'type' => 'Type',
|
||
'status' => 'Status',
|
||
];
|
||
}
|
||
}
|