update Implement standardized documentation for all database modules, including purpose, rules, and requirements for each CRUD operation; refactor existing comments to follow new documentation standard ```
24 lines
589 B
TypeScript
24 lines
589 B
TypeScript
//
|
|
// PURPOSE:
|
|
// Create new QuizCRQuestions record
|
|
// REQ0006
|
|
//
|
|
// RULES:
|
|
// error handled by caller
|
|
// contain definition to collection only
|
|
//
|
|
|
|
import { COL_QUIZ_CR_QUESTIONS } from '@/constants';
|
|
import type { RecordModel } from 'pocketbase';
|
|
|
|
import { pb } from '@/lib/pb';
|
|
import type { CreateFormProps } from '@/components/dashboard/cr/questions/type';
|
|
|
|
// interface CreateForm {
|
|
// // TODO: Add QuizCRQuestions fields
|
|
// }
|
|
|
|
export default function createQuizCRQuestion(data: CreateFormProps): Promise<RecordModel> {
|
|
return pb.collection(COL_QUIZ_CR_QUESTIONS).create(data);
|
|
}
|