suparisma 1.2.3 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generators/coreGenerator.js +74 -16
- package/dist/generators/hookGenerator.js +6 -2
- package/dist/generators/typeGenerator.js +43 -31
- package/dist/index.js +6 -1
- package/package.json +1 -1
- package/tmp/generated-test/hooks/useSuparismaAsset.ts +94 -0
- package/tmp/generated-test/hooks/useSuparismaChapter.ts +96 -0
- package/tmp/generated-test/hooks/useSuparismaCourse.ts +96 -0
- package/tmp/generated-test/hooks/useSuparismaDeviceSession.ts +94 -0
- package/tmp/generated-test/hooks/useSuparismaEnrollment.ts +92 -0
- package/tmp/generated-test/hooks/useSuparismaLesson.ts +96 -0
- package/tmp/generated-test/hooks/useSuparismaLessonPurchase.ts +92 -0
- package/tmp/generated-test/hooks/useSuparismaLessonQuestion.ts +96 -0
- package/tmp/generated-test/hooks/useSuparismaPayoutMethod.ts +96 -0
- package/tmp/generated-test/hooks/useSuparismaPayoutRequest.ts +96 -0
- package/tmp/generated-test/hooks/useSuparismaQuestionOption.ts +92 -0
- package/tmp/generated-test/hooks/useSuparismaSavedPaymentMethod.ts +96 -0
- package/tmp/generated-test/hooks/useSuparismaTeacherPayoutInfo.ts +96 -0
- package/tmp/generated-test/hooks/useSuparismaThing.ts +96 -0
- package/tmp/generated-test/hooks/useSuparismaUser.ts +96 -0
- package/tmp/generated-test/hooks/useSuparismaVideoNote.ts +96 -0
- package/tmp/generated-test/hooks/useSuparismaWallet.ts +96 -0
- package/tmp/generated-test/hooks/useSuparismaWalletTransaction.ts +96 -0
- package/tmp/generated-test/hooks/useSuparismaWatchProgress.ts +96 -0
- package/tmp/generated-test/index.ts +140 -0
- package/tmp/generated-test/types/AssetTypes.ts +485 -0
- package/tmp/generated-test/types/ChapterTypes.ts +488 -0
- package/tmp/generated-test/types/CourseTypes.ts +519 -0
- package/tmp/generated-test/types/DeviceSessionTypes.ts +489 -0
- package/tmp/generated-test/types/EnrollmentTypes.ts +495 -0
- package/tmp/generated-test/types/LessonPurchaseTypes.ts +490 -0
- package/tmp/generated-test/types/LessonQuestionTypes.ts +496 -0
- package/tmp/generated-test/types/LessonTypes.ts +517 -0
- package/tmp/generated-test/types/PayoutMethodTypes.ts +517 -0
- package/tmp/generated-test/types/PayoutRequestTypes.ts +528 -0
- package/tmp/generated-test/types/QuestionOptionTypes.ts +479 -0
- package/tmp/generated-test/types/SavedPaymentMethodTypes.ts +497 -0
- package/tmp/generated-test/types/TeacherPayoutInfoTypes.ts +480 -0
- package/tmp/generated-test/types/ThingTypes.ts +482 -0
- package/tmp/generated-test/types/UserTypes.ts +487 -0
- package/tmp/generated-test/types/VideoNoteTypes.ts +489 -0
- package/tmp/generated-test/types/WalletTransactionTypes.ts +505 -0
- package/tmp/generated-test/types/WalletTypes.ts +480 -0
- package/tmp/generated-test/types/WatchProgressTypes.ts +493 -0
- package/tmp/generated-test/utils/core.ts +2306 -0
- package/tmp/generated-test/utils/supabase-client.ts +17 -0
- package/tmp/generated-test2/hooks/useSuparismaAsset.ts +94 -0
- package/tmp/generated-test2/hooks/useSuparismaChapter.ts +96 -0
- package/tmp/generated-test2/hooks/useSuparismaCourse.ts +96 -0
- package/tmp/generated-test2/hooks/useSuparismaDeviceSession.ts +94 -0
- package/tmp/generated-test2/hooks/useSuparismaEnrollment.ts +92 -0
- package/tmp/generated-test2/hooks/useSuparismaLesson.ts +96 -0
- package/tmp/generated-test2/hooks/useSuparismaLessonPurchase.ts +92 -0
- package/tmp/generated-test2/hooks/useSuparismaLessonQuestion.ts +96 -0
- package/tmp/generated-test2/hooks/useSuparismaPayoutMethod.ts +96 -0
- package/tmp/generated-test2/hooks/useSuparismaPayoutRequest.ts +96 -0
- package/tmp/generated-test2/hooks/useSuparismaQuestionOption.ts +92 -0
- package/tmp/generated-test2/hooks/useSuparismaSavedPaymentMethod.ts +96 -0
- package/tmp/generated-test2/hooks/useSuparismaTeacherPayoutInfo.ts +96 -0
- package/tmp/generated-test2/hooks/useSuparismaThing.ts +96 -0
- package/tmp/generated-test2/hooks/useSuparismaUser.ts +96 -0
- package/tmp/generated-test2/hooks/useSuparismaVideoNote.ts +96 -0
- package/tmp/generated-test2/hooks/useSuparismaWallet.ts +96 -0
- package/tmp/generated-test2/hooks/useSuparismaWalletTransaction.ts +96 -0
- package/tmp/generated-test2/hooks/useSuparismaWatchProgress.ts +96 -0
- package/tmp/generated-test2/index.ts +140 -0
- package/tmp/generated-test2/types/AssetTypes.ts +485 -0
- package/tmp/generated-test2/types/ChapterTypes.ts +488 -0
- package/tmp/generated-test2/types/CourseTypes.ts +522 -0
- package/tmp/generated-test2/types/DeviceSessionTypes.ts +489 -0
- package/tmp/generated-test2/types/EnrollmentTypes.ts +495 -0
- package/tmp/generated-test2/types/LessonPurchaseTypes.ts +490 -0
- package/tmp/generated-test2/types/LessonQuestionTypes.ts +496 -0
- package/tmp/generated-test2/types/LessonTypes.ts +517 -0
- package/tmp/generated-test2/types/PayoutMethodTypes.ts +517 -0
- package/tmp/generated-test2/types/PayoutRequestTypes.ts +528 -0
- package/tmp/generated-test2/types/QuestionOptionTypes.ts +479 -0
- package/tmp/generated-test2/types/SavedPaymentMethodTypes.ts +497 -0
- package/tmp/generated-test2/types/TeacherPayoutInfoTypes.ts +480 -0
- package/tmp/generated-test2/types/ThingTypes.ts +482 -0
- package/tmp/generated-test2/types/UserTypes.ts +490 -0
- package/tmp/generated-test2/types/VideoNoteTypes.ts +489 -0
- package/tmp/generated-test2/types/WalletTransactionTypes.ts +505 -0
- package/tmp/generated-test2/types/WalletTypes.ts +480 -0
- package/tmp/generated-test2/types/WatchProgressTypes.ts +493 -0
- package/tmp/generated-test2/utils/core.ts +2306 -0
- package/tmp/generated-test2/utils/supabase-client.ts +17 -0
- package/tmp/generated-test3/hooks/useSuparismaAsset.ts +94 -0
- package/tmp/generated-test3/hooks/useSuparismaChapter.ts +98 -0
- package/tmp/generated-test3/hooks/useSuparismaCourse.ts +98 -0
- package/tmp/generated-test3/hooks/useSuparismaDeviceSession.ts +94 -0
- package/tmp/generated-test3/hooks/useSuparismaEnrollment.ts +94 -0
- package/tmp/generated-test3/hooks/useSuparismaLesson.ts +98 -0
- package/tmp/generated-test3/hooks/useSuparismaLessonPurchase.ts +94 -0
- package/tmp/generated-test3/hooks/useSuparismaLessonQuestion.ts +98 -0
- package/tmp/generated-test3/hooks/useSuparismaPayoutMethod.ts +96 -0
- package/tmp/generated-test3/hooks/useSuparismaPayoutRequest.ts +96 -0
- package/tmp/generated-test3/hooks/useSuparismaQuestionOption.ts +94 -0
- package/tmp/generated-test3/hooks/useSuparismaSavedPaymentMethod.ts +96 -0
- package/tmp/generated-test3/hooks/useSuparismaTeacherPayoutInfo.ts +98 -0
- package/tmp/generated-test3/hooks/useSuparismaThing.ts +96 -0
- package/tmp/generated-test3/hooks/useSuparismaUser.ts +98 -0
- package/tmp/generated-test3/hooks/useSuparismaVideoNote.ts +98 -0
- package/tmp/generated-test3/hooks/useSuparismaWallet.ts +98 -0
- package/tmp/generated-test3/hooks/useSuparismaWalletTransaction.ts +98 -0
- package/tmp/generated-test3/hooks/useSuparismaWatchProgress.ts +98 -0
- package/tmp/generated-test3/index.ts +140 -0
- package/tmp/generated-test3/types/AssetTypes.ts +485 -0
- package/tmp/generated-test3/types/ChapterTypes.ts +488 -0
- package/tmp/generated-test3/types/CourseTypes.ts +522 -0
- package/tmp/generated-test3/types/DeviceSessionTypes.ts +489 -0
- package/tmp/generated-test3/types/EnrollmentTypes.ts +495 -0
- package/tmp/generated-test3/types/LessonPurchaseTypes.ts +490 -0
- package/tmp/generated-test3/types/LessonQuestionTypes.ts +496 -0
- package/tmp/generated-test3/types/LessonTypes.ts +517 -0
- package/tmp/generated-test3/types/PayoutMethodTypes.ts +517 -0
- package/tmp/generated-test3/types/PayoutRequestTypes.ts +528 -0
- package/tmp/generated-test3/types/QuestionOptionTypes.ts +479 -0
- package/tmp/generated-test3/types/SavedPaymentMethodTypes.ts +497 -0
- package/tmp/generated-test3/types/TeacherPayoutInfoTypes.ts +480 -0
- package/tmp/generated-test3/types/ThingTypes.ts +482 -0
- package/tmp/generated-test3/types/UserTypes.ts +490 -0
- package/tmp/generated-test3/types/VideoNoteTypes.ts +489 -0
- package/tmp/generated-test3/types/WalletTransactionTypes.ts +505 -0
- package/tmp/generated-test3/types/WalletTypes.ts +480 -0
- package/tmp/generated-test3/types/WatchProgressTypes.ts +493 -0
- package/tmp/generated-test3/utils/core.ts +2316 -0
- package/tmp/generated-test3/utils/supabase-client.ts +17 -0
- package/tmp/prisma-test-schema-2.prisma +339 -0
- package/tmp/prisma-test-schema.prisma +317 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
2
|
+
// Edit the generator script instead: scripts/generate-realtime-hooks.ts
|
|
3
|
+
|
|
4
|
+
// Corrected import for core hook factory
|
|
5
|
+
import { createSuparismaHook } from '../utils/core';
|
|
6
|
+
import type {
|
|
7
|
+
LessonQuestionWithRelations,
|
|
8
|
+
LessonQuestionCreateInput,
|
|
9
|
+
LessonQuestionUpdateInput,
|
|
10
|
+
LessonQuestionWhereInput,
|
|
11
|
+
LessonQuestionWhereUniqueInput,
|
|
12
|
+
LessonQuestionOrderByInput,
|
|
13
|
+
LessonQuestionSelectInput,
|
|
14
|
+
LessonQuestionIncludeInput,
|
|
15
|
+
LessonQuestionHookApi,
|
|
16
|
+
UseLessonQuestionOptions
|
|
17
|
+
} from '../types/LessonQuestionTypes';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A Prisma-like hook for interacting with LessonQuestion records with real-time capabilities.
|
|
21
|
+
*
|
|
22
|
+
* This hook provides CRUD operations, real-time updates, and search functionality.
|
|
23
|
+
*
|
|
24
|
+
* @param options - Optional configuration options for the hook
|
|
25
|
+
* @returns An object with data state and methods for interacting with LessonQuestion records
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // Basic usage - get all LessonQuestion records with realtime updates
|
|
29
|
+
* const lessonquestion = useSuparismaLessonQuestion();
|
|
30
|
+
* const { data, loading, error } = lessonquestion;
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* // With filtering and ordering
|
|
34
|
+
* const lessonquestion = useSuparismaLessonQuestion({
|
|
35
|
+
* where: { active: true },
|
|
36
|
+
* orderBy: { createdAt: 'desc' }, // Note: Using actual Prisma field name
|
|
37
|
+
* limit: 10
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* // Create a new record
|
|
42
|
+
* const result = await lessonquestion.create({
|
|
43
|
+
* name: "Example Name",
|
|
44
|
+
* // other fields...
|
|
45
|
+
* });
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* // Update a record
|
|
49
|
+
* const result = await lessonquestion.update({
|
|
50
|
+
* where: { id: "123" },
|
|
51
|
+
* data: { name: "Updated Name" }
|
|
52
|
+
* });
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* // Delete a record
|
|
56
|
+
* const result = await lessonquestion.delete({ id: "123" });
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* // Find records with specific criteria
|
|
60
|
+
* const result = await lessonquestion.findMany({
|
|
61
|
+
* where: { // filters },
|
|
62
|
+
* orderBy: { // ordering },
|
|
63
|
+
* take: 20 // limit
|
|
64
|
+
* });
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* // Select specific fields only
|
|
68
|
+
* const lessonquestion = useSuparismaLessonQuestion({
|
|
69
|
+
* select: { id: true, name: true }
|
|
70
|
+
* });
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* // Include related records
|
|
74
|
+
* const lessonquestion = useSuparismaLessonQuestion({
|
|
75
|
+
* include: { relatedModel: true }
|
|
76
|
+
* });
|
|
77
|
+
*/
|
|
78
|
+
export const useSuparismaLessonQuestion = createSuparismaHook<
|
|
79
|
+
LessonQuestionWithRelations,
|
|
80
|
+
LessonQuestionWithRelations,
|
|
81
|
+
LessonQuestionCreateInput,
|
|
82
|
+
LessonQuestionUpdateInput,
|
|
83
|
+
LessonQuestionWhereInput,
|
|
84
|
+
LessonQuestionWhereUniqueInput,
|
|
85
|
+
LessonQuestionOrderByInput
|
|
86
|
+
>({
|
|
87
|
+
tableName: 'LessonQuestion',
|
|
88
|
+
hasCreatedAt: true,
|
|
89
|
+
hasUpdatedAt: true,
|
|
90
|
+
// Default values from schema
|
|
91
|
+
defaultValues: {"id":"uuid(","type":"\"multiple_choice\"","order":"0","points":"1","createdAt":"now("},
|
|
92
|
+
// Field name for createdAt from Prisma schema
|
|
93
|
+
createdAtField: "createdAt",
|
|
94
|
+
// Field name for updatedAt from Prisma schema
|
|
95
|
+
updatedAtField: "updatedAt"
|
|
96
|
+
}) as unknown as (options?: UseLessonQuestionOptions) => LessonQuestionHookApi;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
2
|
+
// Edit the generator script instead: scripts/generate-realtime-hooks.ts
|
|
3
|
+
|
|
4
|
+
// Corrected import for core hook factory
|
|
5
|
+
import { createSuparismaHook } from '../utils/core';
|
|
6
|
+
import type {
|
|
7
|
+
PayoutMethodWithRelations,
|
|
8
|
+
PayoutMethodCreateInput,
|
|
9
|
+
PayoutMethodUpdateInput,
|
|
10
|
+
PayoutMethodWhereInput,
|
|
11
|
+
PayoutMethodWhereUniqueInput,
|
|
12
|
+
PayoutMethodOrderByInput,
|
|
13
|
+
PayoutMethodSelectInput,
|
|
14
|
+
PayoutMethodIncludeInput,
|
|
15
|
+
PayoutMethodHookApi,
|
|
16
|
+
UsePayoutMethodOptions
|
|
17
|
+
} from '../types/PayoutMethodTypes';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A Prisma-like hook for interacting with PayoutMethod records with real-time capabilities.
|
|
21
|
+
*
|
|
22
|
+
* This hook provides CRUD operations, real-time updates, and search functionality.
|
|
23
|
+
*
|
|
24
|
+
* @param options - Optional configuration options for the hook
|
|
25
|
+
* @returns An object with data state and methods for interacting with PayoutMethod records
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // Basic usage - get all PayoutMethod records with realtime updates
|
|
29
|
+
* const payoutmethod = useSuparismaPayoutMethod();
|
|
30
|
+
* const { data, loading, error } = payoutmethod;
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* // With filtering and ordering
|
|
34
|
+
* const payoutmethod = useSuparismaPayoutMethod({
|
|
35
|
+
* where: { active: true },
|
|
36
|
+
* orderBy: { createdAt: 'desc' }, // Note: Using actual Prisma field name
|
|
37
|
+
* limit: 10
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* // Create a new record
|
|
42
|
+
* const result = await payoutmethod.create({
|
|
43
|
+
* name: "Example Name",
|
|
44
|
+
* // other fields...
|
|
45
|
+
* });
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* // Update a record
|
|
49
|
+
* const result = await payoutmethod.update({
|
|
50
|
+
* where: { id: "123" },
|
|
51
|
+
* data: { name: "Updated Name" }
|
|
52
|
+
* });
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* // Delete a record
|
|
56
|
+
* const result = await payoutmethod.delete({ id: "123" });
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* // Find records with specific criteria
|
|
60
|
+
* const result = await payoutmethod.findMany({
|
|
61
|
+
* where: { // filters },
|
|
62
|
+
* orderBy: { // ordering },
|
|
63
|
+
* take: 20 // limit
|
|
64
|
+
* });
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* // Select specific fields only
|
|
68
|
+
* const payoutmethod = useSuparismaPayoutMethod({
|
|
69
|
+
* select: { id: true, name: true }
|
|
70
|
+
* });
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* // Include related records
|
|
74
|
+
* const payoutmethod = useSuparismaPayoutMethod({
|
|
75
|
+
* include: { relatedModel: true }
|
|
76
|
+
* });
|
|
77
|
+
*/
|
|
78
|
+
export const useSuparismaPayoutMethod = createSuparismaHook<
|
|
79
|
+
PayoutMethodWithRelations,
|
|
80
|
+
PayoutMethodWithRelations,
|
|
81
|
+
PayoutMethodCreateInput,
|
|
82
|
+
PayoutMethodUpdateInput,
|
|
83
|
+
PayoutMethodWhereInput,
|
|
84
|
+
PayoutMethodWhereUniqueInput,
|
|
85
|
+
PayoutMethodOrderByInput
|
|
86
|
+
>({
|
|
87
|
+
tableName: 'PayoutMethod',
|
|
88
|
+
hasCreatedAt: true,
|
|
89
|
+
hasUpdatedAt: true,
|
|
90
|
+
// Default values from schema
|
|
91
|
+
defaultValues: {"id":"uuid(","isDefault":"false","isVerified":"false","createdAt":"now("},
|
|
92
|
+
// Field name for createdAt from Prisma schema
|
|
93
|
+
createdAtField: "createdAt",
|
|
94
|
+
// Field name for updatedAt from Prisma schema
|
|
95
|
+
updatedAtField: "updatedAt"
|
|
96
|
+
}) as unknown as (options?: UsePayoutMethodOptions) => PayoutMethodHookApi;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
2
|
+
// Edit the generator script instead: scripts/generate-realtime-hooks.ts
|
|
3
|
+
|
|
4
|
+
// Corrected import for core hook factory
|
|
5
|
+
import { createSuparismaHook } from '../utils/core';
|
|
6
|
+
import type {
|
|
7
|
+
PayoutRequestWithRelations,
|
|
8
|
+
PayoutRequestCreateInput,
|
|
9
|
+
PayoutRequestUpdateInput,
|
|
10
|
+
PayoutRequestWhereInput,
|
|
11
|
+
PayoutRequestWhereUniqueInput,
|
|
12
|
+
PayoutRequestOrderByInput,
|
|
13
|
+
PayoutRequestSelectInput,
|
|
14
|
+
PayoutRequestIncludeInput,
|
|
15
|
+
PayoutRequestHookApi,
|
|
16
|
+
UsePayoutRequestOptions
|
|
17
|
+
} from '../types/PayoutRequestTypes';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A Prisma-like hook for interacting with PayoutRequest records with real-time capabilities.
|
|
21
|
+
*
|
|
22
|
+
* This hook provides CRUD operations, real-time updates, and search functionality.
|
|
23
|
+
*
|
|
24
|
+
* @param options - Optional configuration options for the hook
|
|
25
|
+
* @returns An object with data state and methods for interacting with PayoutRequest records
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // Basic usage - get all PayoutRequest records with realtime updates
|
|
29
|
+
* const payoutrequest = useSuparismaPayoutRequest();
|
|
30
|
+
* const { data, loading, error } = payoutrequest;
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* // With filtering and ordering
|
|
34
|
+
* const payoutrequest = useSuparismaPayoutRequest({
|
|
35
|
+
* where: { active: true },
|
|
36
|
+
* orderBy: { createdAt: 'desc' }, // Note: Using actual Prisma field name
|
|
37
|
+
* limit: 10
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* // Create a new record
|
|
42
|
+
* const result = await payoutrequest.create({
|
|
43
|
+
* name: "Example Name",
|
|
44
|
+
* // other fields...
|
|
45
|
+
* });
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* // Update a record
|
|
49
|
+
* const result = await payoutrequest.update({
|
|
50
|
+
* where: { id: "123" },
|
|
51
|
+
* data: { name: "Updated Name" }
|
|
52
|
+
* });
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* // Delete a record
|
|
56
|
+
* const result = await payoutrequest.delete({ id: "123" });
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* // Find records with specific criteria
|
|
60
|
+
* const result = await payoutrequest.findMany({
|
|
61
|
+
* where: { // filters },
|
|
62
|
+
* orderBy: { // ordering },
|
|
63
|
+
* take: 20 // limit
|
|
64
|
+
* });
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* // Select specific fields only
|
|
68
|
+
* const payoutrequest = useSuparismaPayoutRequest({
|
|
69
|
+
* select: { id: true, name: true }
|
|
70
|
+
* });
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* // Include related records
|
|
74
|
+
* const payoutrequest = useSuparismaPayoutRequest({
|
|
75
|
+
* include: { relatedModel: true }
|
|
76
|
+
* });
|
|
77
|
+
*/
|
|
78
|
+
export const useSuparismaPayoutRequest = createSuparismaHook<
|
|
79
|
+
PayoutRequestWithRelations,
|
|
80
|
+
PayoutRequestWithRelations,
|
|
81
|
+
PayoutRequestCreateInput,
|
|
82
|
+
PayoutRequestUpdateInput,
|
|
83
|
+
PayoutRequestWhereInput,
|
|
84
|
+
PayoutRequestWhereUniqueInput,
|
|
85
|
+
PayoutRequestOrderByInput
|
|
86
|
+
>({
|
|
87
|
+
tableName: 'PayoutRequest',
|
|
88
|
+
hasCreatedAt: true,
|
|
89
|
+
hasUpdatedAt: true,
|
|
90
|
+
// Default values from schema
|
|
91
|
+
defaultValues: {"id":"uuid(","status":"\"pending\"","createdAt":"now("},
|
|
92
|
+
// Field name for createdAt from Prisma schema
|
|
93
|
+
createdAtField: "createdAt",
|
|
94
|
+
// Field name for updatedAt from Prisma schema
|
|
95
|
+
updatedAtField: "updatedAt"
|
|
96
|
+
}) as unknown as (options?: UsePayoutRequestOptions) => PayoutRequestHookApi;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
2
|
+
// Edit the generator script instead: scripts/generate-realtime-hooks.ts
|
|
3
|
+
|
|
4
|
+
// Corrected import for core hook factory
|
|
5
|
+
import { createSuparismaHook } from '../utils/core';
|
|
6
|
+
import type {
|
|
7
|
+
QuestionOptionWithRelations,
|
|
8
|
+
QuestionOptionCreateInput,
|
|
9
|
+
QuestionOptionUpdateInput,
|
|
10
|
+
QuestionOptionWhereInput,
|
|
11
|
+
QuestionOptionWhereUniqueInput,
|
|
12
|
+
QuestionOptionOrderByInput,
|
|
13
|
+
QuestionOptionSelectInput,
|
|
14
|
+
QuestionOptionIncludeInput,
|
|
15
|
+
QuestionOptionHookApi,
|
|
16
|
+
UseQuestionOptionOptions
|
|
17
|
+
} from '../types/QuestionOptionTypes';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A Prisma-like hook for interacting with QuestionOption records with real-time capabilities.
|
|
21
|
+
*
|
|
22
|
+
* This hook provides CRUD operations, real-time updates, and search functionality.
|
|
23
|
+
*
|
|
24
|
+
* @param options - Optional configuration options for the hook
|
|
25
|
+
* @returns An object with data state and methods for interacting with QuestionOption records
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // Basic usage - get all QuestionOption records with realtime updates
|
|
29
|
+
* const questionoption = useSuparismaQuestionOption();
|
|
30
|
+
* const { data, loading, error } = questionoption;
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* // With filtering and ordering
|
|
34
|
+
* const questionoption = useSuparismaQuestionOption({
|
|
35
|
+
* where: { active: true },
|
|
36
|
+
* orderBy: { createdAt: 'desc' }, // Note: Using actual Prisma field name
|
|
37
|
+
* limit: 10
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* // Create a new record
|
|
42
|
+
* const result = await questionoption.create({
|
|
43
|
+
* name: "Example Name",
|
|
44
|
+
* // other fields...
|
|
45
|
+
* });
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* // Update a record
|
|
49
|
+
* const result = await questionoption.update({
|
|
50
|
+
* where: { id: "123" },
|
|
51
|
+
* data: { name: "Updated Name" }
|
|
52
|
+
* });
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* // Delete a record
|
|
56
|
+
* const result = await questionoption.delete({ id: "123" });
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* // Find records with specific criteria
|
|
60
|
+
* const result = await questionoption.findMany({
|
|
61
|
+
* where: { // filters },
|
|
62
|
+
* orderBy: { // ordering },
|
|
63
|
+
* take: 20 // limit
|
|
64
|
+
* });
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* // Select specific fields only
|
|
68
|
+
* const questionoption = useSuparismaQuestionOption({
|
|
69
|
+
* select: { id: true, name: true }
|
|
70
|
+
* });
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* // Include related records
|
|
74
|
+
* const questionoption = useSuparismaQuestionOption({
|
|
75
|
+
* include: { relatedModel: true }
|
|
76
|
+
* });
|
|
77
|
+
*/
|
|
78
|
+
export const useSuparismaQuestionOption = createSuparismaHook<
|
|
79
|
+
QuestionOptionWithRelations,
|
|
80
|
+
QuestionOptionWithRelations,
|
|
81
|
+
QuestionOptionCreateInput,
|
|
82
|
+
QuestionOptionUpdateInput,
|
|
83
|
+
QuestionOptionWhereInput,
|
|
84
|
+
QuestionOptionWhereUniqueInput,
|
|
85
|
+
QuestionOptionOrderByInput
|
|
86
|
+
>({
|
|
87
|
+
tableName: 'QuestionOption',
|
|
88
|
+
hasCreatedAt: false,
|
|
89
|
+
hasUpdatedAt: false,
|
|
90
|
+
// Default values from schema
|
|
91
|
+
defaultValues: {"id":"uuid(","isCorrect":"false","order":"0"}
|
|
92
|
+
}) as unknown as (options?: UseQuestionOptionOptions) => QuestionOptionHookApi;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
2
|
+
// Edit the generator script instead: scripts/generate-realtime-hooks.ts
|
|
3
|
+
|
|
4
|
+
// Corrected import for core hook factory
|
|
5
|
+
import { createSuparismaHook } from '../utils/core';
|
|
6
|
+
import type {
|
|
7
|
+
SavedPaymentMethodWithRelations,
|
|
8
|
+
SavedPaymentMethodCreateInput,
|
|
9
|
+
SavedPaymentMethodUpdateInput,
|
|
10
|
+
SavedPaymentMethodWhereInput,
|
|
11
|
+
SavedPaymentMethodWhereUniqueInput,
|
|
12
|
+
SavedPaymentMethodOrderByInput,
|
|
13
|
+
SavedPaymentMethodSelectInput,
|
|
14
|
+
SavedPaymentMethodIncludeInput,
|
|
15
|
+
SavedPaymentMethodHookApi,
|
|
16
|
+
UseSavedPaymentMethodOptions
|
|
17
|
+
} from '../types/SavedPaymentMethodTypes';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A Prisma-like hook for interacting with SavedPaymentMethod records with real-time capabilities.
|
|
21
|
+
*
|
|
22
|
+
* This hook provides CRUD operations, real-time updates, and search functionality.
|
|
23
|
+
*
|
|
24
|
+
* @param options - Optional configuration options for the hook
|
|
25
|
+
* @returns An object with data state and methods for interacting with SavedPaymentMethod records
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // Basic usage - get all SavedPaymentMethod records with realtime updates
|
|
29
|
+
* const savedpaymentmethod = useSuparismaSavedPaymentMethod();
|
|
30
|
+
* const { data, loading, error } = savedpaymentmethod;
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* // With filtering and ordering
|
|
34
|
+
* const savedpaymentmethod = useSuparismaSavedPaymentMethod({
|
|
35
|
+
* where: { active: true },
|
|
36
|
+
* orderBy: { createdAt: 'desc' }, // Note: Using actual Prisma field name
|
|
37
|
+
* limit: 10
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* // Create a new record
|
|
42
|
+
* const result = await savedpaymentmethod.create({
|
|
43
|
+
* name: "Example Name",
|
|
44
|
+
* // other fields...
|
|
45
|
+
* });
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* // Update a record
|
|
49
|
+
* const result = await savedpaymentmethod.update({
|
|
50
|
+
* where: { id: "123" },
|
|
51
|
+
* data: { name: "Updated Name" }
|
|
52
|
+
* });
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* // Delete a record
|
|
56
|
+
* const result = await savedpaymentmethod.delete({ id: "123" });
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* // Find records with specific criteria
|
|
60
|
+
* const result = await savedpaymentmethod.findMany({
|
|
61
|
+
* where: { // filters },
|
|
62
|
+
* orderBy: { // ordering },
|
|
63
|
+
* take: 20 // limit
|
|
64
|
+
* });
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* // Select specific fields only
|
|
68
|
+
* const savedpaymentmethod = useSuparismaSavedPaymentMethod({
|
|
69
|
+
* select: { id: true, name: true }
|
|
70
|
+
* });
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* // Include related records
|
|
74
|
+
* const savedpaymentmethod = useSuparismaSavedPaymentMethod({
|
|
75
|
+
* include: { relatedModel: true }
|
|
76
|
+
* });
|
|
77
|
+
*/
|
|
78
|
+
export const useSuparismaSavedPaymentMethod = createSuparismaHook<
|
|
79
|
+
SavedPaymentMethodWithRelations,
|
|
80
|
+
SavedPaymentMethodWithRelations,
|
|
81
|
+
SavedPaymentMethodCreateInput,
|
|
82
|
+
SavedPaymentMethodUpdateInput,
|
|
83
|
+
SavedPaymentMethodWhereInput,
|
|
84
|
+
SavedPaymentMethodWhereUniqueInput,
|
|
85
|
+
SavedPaymentMethodOrderByInput
|
|
86
|
+
>({
|
|
87
|
+
tableName: 'SavedPaymentMethod',
|
|
88
|
+
hasCreatedAt: true,
|
|
89
|
+
hasUpdatedAt: true,
|
|
90
|
+
// Default values from schema
|
|
91
|
+
defaultValues: {"id":"uuid(","isDefault":"false","createdAt":"now("},
|
|
92
|
+
// Field name for createdAt from Prisma schema
|
|
93
|
+
createdAtField: "createdAt",
|
|
94
|
+
// Field name for updatedAt from Prisma schema
|
|
95
|
+
updatedAtField: "updatedAt"
|
|
96
|
+
}) as unknown as (options?: UseSavedPaymentMethodOptions) => SavedPaymentMethodHookApi;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
2
|
+
// Edit the generator script instead: scripts/generate-realtime-hooks.ts
|
|
3
|
+
|
|
4
|
+
// Corrected import for core hook factory
|
|
5
|
+
import { createSuparismaHook } from '../utils/core';
|
|
6
|
+
import type {
|
|
7
|
+
TeacherPayoutInfoWithRelations,
|
|
8
|
+
TeacherPayoutInfoCreateInput,
|
|
9
|
+
TeacherPayoutInfoUpdateInput,
|
|
10
|
+
TeacherPayoutInfoWhereInput,
|
|
11
|
+
TeacherPayoutInfoWhereUniqueInput,
|
|
12
|
+
TeacherPayoutInfoOrderByInput,
|
|
13
|
+
TeacherPayoutInfoSelectInput,
|
|
14
|
+
TeacherPayoutInfoIncludeInput,
|
|
15
|
+
TeacherPayoutInfoHookApi,
|
|
16
|
+
UseTeacherPayoutInfoOptions
|
|
17
|
+
} from '../types/TeacherPayoutInfoTypes';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A Prisma-like hook for interacting with TeacherPayoutInfo records with real-time capabilities.
|
|
21
|
+
*
|
|
22
|
+
* This hook provides CRUD operations, real-time updates, and search functionality.
|
|
23
|
+
*
|
|
24
|
+
* @param options - Optional configuration options for the hook
|
|
25
|
+
* @returns An object with data state and methods for interacting with TeacherPayoutInfo records
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // Basic usage - get all TeacherPayoutInfo records with realtime updates
|
|
29
|
+
* const teacherpayoutinfo = useSuparismaTeacherPayoutInfo();
|
|
30
|
+
* const { data, loading, error } = teacherpayoutinfo;
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* // With filtering and ordering
|
|
34
|
+
* const teacherpayoutinfo = useSuparismaTeacherPayoutInfo({
|
|
35
|
+
* where: { active: true },
|
|
36
|
+
* orderBy: { createdAt: 'desc' }, // Note: Using actual Prisma field name
|
|
37
|
+
* limit: 10
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* // Create a new record
|
|
42
|
+
* const result = await teacherpayoutinfo.create({
|
|
43
|
+
* name: "Example Name",
|
|
44
|
+
* // other fields...
|
|
45
|
+
* });
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* // Update a record
|
|
49
|
+
* const result = await teacherpayoutinfo.update({
|
|
50
|
+
* where: { id: "123" },
|
|
51
|
+
* data: { name: "Updated Name" }
|
|
52
|
+
* });
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* // Delete a record
|
|
56
|
+
* const result = await teacherpayoutinfo.delete({ id: "123" });
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* // Find records with specific criteria
|
|
60
|
+
* const result = await teacherpayoutinfo.findMany({
|
|
61
|
+
* where: { // filters },
|
|
62
|
+
* orderBy: { // ordering },
|
|
63
|
+
* take: 20 // limit
|
|
64
|
+
* });
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* // Select specific fields only
|
|
68
|
+
* const teacherpayoutinfo = useSuparismaTeacherPayoutInfo({
|
|
69
|
+
* select: { id: true, name: true }
|
|
70
|
+
* });
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* // Include related records
|
|
74
|
+
* const teacherpayoutinfo = useSuparismaTeacherPayoutInfo({
|
|
75
|
+
* include: { relatedModel: true }
|
|
76
|
+
* });
|
|
77
|
+
*/
|
|
78
|
+
export const useSuparismaTeacherPayoutInfo = createSuparismaHook<
|
|
79
|
+
TeacherPayoutInfoWithRelations,
|
|
80
|
+
TeacherPayoutInfoWithRelations,
|
|
81
|
+
TeacherPayoutInfoCreateInput,
|
|
82
|
+
TeacherPayoutInfoUpdateInput,
|
|
83
|
+
TeacherPayoutInfoWhereInput,
|
|
84
|
+
TeacherPayoutInfoWhereUniqueInput,
|
|
85
|
+
TeacherPayoutInfoOrderByInput
|
|
86
|
+
>({
|
|
87
|
+
tableName: 'TeacherPayoutInfo',
|
|
88
|
+
hasCreatedAt: true,
|
|
89
|
+
hasUpdatedAt: true,
|
|
90
|
+
// Default values from schema
|
|
91
|
+
defaultValues: {"id":"uuid(","payoutFrequency":"\"daily\"","createdAt":"now("},
|
|
92
|
+
// Field name for createdAt from Prisma schema
|
|
93
|
+
createdAtField: "createdAt",
|
|
94
|
+
// Field name for updatedAt from Prisma schema
|
|
95
|
+
updatedAtField: "updatedAt"
|
|
96
|
+
}) as unknown as (options?: UseTeacherPayoutInfoOptions) => TeacherPayoutInfoHookApi;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
2
|
+
// Edit the generator script instead: scripts/generate-realtime-hooks.ts
|
|
3
|
+
|
|
4
|
+
// Corrected import for core hook factory
|
|
5
|
+
import { createSuparismaHook } from '../utils/core';
|
|
6
|
+
import type {
|
|
7
|
+
ThingWithRelations,
|
|
8
|
+
ThingCreateInput,
|
|
9
|
+
ThingUpdateInput,
|
|
10
|
+
ThingWhereInput,
|
|
11
|
+
ThingWhereUniqueInput,
|
|
12
|
+
ThingOrderByInput,
|
|
13
|
+
ThingSelectInput,
|
|
14
|
+
ThingIncludeInput,
|
|
15
|
+
ThingHookApi,
|
|
16
|
+
UseThingOptions
|
|
17
|
+
} from '../types/ThingTypes';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A Prisma-like hook for interacting with Thing records with real-time capabilities.
|
|
21
|
+
*
|
|
22
|
+
* This hook provides CRUD operations, real-time updates, and search functionality.
|
|
23
|
+
*
|
|
24
|
+
* @param options - Optional configuration options for the hook
|
|
25
|
+
* @returns An object with data state and methods for interacting with Thing records
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // Basic usage - get all Thing records with realtime updates
|
|
29
|
+
* const thing = useSuparismaThing();
|
|
30
|
+
* const { data, loading, error } = thing;
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* // With filtering and ordering
|
|
34
|
+
* const thing = useSuparismaThing({
|
|
35
|
+
* where: { active: true },
|
|
36
|
+
* orderBy: { createdAt: 'desc' }, // Note: Using actual Prisma field name
|
|
37
|
+
* limit: 10
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* // Create a new record
|
|
42
|
+
* const result = await thing.create({
|
|
43
|
+
* name: "Example Name",
|
|
44
|
+
* // other fields...
|
|
45
|
+
* });
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* // Update a record
|
|
49
|
+
* const result = await thing.update({
|
|
50
|
+
* where: { id: "123" },
|
|
51
|
+
* data: { name: "Updated Name" }
|
|
52
|
+
* });
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* // Delete a record
|
|
56
|
+
* const result = await thing.delete({ id: "123" });
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* // Find records with specific criteria
|
|
60
|
+
* const result = await thing.findMany({
|
|
61
|
+
* where: { // filters },
|
|
62
|
+
* orderBy: { // ordering },
|
|
63
|
+
* take: 20 // limit
|
|
64
|
+
* });
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* // Select specific fields only
|
|
68
|
+
* const thing = useSuparismaThing({
|
|
69
|
+
* select: { id: true, name: true }
|
|
70
|
+
* });
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* // Include related records
|
|
74
|
+
* const thing = useSuparismaThing({
|
|
75
|
+
* include: { relatedModel: true }
|
|
76
|
+
* });
|
|
77
|
+
*/
|
|
78
|
+
export const useSuparismaThing = createSuparismaHook<
|
|
79
|
+
ThingWithRelations,
|
|
80
|
+
ThingWithRelations,
|
|
81
|
+
ThingCreateInput,
|
|
82
|
+
ThingUpdateInput,
|
|
83
|
+
ThingWhereInput,
|
|
84
|
+
ThingWhereUniqueInput,
|
|
85
|
+
ThingOrderByInput
|
|
86
|
+
>({
|
|
87
|
+
tableName: 'Thing',
|
|
88
|
+
hasCreatedAt: true,
|
|
89
|
+
hasUpdatedAt: true,
|
|
90
|
+
// Default values from schema
|
|
91
|
+
defaultValues: {"id":"uuid(","status":"\"pending\"","priority":"0","createdAt":"now("},
|
|
92
|
+
// Field name for createdAt from Prisma schema
|
|
93
|
+
createdAtField: "createdAt",
|
|
94
|
+
// Field name for updatedAt from Prisma schema
|
|
95
|
+
updatedAtField: "updatedAt"
|
|
96
|
+
}) as unknown as (options?: UseThingOptions) => ThingHookApi;
|