@saasicat/spec 0.10.1 → 0.11.0

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": "@saasicat/spec",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "description": "Language-neutral spec of the SaaS platform: JSON Schemas, OpenAPI contract, Prisma fragments, acceptance scenarios.",
5
5
  "type": "module",
6
6
  "main": "./index.cjs",
@@ -75,7 +75,11 @@ model PromoCode {
75
75
  // consumer falls back to the system default (configurable in the consumer).
76
76
  revenueDeductionAccount String?
77
77
 
78
- createdById String // SUPER_ADMIN user ID (consumer FK, see header)
78
+ // SUPER_ADMIN user ID (consumer FK, see header). Nullable to match
79
+ // `PromoCodeRecord.createdById: string | null` in @saasicat/types — rows
80
+ // whose creator is gone, or that predate the column, stay readable.
81
+ // Creation still requires it: `CreatePromoCodeData.createdById` is `string`.
82
+ createdById String?
79
83
  createdAt DateTime @default(now())
80
84
  updatedAt DateTime @updatedAt
81
85
  deletedAt DateTime? // soft delete; never hard-delete for audit reasons
@@ -154,7 +154,7 @@ CREATE TABLE "promo_codes" (
154
154
  "description" TEXT,
155
155
  "campaignTag" TEXT,
156
156
  "revenueDeductionAccount" TEXT,
157
- "createdById" TEXT NOT NULL,
157
+ "createdById" TEXT,
158
158
  "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
159
159
  "updatedAt" TIMESTAMP(3) NOT NULL,
160
160
  "deletedAt" TIMESTAMP(3),