refactor: use enums

This commit is contained in:
Mohamed Marrouchi
2025-01-16 17:41:30 +01:00
parent 4fac5d4fc9
commit 359049ff3d
22 changed files with 124 additions and 90 deletions

View File

@@ -10,7 +10,11 @@ import mongoose from 'mongoose';
import { AttachmentCreateDto } from '@/attachment/dto/attachment.dto';
import { AttachmentModel } from '@/attachment/schemas/attachment.schema';
import { AttachmentResourceRef } from '@/attachment/types';
import {
AttachmentAccess,
AttachmentCreatedByRef,
AttachmentResourceRef,
} from '@/attachment/types';
export const attachmentFixtures: AttachmentCreateDto[] = [
{
@@ -24,8 +28,8 @@ export const attachmentFixtures: AttachmentCreateDto[] = [
},
},
resourceRef: AttachmentResourceRef.ContentAttachment,
access: 'public',
createdByRef: 'User',
access: AttachmentAccess.Public,
createdByRef: AttachmentCreatedByRef.User,
createdBy: '9'.repeat(24),
},
{
@@ -39,8 +43,8 @@ export const attachmentFixtures: AttachmentCreateDto[] = [
},
},
resourceRef: AttachmentResourceRef.ContentAttachment,
access: 'public',
createdByRef: 'User',
access: AttachmentAccess.Public,
createdByRef: AttachmentCreatedByRef.User,
createdBy: '9'.repeat(24),
},
];