ecotransac-shared-js 1.1.27 → 1.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env CHANGED
@@ -1 +1,2 @@
1
1
  SERVER_URL=http://localhost:3000
2
+ DATABASE_URL=postgresql://postgresuserdev:password@localhost:5432/postgresdbdev
package/dist/index.d.mts CHANGED
@@ -1,3 +1,5 @@
1
+ import { Property as Property$1 } from '@prisma/client';
2
+
1
3
  type Maybe<T> = T | null;
2
4
  type InputMaybe<T> = Maybe<T>;
3
5
  /** All built-in and custom scalars, mapped to their actual values */
@@ -1009,7 +1011,7 @@ declare const LEASE_TRANSFERT_PERMISSIONS: SelectOption[];
1009
1011
  declare const KITCHEN_TYPE: SelectOption[];
1010
1012
  declare const HEATING_ENERGY: SelectOption[];
1011
1013
 
1012
- type StateType$1 = Pick<Property, "isForProfessionalUse" | "propertyType" | "isOccupied" | "isCoOwnership" | "isHousingScheme" | "isBusinessAssetsTransfer" | "isLeaseRightsTransfer" | "isCommercialWallsSale" | "isDpeCompleted" | "isEnergyAuditCompleted" | "leaseEstablishedUnder" | "constructionYear">;
1014
+ type StateType$1 = Pick<Property$1, "isForProfessionalUse" | "propertyType" | "isOccupied" | "isCoOwnership" | "isHousingScheme" | "isBusinessAssetsTransfer" | "isLeaseRightsTransfer" | "isCommercialWallsSale" | "isDpeCompleted" | "isEnergyAuditCompleted" | "leaseEstablishedUnder" | "constructionYear">;
1013
1015
  declare const getPropertyState: (property: StateType$1) => State;
1014
1016
 
1015
1017
  declare const mandateFormFields: Field<MandateInput>[];
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { Property as Property$1 } from '@prisma/client';
2
+
1
3
  type Maybe<T> = T | null;
2
4
  type InputMaybe<T> = Maybe<T>;
3
5
  /** All built-in and custom scalars, mapped to their actual values */
@@ -1009,7 +1011,7 @@ declare const LEASE_TRANSFERT_PERMISSIONS: SelectOption[];
1009
1011
  declare const KITCHEN_TYPE: SelectOption[];
1010
1012
  declare const HEATING_ENERGY: SelectOption[];
1011
1013
 
1012
- type StateType$1 = Pick<Property, "isForProfessionalUse" | "propertyType" | "isOccupied" | "isCoOwnership" | "isHousingScheme" | "isBusinessAssetsTransfer" | "isLeaseRightsTransfer" | "isCommercialWallsSale" | "isDpeCompleted" | "isEnergyAuditCompleted" | "leaseEstablishedUnder" | "constructionYear">;
1014
+ type StateType$1 = Pick<Property$1, "isForProfessionalUse" | "propertyType" | "isOccupied" | "isCoOwnership" | "isHousingScheme" | "isBusinessAssetsTransfer" | "isLeaseRightsTransfer" | "isCommercialWallsSale" | "isDpeCompleted" | "isEnergyAuditCompleted" | "leaseEstablishedUnder" | "constructionYear">;
1013
1015
  declare const getPropertyState: (property: StateType$1) => State;
1014
1016
 
