veza/apps/web/src/services/educationService.ts

42 lines
2.5 KiB
TypeScript

import { Course } from '../types';
const CATALOG_COURSES: Course[] = [
{ id: '1', title: 'Mastering with Ozone 10', level: 'Advanced', duration: '3h 45m', progress: 0, instructor: 'Luca Pretellesi', thumbnailUrl: 'https://picsum.photos/id/200/400/250', price: 49.99, rating: 4.8, studentCount: 1200, tags: ['Mixing', 'Mastering'] },
{ id: '2', title: 'Music Theory for Producers', level: 'Beginner', duration: '5h 10m', progress: 0, instructor: 'Sarah Devine', thumbnailUrl: 'https://picsum.photos/id/201/400/250', price: 29.99, rating: 4.5, studentCount: 3400, tags: ['Theory', 'Composition'] },
{ id: '3', title: 'Sound Design from Scratch', level: 'Intermediate', duration: '4h 30m', progress: 0, instructor: 'Noisia', thumbnailUrl: 'https://picsum.photos/id/202/400/250', price: 39.99, rating: 4.9, studentCount: 850, tags: ['Sound Design', 'Synthesis'] },
{ id: '4', title: 'Ableton Live 11 Fundamentals', level: 'Beginner', duration: '8h 20m', progress: 0, instructor: 'Ableton Certified', thumbnailUrl: 'https://picsum.photos/id/203/400/250', price: 0, rating: 4.7, studentCount: 15000, tags: ['DAW', 'Ableton'] },
{ id: '5', title: 'Advanced Serum Techniques', level: 'Advanced', duration: '2h 15m', progress: 0, instructor: 'Au5', thumbnailUrl: 'https://picsum.photos/id/204/400/250', price: 34.99, rating: 4.9, studentCount: 600, tags: ['Synthesis', 'Serum'] },
];
const MY_COURSES: Course[] = [
{
id: 'c1', title: 'Mastering with Ozone 10', level: 'Advanced', duration: '3h 45m', progress: 75,
thumbnailUrl: 'https://picsum.photos/id/200/400/250', instructor: 'Luca Pretellesi', lastAccessed: '2 days ago'
},
{
id: 'c2', title: 'Music Theory for Producers', level: 'Beginner', duration: '5h 10m', progress: 10,
thumbnailUrl: 'https://picsum.photos/id/201/400/250', instructor: 'Sarah Devine', lastAccessed: '1 week ago'
},
{
id: 'c3', title: 'Ableton Live 11 Fundamentals', level: 'Beginner', duration: '8h 20m', progress: 100,
thumbnailUrl: 'https://picsum.photos/id/203/400/250', instructor: 'Ableton Certified', lastAccessed: '1 month ago', certificateAvailable: true
},
];
export const educationService = {
getCatalog: async () => {
await new Promise(resolve => setTimeout(resolve, 500));
return CATALOG_COURSES;
},
getMyCourses: async () => {
await new Promise(resolve => setTimeout(resolve, 400));
return MY_COURSES;
},
enroll: async (_courseId: string) => {
await new Promise(resolve => setTimeout(resolve, 600));
return { success: true };
}
};