chore: 完善模組化架構遷移與修復前端顯示錯誤
- 修正所有模組 Controller 的 Model 引用路徑 (App\Modules\...) - 更新 ProductionOrder 與 ProductionOrderItem 模型結構以符合新版邏輯 - 修復 resources/js/utils/format.ts 在處理空值時導致 toLocaleString 崩潰的問題 - 清除全域路徑與 Controller 遷移殘留檔案
This commit is contained in:
36
app/Modules/Finance/Models/UtilityFee.php
Normal file
36
app/Modules/Finance/Models/UtilityFee.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\Finance\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UtilityFee extends Model
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\UtilityFeeFactory> */
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'type', // 'electricity', 'water', 'gas', etc.
|
||||
'billing_period_start',
|
||||
'billing_period_end',
|
||||
'due_date',
|
||||
'amount',
|
||||
'usage_amount', // kWh, m3, etc.
|
||||
'unit', // 度, 立方米
|
||||
'status', // 'pending', 'paid', 'overdue'
|
||||
'paid_at',
|
||||
'payment_method',
|
||||
'notes',
|
||||
'receipt_image_path',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'billing_period_start' => 'date',
|
||||
'billing_period_end' => 'date',
|
||||
'due_date' => 'date',
|
||||
'paid_at' => 'datetime',
|
||||
'amount' => 'decimal:2',
|
||||
'usage_amount' => 'decimal:2',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user