#11 - Modify Types Definition

This commit is contained in:
Luciano Giacchetta 2025-08-20 14:59:14 -03:00
parent caa14b480e
commit c007668002
7 changed files with 80 additions and 3 deletions

View File

@ -1,4 +1,4 @@
import type { CareerCourse } from '@/types/career.ts';
import type { CareerCourse } from './career.ts';
type Position = 'left' | 'right';

View File

@ -1,4 +1,4 @@
import type { CourseLevel, PriceBox } from '@/enums';
import type { CourseLevel, PriceBox } from '../enums';
export type Career = {
image: any;

View File

@ -0,0 +1,24 @@
import type { Courses } from './codyops-courses'
import type { Users } from "./codyops-users";
export interface Careers {
id: string;
slug: string;
status: string;
sort: number | null;
user_created: Users;
user_updated: Users;
date_created: string | null;
date_updated: string | null;
name: string;
description: string;
courses: CodyopsCourses;
}
interface CodyopsCourses {
codyops_courses_id: Courses
}
export interface CodyopsCareers {
codyops_careers: Careers;
}

View File

@ -0,0 +1,32 @@
import type { Modules } from "./codyops-modules";
import type { Careers } from "./codyops-careers";
import type { Users } from "./codyops-users";
export interface Courses {
id: string;
status: string;
sort: number | null;
user_created?: Partial<Users>;
user_updated: Users;
date_created: string | null;
date_updated: string | null;
name: string;
description: string;
level: string;
type: string;
category: string;
language: string;
features: string;
version: string;
image: string;
modules?: Partial<Modules>[];
content: string;
cloud: string;
codyops_careers?: {
codyops_careers_id?: Partial<Careers>;
};
}
export interface CodyopsCourses {
codyops_courses: Courses[];
}

View File

@ -0,0 +1,15 @@
export interface Modules {
id: string;
status: string;
sort: number | null;
user_created: string | null;
user_updated: string | null;
date_created: string | null;
date_updated: string | null;
title: string;
description: string;
video_theory: string;
video_practice: string;
duration: string;
courses_id: string;
}

View File

@ -0,0 +1,6 @@
export interface Users {
first_name: string;
last_name: string;
avatar: string;
url: string;
}

View File

@ -1,4 +1,4 @@
import type { Accordion } from '@/types/accordion.ts';
import type { Accordion } from './accordion.ts';
export type Course = {
title: string;