feat: 第四阶段财务与人事薪资模块

- 新增2个migration(11张表): finance(6表)/hr(5表)
- 新增11个Model + 11个Controller
- 新增50条API路由(总计262条)
- 新增2个前端API模块 + 10个管理页面
- 迁移运行通过, vite build验证通过
This commit is contained in:
li
2026-03-13 20:35:19 +08:00
parent e7d4d9b414
commit fb5e0daf1a
37 changed files with 3157 additions and 0 deletions
@@ -0,0 +1,37 @@
<?php
namespace App\Models\Finance;
use App\Traits\BelongsToStore;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
class FinanceCategory extends Model
{
use BelongsToStore;
protected $fillable = [
'store_id', 'parent_id', 'name', 'type', 'level', 'sort', 'status',
];
protected function casts(): array
{
return [
'type' => 'integer',
'level' => 'integer',
'sort' => 'integer',
'status' => 'integer',
];
}
public function children(): HasMany
{
return $this->hasMany(self::class, 'parent_id');
}
public function parent(): BelongsTo
{
return $this->belongsTo(self::class, 'parent_id');
}
}