import { SrType as CwServiceTicketType } from "../../generated/prisma/client";
import { ServiceTicketType as ApiServiceTicketType } from "../../../api/generated/prisma/client";
import { Translation } from "./types";

export const serviceTicketTypeTranslation: Translation<
  CwServiceTicketType,
  ApiServiceTicketType
> = {
  values: [
    { from: "srTypeRecId", to: "id" },
    {
      from: "description",
      to: "name",
      process: (value) => (value ? value : "Unknown Type"),
    },
    { from: "description", to: "description" },
    { from: "inactiveFlag", to: "inactiveFlag" },
    { from: "enteredBy", to: "createdById" },
    { from: "updatedBy", to: "updatedById" },
    { from: "dateEnteredUtc", to: "createdAt" },
    { from: "lastUpdatedUtc", to: "updatedAt" },
  ],
};
