generateur_v3/frontend/src/types/exo.type.ts

29 lines
639 B
TypeScript

export type Tag = {
label: string,
color: string,
id_code: string
}
export type Exercice = {
supports: {csv: boolean, pdf:boolean, web:boolean}
name: string,
consigne: string,
private: boolean,
id_code: string,
exo_source: string,
author: { username: string },
original: {name: string, id_code: string, author: string} | null
tags: Tag[],
examples: { type: string, data: { calcul: string, correction: string }[] },
is_author: boolean
}
export type Page ={
items: Exercice[],
total: number,
page: number,
size: number,
totalPage: number,
hasMore: number
}