This commit is contained in:
louiscklaw
2025-04-26 06:15:18 +08:00
parent df87cfb037
commit 6e8fea3bdd
57 changed files with 1392 additions and 20183 deletions

View File

@@ -0,0 +1,13 @@
//
// RULES:
import { COL_LESSON_CATEGORIES } from '@/constants';
import { pb } from '@/lib/pb';
import type { LessonCategory } from './type';
export async function listLessonCategories(): Promise<LessonCategory[]> {
const records = await pb.collection(COL_LESSON_CATEGORIES).getFullList({
expand: 'cat_id',
});
return records as unknown as LessonCategory[];
}

View File

@@ -0,0 +1,23 @@
export interface LessonCategory {
isEmpty?: boolean;
//
id: string;
collectionId: string;
//
cat_name: string;
cat_image_url?: string;
cat_image?: string;
pos: number;
visible: string;
lesson_id: string;
description: string;
remarks: string;
createdAt: Date;
//
name: string;
avatar: string;
email: string;
phone: string;
quota: number;
status: 'pending' | 'active' | 'blocked' | 'NA';
}