cxfoot/models/file/UploadFile.php
2023-10-27 14:25:12 +08:00

64 lines
1.7 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace app\models\file;
use Yii;
/**
* This is the model class for table "{{%upload_file}}".
*
* @property int $id ID
* @property int $cx_mch_id 平台商户ID
* @property int $file_source 文件源0=本地存储1=阿里云
* @property int $user_id 用户ID
* @property string|null $file_url 文件地址
* @property string|null $extension 扩展名
* @property string|null $type 类型
* @property int $size 大小
* @property int $is_delete 是否删除
* @property int $created_at 添加时间
* @property int $group_id 文件组ID
*/
class UploadFile extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return '{{%upload_file}}';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['cx_mch_id', 'file_source', 'user_id', 'size', 'is_delete', 'created_at', 'group_id'], 'integer'],
[['file_url'], 'string', 'max' => 2048],
[['extension', 'type'], 'string', 'max' => 256],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'cx_mch_id' => '平台商户ID',
'file_source' => '文件源0=本地存储1=阿里云',
'user_id' => '用户ID',
'file_url' => '文件地址',
'extension' => '扩展名',
'type' => '类型',
'size' => '大小',
'is_delete' => '是否删除',
'created_at' => '添加时间',
'group_id' => '文件组ID',
];
}
}