// PURPOSE:
// Update student record in database
//
// RULES:
// 1. Uses COL_USER_METAS collection with role='student'
// 2. Requires valid student ID string
// 3. Accepts Partial<EditFormProps> update data
// 4. Returns Promise<RecordModel> with updated record
// 5. Throws error if update fails

import { pb } from '@/lib/pb';
import { COL_USER_METAS } from '@/constants';
import type { RecordModel } from 'pocketbase';
import type { EditFormProps } from '@/components/dashboard/customer/type.d';

export async function updateCustomer(id: string, data: Partial<EditFormProps>): Promise<RecordModel> {
  return pb.collection(COL_USER_METAS).update(id, data);
}
