feat: 增强管理员权限管理,添加 RBAC 支持,更新 AdminUser 模型以处理角色和权限,更新登录接口返回权限信息,扩展数据库填充器以同步角色权限
This commit is contained in:
34
app/Models/ReconcileItem.php
Normal file
34
app/Models/ReconcileItem.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class ReconcileItem extends Model
|
||||
{
|
||||
protected $table = 'reconcile_items';
|
||||
|
||||
protected $fillable = [
|
||||
'reconcile_job_id',
|
||||
'side_a_ref',
|
||||
'side_b_ref',
|
||||
'difference_amount',
|
||||
'status',
|
||||
'resolved_at',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'difference_amount' => 'integer',
|
||||
'resolved_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
/** @return BelongsTo<ReconcileJob, ReconcileItem> */
|
||||
public function reconcileJob(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(ReconcileJob::class, 'reconcile_job_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user