fix: null->0 for parent_id/sort NOT NULL columns; prevent DB constraint violation

This commit is contained in:
li
2026-03-14 18:01:47 +08:00
parent 39234a0f4d
commit b590fc88a4
5 changed files with 8 additions and 0 deletions
@@ -25,6 +25,7 @@ class PositionController extends Controller
]);
$data['store_id'] = auth()->user()->store_id;
$data['sort'] = $data['sort'] ?? 0;
$position = Position::create($data);
return $this->success($position, '创建成功');
}