移除 周期性计费

This commit is contained in:
iVampireSP.com 2023-02-20 00:12:11 +08:00
parent 809050c2a6
commit 59087b7540
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
2 changed files with 0 additions and 6 deletions

View File

@ -38,7 +38,6 @@ public function store(Request $request): Response|JsonResponse
// 存储计费项目
$this->validate($request, [
'status' => 'required|in:draft,running,stopped,error,suspended,pending',
'billing_cycle' => 'nullable|in:monthly,quarterly,semi-annually,annually,biennially,triennially',
'price' => 'required|numeric',
'user_id' => 'required|integer|exists:users,id',
]);
@ -60,7 +59,6 @@ public function store(Request $request): Response|JsonResponse
'module_id' => auth('module')->id(),
'price' => $request->input('price'),
'managed_price' => $request->input('managed_price'),
'billing_cycle' => $request->input('billing_cycle'),
'status' => $request->input('status'),
];

View File

@ -24,17 +24,13 @@ class Host extends Model
'managed_price',
'configuration',
'status',
'billing_cycle',
'next_due_at',
'suspended_at',
];
protected $casts = [
'price' => 'decimal:2',
'managed_price' => 'decimal:2',
'last_paid' => 'decimal:2',
'configuration' => 'array',
'next_due_at' => 'datetime',
'suspended_at' => 'datetime',
];