63 lines
1.1 KiB
PHP
63 lines
1.1 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace app\common\model;
|
||
|
|
|
||
|
|
use support\Model;
|
||
|
|
|
||
|
|
class UploadedFiles extends Model
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* The connection name for the model.
|
||
|
|
*
|
||
|
|
* @var string|null
|
||
|
|
*/
|
||
|
|
protected $connection = 'mysql';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* The table associated with the model.
|
||
|
|
*
|
||
|
|
* @var string
|
||
|
|
*/
|
||
|
|
protected $table = 'uploaded_files';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* The primary key associated with the table.
|
||
|
|
*
|
||
|
|
* @var string
|
||
|
|
*/
|
||
|
|
protected $primaryKey = 'id';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Indicates if the model should be timestamped.
|
||
|
|
*
|
||
|
|
* @var bool
|
||
|
|
*/
|
||
|
|
public $timestamps = true;
|
||
|
|
|
||
|
|
|
||
|
|
protected $dateFormat = 'U';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 允许自动填充模型字段
|
||
|
|
*/
|
||
|
|
protected $fillable = [
|
||
|
|
'id',
|
||
|
|
'file_name',
|
||
|
|
'file_path',
|
||
|
|
'file_size',
|
||
|
|
'file_type',
|
||
|
|
'category',
|
||
|
|
'original_name',
|
||
|
|
'extension',
|
||
|
|
'partition',
|
||
|
|
'upload_ip',
|
||
|
|
'user_agent',
|
||
|
|
'created_at',
|
||
|
|
'updated_at'
|
||
|
|
];
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 不允许自动填充模型字段
|
||
|
|
*/
|
||
|
|
protected $guarded = [];
|
||
|
|
}
|