Rename JavGame to Game because all games are not from or at Jav

This commit is contained in:
pikiou
2022-03-11 13:29:04 +01:00
parent 57057780d8
commit ed8f20072f
17 changed files with 112 additions and 127 deletions

View File

@@ -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">

View 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()

View File

@@ -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()