2020-11-04 17:36:52 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare (strict_types=1);
|
|
|
|
|
|
|
|
namespace App\Model;
|
|
|
|
|
|
|
|
/**
|
2020-11-14 18:10:28 +08:00
|
|
|
* 文件拆分上传数据表模型
|
|
|
|
*
|
2021-04-20 16:30:57 +08:00
|
|
|
* @property int $id 临时文件ID
|
|
|
|
* @property int $file_type 上传类型[1:合并文件;2:拆分文件]
|
|
|
|
* @property int $user_id 上传的用户ID
|
|
|
|
* @property string $hash_name 临时文件hash名
|
2020-11-14 18:10:28 +08:00
|
|
|
* @property string $original_name 原文件名
|
2021-04-20 16:30:57 +08:00
|
|
|
* @property int $split_index 当前索引块
|
|
|
|
* @property int $split_num 总上传索引块
|
|
|
|
* @property string $save_dir 文件的临时保存路径
|
|
|
|
* @property string $file_ext 文件后缀名
|
|
|
|
* @property int $file_size 临时文件大小
|
|
|
|
* @property int $is_delete 文件是否已被删除[1:是;0:否;]
|
|
|
|
* @property int $upload_at 文件上传时间
|
2020-11-14 18:10:28 +08:00
|
|
|
*
|
|
|
|
* @package App\Model
|
2020-11-04 17:36:52 +08:00
|
|
|
*/
|
2020-11-05 17:40:51 +08:00
|
|
|
class FileSplitUpload extends BaseModel
|
2020-11-04 17:36:52 +08:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The table associated with the model.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $table = 'file_split_upload';
|
2020-11-14 18:10:28 +08:00
|
|
|
|
2020-11-04 17:36:52 +08:00
|
|
|
/**
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
2020-11-14 18:10:28 +08:00
|
|
|
protected $fillable = [
|
2020-11-21 19:53:01 +08:00
|
|
|
'file_type',
|
|
|
|
'user_id',
|
|
|
|
'hash_name',
|
|
|
|
'original_name',
|
|
|
|
'split_index',
|
|
|
|
'split_num',
|
|
|
|
'save_dir',
|
|
|
|
'file_ext',
|
|
|
|
'file_size',
|
|
|
|
'is_delete',
|
|
|
|
'upload_at'
|
2020-11-14 18:10:28 +08:00
|
|
|
];
|
|
|
|
|
2020-11-04 17:36:52 +08:00
|
|
|
/**
|
|
|
|
* The attributes that should be cast to native types.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
2020-11-14 18:10:28 +08:00
|
|
|
protected $casts = [
|
2021-04-20 16:30:57 +08:00
|
|
|
'id' => 'integer',
|
|
|
|
'file_type' => 'integer',
|
|
|
|
'user_id' => 'integer',
|
2020-11-14 18:10:28 +08:00
|
|
|
'split_index' => 'integer',
|
2021-04-20 16:30:57 +08:00
|
|
|
'split_num' => 'integer',
|
|
|
|
'file_size' => 'integer',
|
|
|
|
'is_delete' => 'integer',
|
|
|
|
'upload_at' => 'integer'
|
2020-11-14 18:10:28 +08:00
|
|
|
];
|
2020-11-04 17:36:52 +08:00
|
|
|
}
|