@@ -15,6 +15,10 @@ import {
1515 MilestoneStatus ,
1616} from '@prisma/client' ;
1717
18+ // ============================================================================
19+ // Prisma enum GraphQL registrations (existing)
20+ // ============================================================================
21+
1822registerEnumType ( UserRole , { name : 'UserRole' } ) ;
1923registerEnumType ( PropertyStatus , { name : 'PropertyStatus' } ) ;
2024registerEnumType ( TransactionType , { name : 'TransactionType' } ) ;
@@ -27,6 +31,52 @@ registerEnumType(FraudPattern, { name: 'FraudPattern' });
2731registerEnumType ( DisputeStatus , { name : 'DisputeStatus' } ) ;
2832registerEnumType ( MilestoneStatus , { name : 'MilestoneStatus' } ) ;
2933
34+ // ============================================================================
35+ // Centralized DTO enums — moved from properties/dto/ and transactions/dto/
36+ // ============================================================================
37+
38+ /**
39+ * Property status values for DTO validation.
40+ * Centralized from src/properties/dto/property.dto.ts (#770)
41+ */
42+ export const PROPERTY_STATUS_ENUM = [
43+ 'DRAFT' ,
44+ 'PENDING' ,
45+ 'ACTIVE' ,
46+ 'UNDER_CONTRACT' ,
47+ 'SOLD' ,
48+ 'RENTED' ,
49+ 'ARCHIVED' ,
50+ 'EXPIRED' ,
51+ ] as const ;
52+
53+ export type PropertyStatusLiteral = ( typeof PROPERTY_STATUS_ENUM ) [ number ] ;
54+
55+ /**
56+ * Transaction type values for DTO validation.
57+ * Centralized from src/transactions/dto/transaction.dto.ts (#770)
58+ */
59+ export enum TransactionTypeDto {
60+ SALE = 'SALE' ,
61+ PURCHASE = 'PURCHASE' ,
62+ TRANSFER = 'TRANSFER' ,
63+ }
64+
65+ /**
66+ * Transaction status values for DTO validation.
67+ * Centralized from src/transactions/dto/transaction.dto.ts (#770)
68+ */
69+ export enum TransactionStatusDto {
70+ PENDING = 'PENDING' ,
71+ COMPLETED = 'COMPLETED' ,
72+ CANCELLED = 'CANCELLED' ,
73+ FAILED = 'FAILED' ,
74+ }
75+
76+ // ============================================================================
77+ // Re-exports of Prisma enums (existing)
78+ // ============================================================================
79+
3080export {
3181 UserRole ,
3282 PropertyStatus ,
@@ -39,4 +89,4 @@ export {
3989 FraudPattern ,
4090 DisputeStatus ,
4191 MilestoneStatus ,
42- } ;
92+ } ;
0 commit comments