移除 周期性计费
This commit is contained in:
parent
809050c2a6
commit
59087b7540
@ -38,7 +38,6 @@ public function store(Request $request): Response|JsonResponse
|
|||||||
// 存储计费项目
|
// 存储计费项目
|
||||||
$this->validate($request, [
|
$this->validate($request, [
|
||||||
'status' => 'required|in:draft,running,stopped,error,suspended,pending',
|
'status' => 'required|in:draft,running,stopped,error,suspended,pending',
|
||||||
'billing_cycle' => 'nullable|in:monthly,quarterly,semi-annually,annually,biennially,triennially',
|
|
||||||
'price' => 'required|numeric',
|
'price' => 'required|numeric',
|
||||||
'user_id' => 'required|integer|exists:users,id',
|
'user_id' => 'required|integer|exists:users,id',
|
||||||
]);
|
]);
|
||||||
@ -60,7 +59,6 @@ public function store(Request $request): Response|JsonResponse
|
|||||||
'module_id' => auth('module')->id(),
|
'module_id' => auth('module')->id(),
|
||||||
'price' => $request->input('price'),
|
'price' => $request->input('price'),
|
||||||
'managed_price' => $request->input('managed_price'),
|
'managed_price' => $request->input('managed_price'),
|
||||||
'billing_cycle' => $request->input('billing_cycle'),
|
|
||||||
'status' => $request->input('status'),
|
'status' => $request->input('status'),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -24,17 +24,13 @@ class Host extends Model
|
|||||||
'managed_price',
|
'managed_price',
|
||||||
'configuration',
|
'configuration',
|
||||||
'status',
|
'status',
|
||||||
'billing_cycle',
|
|
||||||
'next_due_at',
|
|
||||||
'suspended_at',
|
'suspended_at',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'price' => 'decimal:2',
|
'price' => 'decimal:2',
|
||||||
'managed_price' => 'decimal:2',
|
'managed_price' => 'decimal:2',
|
||||||
'last_paid' => 'decimal:2',
|
|
||||||
'configuration' => 'array',
|
'configuration' => 'array',
|
||||||
'next_due_at' => 'datetime',
|
|
||||||
'suspended_at' => 'datetime',
|
'suspended_at' => 'datetime',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user