import { SrLocation as CwServiceTicketLocation } from "../../generated/prisma/client";
import { ServiceTicketLocation as ApiServiceTicketLocation } from "../../../api/generated/prisma/client";
import { Translation } from "./types";

export const serviceTicketLocationTranslation: Translation<
  CwServiceTicketLocation,
  ApiServiceTicketLocation
> = {
  values: [
    { from: "srLocationRecId", to: "id" },
    {
      from: "description",
      to: "name",
      process: (value) => (value ? value : "Unknown Location"),
    },
    { from: "description", to: "description" },
    { from: "defaultFlag", to: "defaultFlag" },
    { from: "enteredBy", to: "createdById" },
    { from: "updatedBy", to: "updatedById" },
    { from: "dateEnteredUtc", to: "createdAt" },
    { from: "lastUpdatedUtc", to: "updatedAt" },
  ],
};
