import { BaseCRUDAPI } from "../_base"; const prefix = "/api"; export interface CreateUnit { name: string; abbreviation: string; fraction: boolean; description: string; } export interface Unit extends CreateUnit { id: number; } const routes = { unit: `${prefix}/units`, unitsUnit: (tag: string) => `${prefix}/units/${tag}`, }; export class UnitAPI extends BaseCRUDAPI { baseRoute: string = routes.unit; itemRoute = routes.unitsUnit; }