mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 13:56:29 +02:00
Add teamList in store
This commit is contained in:
39
src/services/teams.ts
Normal file
39
src/services/teams.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import ServiceAccessors from "./accessors"
|
||||
|
||||
export class Team {
|
||||
id = 0
|
||||
|
||||
name = ""
|
||||
|
||||
min = 0
|
||||
|
||||
max = 0
|
||||
|
||||
description = ""
|
||||
|
||||
before = ""
|
||||
|
||||
during = ""
|
||||
|
||||
after = ""
|
||||
}
|
||||
|
||||
export const translationTeam: { [k in keyof Team]: string } = {
|
||||
id: "id",
|
||||
name: "nom",
|
||||
min: "min",
|
||||
max: "max",
|
||||
description: "description",
|
||||
before: "avant",
|
||||
during: "pendant",
|
||||
after: "après",
|
||||
}
|
||||
|
||||
const elementName = "Team"
|
||||
|
||||
export type TeamWithoutId = Omit<Team, "id">
|
||||
|
||||
const serviceAccessors = new ServiceAccessors<TeamWithoutId, Team>(elementName)
|
||||
|
||||
export const teamListGet = serviceAccessors.listGet()
|
||||
export const teamGet = serviceAccessors.get()
|
Reference in New Issue
Block a user