import { SrSource as CwServiceTicketSource } from "../../generated/prisma/client";
import { ServiceTicketSource as ApiServiceTicketSource } from "../../../api/generated/prisma/client";
import { Translation } from "./types";

export const serviceTicketSourceTranslation: Translation<
  CwServiceTicketSource,
  ApiServiceTicketSource
> = {
  values: [
    { from: "srSourceRecId", to: "id" },
    {
      from: "description",
      to: "name",
      process: (value) => (value ? value : "Unknown Source"),
    },
    { from: "description", to: "description" },
    { from: "defaultFlag", to: "defaultFlag" },
    { from: "enteredBy", to: "createdById" },
    { from: "updatedBy", to: "updatedById" },
    { from: "dateEnteredUtc", to: "createdAt" },
    { from: "lastUpdatedUtc", to: "updatedAt" },
  ],
};
