TicketPriority.ts 565 B

12345678910111213141516
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { faker } from '@faker-js/faker'
  3. import type { TicketPriority } from '#shared/graphql/types.ts'
  4. import { convertToGraphQLId } from '#shared/graphql/utils.ts'
  5. import type { DeepPartial } from '#shared/types/utils.ts'
  6. export default (): DeepPartial<TicketPriority> => {
  7. const id = faker.number.int({ min: 0, max: 2 })
  8. return {
  9. id: convertToGraphQLId('TicketPriority', id + 1),
  10. uiColor: ['high-priority', 'low-priority', 'medium-priority'][id],
  11. uiIcon: null,
  12. }
  13. }