mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 13:56:29 +02:00
Rename JavGame to Game because all games are not from or at Jav
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
export class JavGame {
|
||||
export class Game {
|
||||
id = 0
|
||||
|
||||
title = ""
|
||||
@@ -19,18 +19,12 @@ export class JavGame {
|
||||
|
||||
bggId = 0
|
||||
|
||||
copies = 1
|
||||
|
||||
lendAvailability = 0
|
||||
|
||||
notStored = 0
|
||||
|
||||
ean = ""
|
||||
|
||||
bggPhoto = ""
|
||||
}
|
||||
|
||||
export const translationJavGame: { [k in keyof JavGame]: string } = {
|
||||
export const translationGame: { [k in keyof Game]: string } = {
|
||||
id: "id",
|
||||
title: "titre",
|
||||
author: "auteur",
|
||||
@@ -41,13 +35,10 @@ export const translationJavGame: { [k in keyof JavGame]: string } = {
|
||||
type: "type",
|
||||
poufpaf: "poufpaf",
|
||||
bggId: "bggId",
|
||||
copies: "exemplaires",
|
||||
lendAvailability: "dispoPret",
|
||||
notStored: "nonRangee",
|
||||
ean: "ean",
|
||||
bggPhoto: "bggPhoto",
|
||||
}
|
||||
|
||||
export const elementName = "JavGame"
|
||||
export const elementName = "Game"
|
||||
|
||||
export type JavGameWithoutId = Omit<JavGame, "id">
|
||||
export type GameWithoutId = Omit<Game, "id">
|
9
src/services/gamesAccessors.ts
Normal file
9
src/services/gamesAccessors.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import ServiceAccessors from "./accessors"
|
||||
import { elementName, Game, GameWithoutId } from "./games"
|
||||
|
||||
const serviceAccessors = new ServiceAccessors<GameWithoutId, Game>(elementName)
|
||||
|
||||
export const gameListGet = serviceAccessors.listGet()
|
||||
export const gameGet = serviceAccessors.get()
|
||||
export const gameAdd = serviceAccessors.add()
|
||||
export const gameSet = serviceAccessors.set()
|
@@ -1,9 +0,0 @@
|
||||
import ServiceAccessors from "./accessors"
|
||||
import { elementName, JavGame, JavGameWithoutId } from "./javGames"
|
||||
|
||||
const serviceAccessors = new ServiceAccessors<JavGameWithoutId, JavGame>(elementName)
|
||||
|
||||
export const javGameListGet = serviceAccessors.listGet()
|
||||
export const javGameGet = serviceAccessors.get()
|
||||
export const javGameAdd = serviceAccessors.add()
|
||||
export const javGameSet = serviceAccessors.set()
|
Reference in New Issue
Block a user