1015
1017
  declare const mandateFormFields: Field<MandateInput>[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecotransac-shared-js",
3
- "version": "1.1.27",
3
+ "version": "1.1.28",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "modules": "dist/index.mjs",
@@ -14,10 +14,11 @@
14
14
  "scripts": {
15
15
  "build": "tsup",
16
16
  "lint": "tsc",
17
- "generate": "graphql-codegen --config codegen.ts",
17
+ "generate": "npx prisma db pull && npx prisma generate && graphql-codegen --config codegen.ts",
18
18
  "prepare": "husky"
19
19
  },
20
20
  "dependencies": {
21
+ "@prisma/client": "^5.20.0",
21
22
  "currency.js": "^2.0.4",
22
23
  "date-fns": "^4.1.0",
23
24
  "dotenv": "^16.4.5",
@@ -29,6 +30,7 @@
29
30
  "@graphql-codegen/typescript": "^4.1.0",
30
31
  "@types/lodash": "^4.17.10",
31
32
  "husky": "^9.1.6",
33
+ "prisma": "^5.20.0",
32
34
  "tsup": "^8.3.0",
33
35
  "typescript": "^5.6.3"
34
36
  }
@@ -0,0 +1,859 @@
1
+ generator client {
2
+ provider = "prisma-client-js"
3
+ }
4
+
5
+ datasource db {
6
+ provider = "postgresql"
7
+ url = env("DATABASE_URL")
8
+ }
9
+
10
+ model Chapter {
11
+ id String @id
12
+ order Int @default(autoincrement())
13
+ title String
14
+ markdownContent String?
15
+ videoPath String?
16
+ youtubeVideoUrl String?
17
+ videoDuration Int
18
+ updatedAt DateTime
19
+ lessonId String
20
+ Lesson Lesson @relation(fields: [lessonId], references: [id])
21
+ ChapterQuestionsAnswers ChapterQuestionsAnswers[]
22
+ Comment Comment[]
23
+ Question Question[]
24
+ UserVideoProgress UserVideoProgress[]
25
+ }
26
+
27
+ model Comment {
28
+ id String @id
29
+ content String
30
+ deletedAt DateTime?
31
+ createdAt DateTime @default(now())
32
+ editedCommentId String? @unique
33
+ authorId String
34
+ contactId String?
35
+ propertyId String?
36
+ chapterId String?
37
+ renovationId String?
38
+ User User @relation(fields: [authorId], references: [id])
39
+ Chapter Chapter? @relation(fields: [chapterId], references: [id])
40
+ Contact Contact? @relation(fields: [contactId], references: [id])
41
+ Comment Comment? @relation("CommentToComment", fields: [editedCommentId], references: [id])
42
+ other_Comment Comment? @relation("CommentToComment")
43
+ Property Property? @relation(fields: [propertyId], references: [id])
44
+ Renovation Renovation? @relation(fields: [renovationId], references: [id])
45
+ }
46
+
47
+ model Lesson {
48
+ id String @id
49
+ title String
50
+ description String
51
+ picturePath String
52
+ type LessonType
53
+ markdownContent String?
54
+ isAccessible Boolean @default(false)
55
+ teacherId String
56
+ Chapter Chapter[]
57
+ User User @relation(fields: [teacherId], references: [id])
58
+ }
59
+
60
+ model Question {
61
+ id String @id
62
+ question String
63
+ answers String[]
64
+ correctAnswer String
65
+ chapterId String
66
+ Chapter Chapter @relation(fields: [chapterId], references: [id])
67
+ }
68
+
69
+ model User {
70
+ id String @id
71
+ slug String @unique
72
+ firstName String
73
+ lastName String
74
+ email String @unique
75
+ role Role @default(MEMBER)
76
+ lastLogin DateTime @default(now())
77
+ firstLogin DateTime @default(now())
78
+ stripeCustomerId String @unique
79
+ subscriptionStatus String @default("incomplete")
80
+ Attachment Attachment[]
81
+ Cart Cart?
82
+ ChapterQuestionsAnswers ChapterQuestionsAnswers[]
83
+ Comment Comment[]
84
+ Compromise Compromise[]
85
+ Contact Contact[]
86
+ CustomerFeedback CustomerFeedback[]
87
+ Lesson Lesson[]
88
+ Mandate Mandate[]
89
+ Order Order[]
90
+ Partner Partner?
91
+ Profile Profile?
92
+ Property Property[]
93
+ Renovation Renovation[]
94
+ UserVideoProgress UserVideoProgress[]
95
+ }
96
+
97
+ model UserVideoProgress {
98
+ chapterId String
99
+ userId String
100
+ watchedUntil Int
101
+ Chapter Chapter @relation(fields: [chapterId], references: [id])
102
+ User User @relation(fields: [userId], references: [id])
103
+
104
+ @@unique([chapterId, userId])
105
+ }
106
+
107
+ model Attachment {
108
+ id String @id
109
+ name String
110
+ tags String[]
111
+ submissionId Int?
112
+ markedAsSigned Boolean @default(false)
113
+ isElectronicallySigned Boolean @default(false)
114
+ createdAt DateTime @default(now())
115
+ deletedAt DateTime?
116
+ authorId String
117
+ contactId String?
118
+ propertyId String?
119
+ profileId String?
120
+ renovationId String?
121
+ User User @relation(fields: [authorId], references: [id])
122
+ Contact Contact? @relation(fields: [contactId], references: [id])
123
+ Profile Profile? @relation(fields: [profileId], references: [userId])
124
+ Property Property? @relation(fields: [propertyId], references: [id])
125
+ Renovation Renovation? @relation(fields: [renovationId], references: [id])
126
+ Compromise Compromise?
127
+ Mandate Mandate?
128
+ }
129
+
130
+ model Address {
131
+ id String @id
132
+ address String
133
+ locality String
134
+ postalCode String
135
+ department String
136
+ country String
137
+ lat Float?
138
+ lng Float?
139
+ url String?
140
+ Contact Contact?
141
+ Order Order?
142
+ Profile Profile?
143
+ Property Property?
144
+ Renovation Renovation?
145
+ }
146
+
147
+ model Advert {
148
+ id String @id
149
+ adUrl String
150
+ title String
151
+ description String
152
+ propertyId String @unique
153
+ createdAt DateTime @default(now())
154
+ updatedAt DateTime
155
+ Property Property @relation(fields: [propertyId], references: [id])
156
+ }
157
+
158
+ model Article {
159
+ id String @id
160
+ title String
161
+ description String
162
+ picturePath String
163
+ videoPath String?
164
+ markdownContent String?
165
+ isFrontPageHeader Boolean @default(false)
166
+ isFrontPage Boolean @default(false)
167
+ isAccessible Boolean @default(false)
168
+ createdAt DateTime @default(now())
169
+ }
170
+
171
+ model Cart {
172
+ id String @unique
173
+ User User @relation(fields: [id], references: [id])
174
+ CartItem CartItem[]
175
+ }
176
+
177
+ model CartItem {
178
+ id String @id
179
+ quantity Int
180
+ addedAt DateTime @default(now())
181
+ updatedAt DateTime
182
+ productId String
183
+ cartId String
184
+ Cart Cart @relation(fields: [cartId], references: [id])
185
+ Product Product @relation(fields: [productId], references: [id])
186
+ CartItemOption CartItemOption[]
187
+ }
188
+
189
+ model CartItemOption {
190
+ name String
191
+ selected String
192
+ cartItemId String
193
+ orderItemId String?
194
+ CartItem CartItem @relation(fields: [cartItemId], references: [id])
195
+ OrderItem OrderItem? @relation(fields: [orderItemId], references: [id])
196
+
197
+ @@unique([name, cartItemId])
198
+ }
199
+
200
+ model ChapterQuestionsAnswers {
201
+ userId String
202
+ chapterId String
203
+ answeredAt DateTime
204
+ Chapter Chapter @relation(fields: [chapterId], references: [id])
205
+ User User @relation(fields: [userId], references: [id])
206
+
207
+ @@unique([chapterId, userId])
208
+ }
209
+
210
+ model Compromise {
211
+ id String @id
212
+ createdAt DateTime @default(now())
213
+ canceledAt DateTime?
214
+ succeededAt DateTime?
215
+ compromiseSignatureDate DateTime
216
+ finalActSignatureDate DateTime
217
+ compromiseValidityDuration Int?
218
+ netSalePrice Float
219
+ agencyFeeAmount Float
220
+ attachmentId String @unique
221
+ propertyId String
222
+ agentId String
223
+ User User @relation(fields: [agentId], references: [id])
224
+ Attachment Attachment @relation(fields: [attachmentId], references: [id])
225
+ Property Property @relation(fields: [propertyId], references: [id])
226
+ Contact Contact[]
227
+ }
228
+
229
+ model Contact {
230
+ id String @id
231
+ isLegalEntity Boolean? @default(false)
232
+ firstName String
233
+ lastName String
234
+ gender Gender?
235
+ nationality String?
236
+ dateOfBirth DateTime?
237
+ placeOfBirth String?
238
+ countryOfBirth String?
239
+ maritalStatus MaritalStatus?
240
+ prenupType PrenupType?
241
+ profession String?
242
+ phone String @unique
243
+ email String?
244
+ companyName String?
245
+ companyLegalStatus LegalStatus?
246
+ companyRegistrationNumber String?
247
+ companyCapitalStock Int?
248
+ authorizationRepresentationDate DateTime?
249
+ createdAt DateTime @default(now())
250
+ updatedAt DateTime
251
+ deletedAt DateTime?
252
+ kycDocumentType IdentificationDocument?
253
+ kycDocumentNumber String?
254
+ kycIssuedBy String?
255
+ kycExpiresAt DateTime?
256
+ ownerId String
257
+ guardianId String?
258
+ addressId String? @unique
259
+ Attachment Attachment[]
260
+ Comment Comment[]
261
+ Address Address? @relation(fields: [addressId], references: [id])
262
+ Contact Contact? @relation("ContactToContact", fields: [guardianId], references: [id])
263
+ other_Contact Contact[] @relation("ContactToContact")
264
+ User User @relation(fields: [ownerId], references: [id])
265
+ PropertyOwner PropertyOwner[]
266
+ SearchFilters SearchFilters?
267
+ Compromise Compromise[]
268
+ Renovation Renovation[]
269
+ Property Property[] @relation("PotentialBuyers")
270
+ }
271
+
272
+ model Coordinate {
273
+ id Int @id @default(autoincrement())
274
+ lat Float
275
+ lng Float
276
+ searchFiltersId String
277
+ SearchFilters SearchFilters @relation(fields: [searchFiltersId], references: [id])
278
+ }
279
+
280
+ model CustomerFeedback {
281
+ id String @id
282
+ customerFirstName String
283
+ customerEmail String
284
+ comment String
285
+ isHidden Boolean @default(false)
286
+ createdAt DateTime @default(now())
287
+ userSlug String
288
+ User User @relation(fields: [userSlug], references: [slug])
289
+ }
290
+
291
+ model Lead {
292
+ id String @id
293
+ type LeadType
294
+ firstName String
295
+ lastName String
296
+ email String
297
+ phone String
298
+ message String?
299
+ isChecked Boolean @default(false)
300
+ createdAt DateTime @default(now())
301
+ }
302
+
303
+ model Mandate {
304
+ id String @id
305
+ number Int @unique
306
+ propertySnapshot Json
307
+ createdAt DateTime @unique @default(now())
308
+ staffReview MandateReview?
309
+ withdrawalDate DateTime?
310
+ isForProfessionalUse Boolean
311
+ isLeaseRightsTransfer Boolean?
312
+ isBusinessAssetsTransfer Boolean?
313
+ isCommercialWallsSale Boolean?
314
+ exclusivity MandateExclusivity
315
+ netOwnerPrice Float?
316
+ leaseRightsPrice Float?
317
+ businessAssetsPrice Float?
318
+ agencyFeePercentage Float?
319
+ propertyId String
320
+ agentId String
321
+ attachmentId String? @unique
322
+ User User @relation(fields: [agentId], references: [id])
323
+ Attachment Attachment? @relation(fields: [attachmentId], references: [id])
324
+ Property Property @relation(fields: [propertyId], references: [id])
325
+ }
326
+
327
+ model Order {
328
+ id String @id
329
+ status OrderStatus @default(PAYMENT_INTENT_CREATED)
330
+ comment String?
331
+ createdAt DateTime @default(now())
332
+ shippingAddressId String @unique
333
+ userId String
334
+ Address Address @relation(fields: [shippingAddressId], references: [id])
335
+ User User @relation(fields: [userId], references: [id])
336
+ OrderItem OrderItem[]
337
+ }
338
+
339
+ model OrderItem {
340
+ id String @id
341
+ quantity Int
342
+ options String[]
343
+ productId String
344
+ orderId String
345
+ CartItemOption CartItemOption[]
346
+ Order Order @relation(fields: [orderId], references: [id])
347
+ Product Product @relation(fields: [productId], references: [id])
348
+ }
349
+
350
+ model Partner {
351
+ id String @id
352
+ name String
353
+ hashedPassword String @unique
354
+ picturePath String?
355
+ userId String @unique
356
+ isDeleted Boolean @default(false)
357
+ User User @relation(fields: [userId], references: [id])
358
+ }
359
+
360
+ model Photo {
361
+ id String @id
362
+ isHidden Boolean @default(false)
363
+ order Int @default(autoincrement())
364
+ deletedAt DateTime?
365
+ productId String?
366
+ propertyId String?
367
+ renovationId String?
368
+ Product Product? @relation(fields: [productId], references: [id])
369
+ Property Property? @relation(fields: [propertyId], references: [id])
370
+ Renovation Renovation? @relation(fields: [renovationId], references: [id])
371
+ }
372
+
373
+ model Product {
374
+ id String @id
375
+ stripePriceId String @unique
376
+ title String
377
+ markdownDescription String
378
+ markdownFeatures String
379
+ price Float
380
+ isCustomizable Boolean @default(false)
381
+ isAccessible Boolean @default(false)
382
+ category String
383
+ CartItem CartItem[]
384
+ OrderItem OrderItem[]
385
+ Photo Photo[]
386
+ ProductOption ProductOption[]
387
+ }
388
+
389
+ model ProductOption {
390
+ name String
391
+ options String[]
392
+ productId String
393
+ Product Product @relation(fields: [productId], references: [id])
394
+
395
+ @@unique([name, productId])
396
+ }
397
+
398
+ model Profile {
399
+ userId String @id
400
+ gender Gender?
401
+ phone String?
402
+ nationality String?
403
+ birthName String?
404
+ personalEmail String?
405
+ dateOfBirth DateTime?
406
+ placeOfBirth String?
407
+ countryOfBirth String?
408
+ picturePath String?
409
+ kycDocumentType IdentificationDocument?
410
+ kycDocumentNumber String?
411
+ kycIssuedBy String?
412
+ kycExpiresAt DateTime?
413
+ legalStatus LegalStatus?
414
+ registrationPlace String?
415
+ registrationDate DateTime?
416
+ registrationNumber String?
417
+ punchline String?
418
+ presentation String?
419
+ area String? @default("Lyon et alentours")
420
+ reviewedAt DateTime?
421
+ status ProfileStatus @default(INCOMPLETE)
422
+ addressId String? @unique
423
+ updatedAt DateTime
424
+ Attachment Attachment[]
425
+ Address Address? @relation(fields: [addressId], references: [id])
426
+ User User @relation(fields: [userId], references: [id])
427
+ }
428
+
429
+ model Property {
430
+ id String @id
431
+ reference Int @unique @default(autoincrement())
432
+ propertyType String
433
+ isForProfessionalUse Boolean
434
+ estateCondition EstateCondition
435
+ isArchived Boolean @default(false)
436
+ isFurnished Boolean?
437
+ condoFees Float?
438
+ propertyTaxPrice Float?
439
+ interiorCondition PropertyCondition?
440
+ exteriorCondition PropertyCondition?
441
+ standing PropertyStanding?
442
+ hasElevator Boolean?
443
+ isPreparedLand Boolean?
444
+ isServiced Boolean?
445
+ isDemarcated Boolean?
446
+ isBuildable Boolean?
447
+ exposure CardinalPoints?
448
+ view PropertyView?
449
+ isIndividualHouse Boolean?
450
+ kitchenType KitchenType?
451
+ isOccupied Boolean?
452
+ currentLeaseStartDate DateTime?
453
+ currentLeaseDuration Int?
454
+ leaseEstablishedUnder LeaseEstablishment?
455
+ leaseEstablishmentNotaryName String?
456
+ leaseTransfertPermission LeaseTransfertPermission?
457
+ isLeaseRightsTransfer Boolean?
458
+ isBusinessAssetsTransfer Boolean?
459
+ isCommercialWallsSale Boolean?
460
+ brandName String?
461
+ tradingName String?
462
+ authorizedActivities String?
463
+ employeesToHireCount Int?
464
+ currentYearRevenue Float?
465
+ previousYear1Revenue Float?
466
+ previousYear2Revenue Float?
467
+ isCoOwnership Boolean?
468
+ ongoingProcedures String?
469
+ isHousingScheme Boolean?
470
+ coOwnershipLots Int?
471
+ cadastreReference String?
472
+ propertyLotsCount Int?
473
+ propertyLotsIdentifiers String?
474
+ hasRoofing Boolean?
475
+ hasGarden Boolean?
476
+ livingArea Int?
477
+ carrezLawArea Int?
478
+ landArea Int?
479
+ floorLevel Int?
480
+ floorCount Int?
481
+ buildingfloorCount Int?
482
+ roomCount Int?
483
+ parkingSpacesCount Int?
484
+ apartmentsCount Int?
485
+ bathroomsCount Int?
486
+ showerRoomsCount Int?
487
+ toiletsCount Int?
488
+ hasIndependantToilet Boolean?
489
+ balconiesCount Int?
490
+ cellarsCount Int?
491
+ patiosCount Int?
492
+ boxesCount Int?
493
+ transportsSurroundings String?
494
+ shopsSurroundings String?
495
+ educationsSurroundings String?
496
+ healthsSurroundings String?
497
+ naturalsSurroundings String?
498
+ leisuresSurroundings String?
499
+ othersSurroundings String?
500
+ equipmentServices String?
501
+ outsideServices String?
502
+ buildingServices String?
503
+ securityServices String?
504
+ sportServices String?
505
+ otherServices String?
506
+ isDpeCompleted Boolean?
507
+ isEnergyAuditCompleted Boolean?
508
+ dpeScore EnergyScore?
509
+ dpeDate DateTime?
510
+ gesScore EnergyScore?
511
+ recommendedWorkCost Float?
512
+ constructionYear DateTime?
513
+ renovationYear DateTime?
514
+ heatingConfiguration SharingConfiguration?
515
+ heatingEnergy HeatingEnergy?
516
+ hasHotWater Boolean?
517
+ hotWaterConfiguration SharingConfiguration?
518
+ hotWaterSystem String?
519
+ wastewaterDisposalSystem String?
520
+ createdAt DateTime @default(now())
521
+ agentId String
522
+ addressId String @unique
523
+ updatedAt DateTime?
524
+ Advert Advert?
525
+ Attachment Attachment[]
526
+ Comment Comment[]
527
+ Compromise Compromise[]
528
+ Mandate Mandate[]
529
+ Photo Photo[]
530
+ Address Address @relation(fields: [addressId], references: [id])
531
+ User User @relation(fields: [agentId], references: [id])
532
+ PropertyOwner PropertyOwner[]
533
+ Surface Surface[]
534
+ Contact Contact[] @relation("PotentialBuyers")
535
+ }
536
+
537
+ model PropertyOwner {
538
+ ownerId String
539
+ propertyId String
540
+ legalNature LegalNatureOfProperty?
541
+ Contact Contact @relation(fields: [ownerId], references: [id])
542
+ Property Property @relation(fields: [propertyId], references: [id])
543
+
544
+ @@unique([ownerId, propertyId])
545
+ }
546
+
547
+ model Renovation {
548
+ id String @id
549
+ propertyType String
550
+ isFullService Boolean
551
+ isUpgrade Boolean
552
+ step RenovationStep @default(IN_PREPARATION)
553
+ inhabitantCount Int?
554
+ presenceProfile PresenceProfile?
555
+ livingArea Int?
556
+ insulationLevel InsulationLevel?
557
+ annualElectricityBill Int?
558
+ annualElectricityConsumption Int?
559
+ heatingEnergy HeatingEnergy?
560
+ hotWaterEnergy String?
561
+ lighting LightingType?
562
+ airConditioning AirConditioningType?
563
+ pool PoolType?
564
+ hasElectricOven Boolean?
565
+ hasHotPlate Boolean?
566
+ hasAmericanFridge Boolean?
567
+ hasDishwasher Boolean?
568
+ hasWashingMachine Boolean?
569
+ hasDryer Boolean?
570
+ hasFridge Boolean?
571
+ hasFreezer Boolean?
572
+ hasFridgeFreezer Boolean?
573
+ multimediaUsage MultimediaUsage?
574
+ hasElectricVehicleCharging Boolean?
575
+ roofType RoofType?
576
+ exposures CardinalPoints[]
577
+ addressId String @unique
578
+ agentId String
579
+ Attachment Attachment[]
580
+ Comment Comment[]
581
+ Photo Photo[]
582
+ Address Address @relation(fields: [addressId], references: [id])
583
+ User User @relation(fields: [agentId], references: [id])
584
+ Contact Contact[]
585
+ }
586
+
587
+ model SearchFilters {
588
+ id String @id
589
+ propertyTypes String[]
590
+ minRoomCount Int?
591
+ maxRoomCount Int?
592
+ minLivingArea Int?
593
+ maxLivingArea Int?
594
+ minLandArea Int?
595
+ maxLandArea Int?
596
+ services String[]
597
+ surroundings String[]
598
+ contactId String @unique
599
+ Coordinate Coordinate[]
600
+ Contact Contact @relation(fields: [contactId], references: [id])
601
+ }
602
+
603
+ model Subscriber {
604
+ id String @id
605
+ email String @unique
606
+ subscribedAt DateTime @default(now())
607
+ unSubscribedAt DateTime?
608
+ }
609
+
610
+ model Surface {
611
+ id String @id
612
+ roomType String
613
+ area Int?
614
+ floor Int?
615
+ propertyId String
616
+ Property Property @relation(fields: [propertyId], references: [id])
617
+ }
618
+
619
+ enum Gender {
620
+ MALE
621
+ FEMALE
622
+ }
623
+
624
+ enum Role {
625
+ ADMIN
626
+ MEMBER
627
+ PARTNER
628
+ }
629
+
630
+ enum LegalStatus {
631
+ EI
632
+ EURL
633
+ SARL
634
+ SASU
635
+ SAS
636
+ SA
637
+ SNC
638
+ SCS
639
+ SCA
640
+ }
641
+
642
+ enum AirConditioningType {
643
+ NONE
644
+ CLASSIC
645
+ INTEGRATED_HEATPUMP
646
+ }
647
+
648
+ enum CardinalPoints {
649
+ N
650
+ N_E
651
+ E
652
+ S_E
653
+ S
654
+ S_W
655
+ W
656
+ N_W
657
+ }
658
+
659
+ enum EnergyScore {
660
+ A
661
+ B
662
+ C
663
+ D
664
+ E
665
+ F
666
+ G
667
+ }
668
+
669
+ enum EstateCondition {
670
+ NEW_PROPERTY
671
+ OLD_PROPERTY
672
+ }
673
+
674
+ enum HeatingEnergy {
675
+ WOOD
676
+ ELECTRICITY
677
+ GEOTHERMIE
678
+ GAS
679
+ FUEL
680
+ OTHER
681
+ }
682
+
683
+ enum HeatingSharing {
684
+ INDIVIDUAL
685
+ CENTRAL
686
+ URBAN
687
+ MIXED
688
+ }
689
+
690
+ enum IdentificationDocument {
691
+ NATIONAL_ID_CARD
692
+ PASSPORT
693
+ DRIVER_LICENSE
694
+ RESIDENCE_PERMIT
695
+ RESIDENCE_CARD_CERTIFICATE
696
+ }
697
+
698
+ enum InsulationLevel {
699
+ POOR
700
+ AVERAGE
701
+ GOOD
702
+ }
703
+
704
+ enum KitchenType {
705
+ NONE
706
+ SEPARATED
707
+ INDUSTRIAL
708
+ KITCHENETTE
709
+ AMERICAN_EQUIPPED
710
+ SEPARATE_EQUIPPED
711
+ EQUIPPED
712
+ }
713
+
714
+ enum LeadType {
715
+ CONTACT
716
+ CUSTOMER
717
+ RECRUITMENT
718
+ }
719
+
720
+ enum LeaseEstablishment {
721
+ PRIVATE_DEED
722
+ NOTARY_DEED
723
+ }
724
+
725
+ enum LeaseTransfertPermission {
726
+ BY_MAIL
727
+ AT_LEASE_END
728
+ }
729
+
730
+ enum LegalNatureOfProperty {
731
+ FULL_OWNERSHIP
732
+ USUFRUCTUARY
733
+ BARE_OWNER
734
+ CO_OWNER_IN_UNDIVIDED_PROPERTY
735
+ }
736
+
737
+ enum LessonType {
738
+ ALUR
739
+ TUTORIAL
740
+ ENERGY_RENOVATION
741
+ }
742
+
743
+ enum LightingType {
744
+ CLASSIC
745
+ LOW_CONSUMPTION
746
+ MIXED
747
+ }
748
+
749
+ enum MandateExclusivity {
750
+ EXCLUSIVE
751
+ SEMI_EXCLUSIVE
752
+ SIMPLE
753
+ }
754
+
755
+ enum MandateReview {
756
+ ACCEPTED
757
+ REJECTED
758
+ }
759
+
760
+ enum MaritalStatus {
761
+ MARRIED_WITH_PRENUP
762
+ MARRIED_WITHOUT_PRENUP
763
+ CIVIL_PARTNERSHIP
764
+ DIVORCED
765
+ WIDOWED
766
+ SINGLE
767
+ }
768
+
769
+ enum MultimediaUsage {
770
+ LOW
771
+ MODERATE
772
+ INTENSE
773
+ }
774
+
775
+ enum OrderStatus {
776
+ PAYMENT_INTENT_CREATED
777
+ PAID
778
+ SHIPPED
779
+ }
780
+
781
+ enum PoolType {
782
+ NONE
783
+ INGROUND
784
+ ABOVE_GROUND
785
+ OTHER
786
+ }
787
+
788
+ enum PrenupType {
789
+ COMMUNITY_OF_PROPERTY_WITHOUT_GAINS
790
+ UNIVERSAL_COMMUNITY
791
+ SEPARATION_OF_PROPERTY
792
+ PARTICIPATION_IN_ACQUISITIONS
793
+ NOTARIZED_MARRIAGE_CONTRACT
794
+ PARTICIPATION_IN_ACQUISITIONS_WITH_FULL_ATTRIBUTION_TO_SURVIVOR
795
+ }
796
+
797
+ enum PresenceProfile {
798
+ ALL_DAY
799
+ MORNING_NOON_EVENING
800
+ MORNING_EVENING
801
+ }
802
+
803
+ enum ProfileStatus {
804
+ INCOMPLETE
805
+ AWAITING_VALIDATION
806
+ VALIDATED
807
+ REJECTED
808
+ }
809
+
810
+ enum PropertyCondition {
811
+ BRAND_NEW
812
+ REALLY_GOOD
813
+ GOOD
814
+ MEDIUM
815
+ REFRESH_NEEDED
816
+ REHABILITAION_NEEDED
817
+ }
818
+
819
+ enum PropertyStanding {
820
+ BASIC
821
+ STANDARD
822
+ GOOD
823
+ LUXURY
824
+ }
825
+
826
+ enum PropertyView {
827
+ OVERLOOKED
828
+ CLEAR
829
+ SEA
830
+ MOUNTAINS
831
+ EXCEPTIONAL
832
+ }
833
+
834
+ enum RenovationStep {
835
+ IN_PREPARATION
836
+ PROJECT_SENT_TO_PARTNER
837
+ QUOTE_SENT_TO_CLIENT
838
+ WORK_IN_PROGRESS
839
+ WORK_COMPLETED_INVOICE_SENT
840
+ WORK_PAID
841
+ }
842
+
843
+ enum RoofType {
844
+ ONE_SLOPE
845
+ TWO_SLOPES
846
+ FOUR_SLOPES
847
+ L_SHAPE
848
+ T_SHAPE
849
+ }
850
+
851
+ enum SharingConfiguration {
852
+ INDIVIDUAL
853
+ COLLECTIVE
854
+ }
855
+
856
+ enum WaterDistribution {
857
+ INDIVIDUAL
858
+ CENTRAL
859
+ }