67 lines
1.4 KiB
PHP
67 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace app\ticket\model;
|
|
|
|
use app\common\model\Resource;
|
|
use app\common\model\Role;
|
|
use app\common\model\Systems;
|
|
use support\Model;
|
|
|
|
/**
|
|
* users 用户表
|
|
* @property integer $id 用户ID(主键)
|
|
* @property string $ticket_id 工单编号
|
|
* @property string $user_id 分类id
|
|
* @property string $original_name 内容
|
|
* @property string $storage_path 排序
|
|
* @property string $mime_type 状态
|
|
* @property integer $file_size 创建人id
|
|
* @property string $created_at
|
|
* @property string $updated_at
|
|
*/
|
|
class Attachment extends Model
|
|
{
|
|
/**
|
|
* The connection name for the model.
|
|
*
|
|
* @var string|null
|
|
*/
|
|
protected $connection = 'mysql';
|
|
|
|
/**
|
|
* The table associated with the model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $table = 'tkt_ticket_attachment';
|
|
|
|
/**
|
|
* 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 = [
|
|
'ticket_id',
|
|
'user_id',
|
|
'original_name',
|
|
'storage_path',
|
|
'mime_type',
|
|
'file_size'
|
|
];
|
|
|
|
public function ticket(){
|
|
return $this->belongsTo(Ticket::class, 'ticket_id', 'id');
|
|
}
|
|
}
|