65 lines
1.8 KiB
PHP
65 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace app\models;
|
|
|
|
use Yii;
|
|
|
|
/**
|
|
* This is the model class for table "cx_report".
|
|
*
|
|
* @property int $id
|
|
* @property int $user_id 用户ID
|
|
* @property int $store_id 门店ID
|
|
* @property string $model_number 模型编号
|
|
* @property string|null $initial_path 初始模型路径
|
|
* @property string|null $final_path 最终模型路径
|
|
* @property string|null $pdf_path pdf路径
|
|
* @property int $step 流程0-用户初始化 1-上传初始模型 2-医师上传模型
|
|
* @property int $created_at 添加时间
|
|
* @property int $initial_at 门店添加时间
|
|
* @property int $final_at 医师添加时间
|
|
* @property int $pdf_at PDF添加时间
|
|
* @property string $json 其他数据
|
|
*/
|
|
class Report extends \yii\db\ActiveRecord
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return 'cx_report';
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['user_id', 'store_id', 'model_number', 'created_at'], 'required'],
|
|
[['user_id', 'store_id', 'step', 'created_at', 'pdf_at', 'initial_at', 'final_at'], 'integer'],
|
|
[['initial_path', 'final_path', 'pdf_path','json'], 'string'],
|
|
[['model_number'], 'string', 'max' => 50],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'id' => 'ID',
|
|
'user_id' => 'User ID',
|
|
'store_id' => 'Store ID',
|
|
'model_number' => 'Model Number',
|
|
'initial_path' => 'Initial Path',
|
|
'final_path' => 'Final Path',
|
|
'pdf_path' => 'Pdf Path',
|
|
'step' => 'Step',
|
|
'created_at' => 'Created At',
|
|
];
|
|
}
|
|
}
|