-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
14 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
import { z } from 'zod'; | ||
|
||
export const laboratoryNames = ['LDA 72', 'GIR 49'] as const satisfies string[] | ||
export const laboratoryNameValidator = z.enum(laboratoryNames) | ||
export type LaboratoryName = z.infer<typeof laboratoryNameValidator> | ||
export const laboratoryNames = [ | ||
'SCL 34', | ||
'LDA 66', | ||
'LDA 72', | ||
'SCL 91', | ||
'GIR 49', | ||
'CAP 29', | ||
'CER 30', | ||
'FYT', | ||
] as const satisfies string[]; | ||
export const laboratoryNameValidator = z.enum(laboratoryNames); | ||
export type LaboratoryName = z.infer<typeof laboratoryNameValidator>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
import { fakerFR } from '@faker-js/faker'; | ||
import randomstring from 'randomstring'; | ||
import { v4 as uuidv4 } from 'uuid'; | ||
import { Laboratory } from '../schema/Laboratory/Laboratory'; | ||
|
||
export const genLaboratory = (data?: Partial<Laboratory>): Laboratory => ({ | ||
id: uuidv4(), | ||
name: randomstring.generate(), | ||
name: 'GIR 49', | ||
email: fakerFR.internet.email(), | ||
...data, | ||
}); |