frontend-toegevoegd
This commit is contained in:
74
agiledancers-fe/src/app/core/api-models.ts
Normal file
74
agiledancers-fe/src/app/core/api-models.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
export interface School {
|
||||
id: number;
|
||||
name: string;
|
||||
dancerIds: number[];
|
||||
danceGroupIds: number[];
|
||||
showIds: number[];
|
||||
}
|
||||
export interface Dancer {
|
||||
id: number;
|
||||
name: string;
|
||||
birthDate: string;
|
||||
}
|
||||
export type GroupType = 'SHOW_CASE' | 'PRE_EDUCATION' | 'SELECTION' | 'REGULAR' | 'PRE_SCHOOLER';
|
||||
export type GroupStyle = 'HIPHOP' | 'JAZZ' | 'MODERN' | 'STREETDANCE' | 'CLASSIC' | 'BREAKDANCE';
|
||||
export interface DanceGroup {
|
||||
id: number;
|
||||
category: string;
|
||||
type: GroupType;
|
||||
startAge: number;
|
||||
endAge: number;
|
||||
styles: GroupStyle[];
|
||||
dancerIds: number[];
|
||||
}
|
||||
export interface Show {
|
||||
id: number;
|
||||
name: string;
|
||||
date: string;
|
||||
dayParts: { type: 'MORNING' | 'AFTERNOON' | 'EVENING'; danceGroupIds: number[] }[];
|
||||
}
|
||||
export interface SchoolRequest {
|
||||
name: string;
|
||||
}
|
||||
export interface DancerRequest {
|
||||
name: string;
|
||||
birthDate: string;
|
||||
}
|
||||
export interface GroupRequest {
|
||||
category: string;
|
||||
type: GroupType;
|
||||
startAge: number;
|
||||
endAge: number;
|
||||
styles: GroupStyle[];
|
||||
}
|
||||
export interface ShowRequest {
|
||||
name: string;
|
||||
date: string;
|
||||
}
|
||||
export type ResourceKind = 'school' | 'dancer' | 'group' | 'show';
|
||||
export type EditorTarget =
|
||||
| { kind: 'school'; value?: School }
|
||||
| { kind: 'dancer'; value?: Dancer }
|
||||
| { kind: 'group'; value?: DanceGroup }
|
||||
| { kind: 'show'; value?: Show };
|
||||
export interface SchoolData {
|
||||
school: School;
|
||||
dancers: Dancer[];
|
||||
groups: DanceGroup[];
|
||||
shows: Show[];
|
||||
}
|
||||
export const GROUP_TYPES: { value: GroupType; label: string }[] = [
|
||||
{ value: 'REGULAR', label: 'Regulier' },
|
||||
{ value: 'SHOW_CASE', label: 'Showcase' },
|
||||
{ value: 'PRE_EDUCATION', label: 'Vooropleiding' },
|
||||
{ value: 'SELECTION', label: 'Selectie' },
|
||||
{ value: 'PRE_SCHOOLER', label: 'Kleuters' },
|
||||
];
|
||||
export const GROUP_STYLES: { value: GroupStyle; label: string }[] = [
|
||||
{ value: 'HIPHOP', label: 'Hiphop' },
|
||||
{ value: 'JAZZ', label: 'Jazz' },
|
||||
{ value: 'MODERN', label: 'Modern' },
|
||||
{ value: 'STREETDANCE', label: 'Streetdance' },
|
||||
{ value: 'CLASSIC', label: 'Klassiek' },
|
||||
{ value: 'BREAKDANCE', label: 'Breakdance' },
|
||||
];
|
||||
Reference in New Issue
Block a user