update,
This commit is contained in:
@@ -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[];
|
||||
}
|
23
002_source/cms/src/db/LessonCategories/type.d.ts
vendored
Normal file
23
002_source/cms/src/db/LessonCategories/type.d.ts
vendored
Normal 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';
|
||||
}
|
Reference in New Issue
Block a user