import { TjanstResponse } from './api/tjanst.response.model';

export interface Tjanst {
  id?: string;
  name: string;
  code: string;
  tjanstId?: number;
}

export function mapResponseToTjanst(data: TjanstResponse): Tjanst {
  const { id, name, tjanstekod, tjanstId } = data;

  return {
    id,
    name,
    code: tjanstekod,
    tjanstId,
  };
}
