@valentine-efagene/qshelter-common 2.0.150 → 2.0.151

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valentine-efagene/qshelter-common",
3
- "version": "2.0.150",
3
+ "version": "2.0.151",
4
4
  "description": "Shared database schemas and utilities for QShelter services",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -0,0 +1,10 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `isPublished` on the `properties` table. All the data in the column will be lost.
5
+ - You are about to alter the column `status` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `VarChar(191)` to `Enum(EnumId(5))`.
6
+
7
+ */
8
+ -- AlterTable
9
+ ALTER TABLE `properties` DROP COLUMN `isPublished`,
10
+ MODIFY `status` ENUM('DRAFT', 'PUBLISHED', 'SOLD_OUT', 'ARCHIVED') NOT NULL DEFAULT 'DRAFT';
@@ -51,6 +51,13 @@ enum PaymentFrequency {
51
51
  CUSTOM
52
52
  }
53
53
 
54
+ enum PropertyStatus {
55
+ DRAFT
56
+ PUBLISHED
57
+ SOLD_OUT
58
+ ARCHIVED
59
+ }
60
+
54
61
  enum ApplicationStatus {
55
62
  DRAFT
56
63
  PENDING
@@ -1112,11 +1119,10 @@ model Property {
1112
1119
  streetAddress String?
1113
1120
  longitude Float?
1114
1121
  latitude Float?
1115
- status String @default("DRAFT") // DRAFT, PUBLISHED, SOLD_OUT, ARCHIVED
1122
+ status PropertyStatus @default(DRAFT)
1116
1123
  description String? @db.Text
1117
1124
  displayImageId String?
1118
1125
  displayImage PropertyMedia? @relation("DisplayImage", fields: [displayImageId], references: [id], onDelete: SetNull)
1119
- isPublished Boolean @default(false)
1120
1126
  publishedAt DateTime?
1121
1127
  createdAt DateTime @default(now())
1122
1128
  updatedAt DateTime @updatedAt