- 新增3个migration(9张表): office(6表)/report(1表)/kb(2表) - 新增9个Model + 9个Controller - 新增43条API路由(总计305条) - 新增3个前端API模块 + 10个管理页面 - 迁移运行通过, vite build验证通过
33 lines
658 B
PHP
33 lines
658 B
PHP
<?php
|
|
|
|
namespace App\Models\Report;
|
|
|
|
use App\Models\User;
|
|
use App\Traits\BelongsToStore;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class ReportExport extends Model
|
|
{
|
|
use BelongsToStore;
|
|
|
|
const UPDATED_AT = null;
|
|
|
|
protected $fillable = [
|
|
'store_id', 'name', 'type', 'params', 'file_path', 'status', 'operator_id',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'params' => 'array',
|
|
'status' => 'integer',
|
|
];
|
|
}
|
|
|
|
public function operator(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class, 'operator_id');
|
|
}
|
|
}
|