@porulle/plugin-layaway 0.8.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 unified-commerce-engine contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # @porulle/plugin-layaway
2
+
3
+ Layaway / partial-payment plans for `@porulle/core`: reserve items with a
4
+ deposit, pay the balance in installments, and complete the sale automatically
5
+ when it is paid off.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ bun add @porulle/plugin-layaway
11
+ ```
12
+
13
+ Add to `commerce.config.ts`:
14
+
15
+ ```typescript
16
+ import { layawayPlugin } from "@porulle/plugin-layaway";
17
+
18
+ export default defineConfig({
19
+ plugins: [
20
+ layawayPlugin({
21
+ defaultDepositPercent: 25, // used when a plan gives no deposit (default 20)
22
+ onForfeit: async (layaway) => {
23
+ // Policy hook — deposit retention, customer notification, etc.
24
+ },
25
+ }),
26
+ ],
27
+ });
28
+ ```
29
+
30
+ Add to `drizzle.config.ts`:
31
+
32
+ ```typescript
33
+ schema: [
34
+ "./node_modules/@porulle/plugin-layaway/src/schema.ts",
35
+ // ...
36
+ ],
37
+ ```
38
+
39
+ ## What it does
40
+
41
+ Registers the `layaways` and `layaway_payments` tables. On create it reserves
42
+ stock for the plan's items (rolled back if the reservation fails). Installments
43
+ are recorded in any tender; when the cumulative paid amount reaches the total
44
+ the plan auto-completes — a core order is created and cross-linked via
45
+ `metadata.layawayId`, and the stock hold is released. Forfeiting releases the
46
+ hold and runs the `onForfeit` policy hook (the plugin does not itself retain or
47
+ refund the deposit — that is your policy).
48
+
49
+ ## Routes exposed
50
+
51
+ - **`POST /layaways`** — create a plan (`layaway:operate`)
52
+ - **`GET /layaways`** — list plans, optional `?status` (`layaway:operate`)
53
+ - **`GET /layaways/{id}`** — plan with its payment ledger (`layaway:operate`)
54
+ - **`POST /layaways/{id}/payments`** — record an installment; auto-completes at
55
+ full payment (`layaway:operate` + core `orders:create`)
56
+ - **`POST /layaways/{id}/forfeit`** — forfeit a plan, release stock (`layaway:manage`)
57
+
58
+ See the [Layaway guide](https://github.com/asyncdotengineering/porulle/blob/main/apps/docs/src/content/docs/building/layaway.mdx)
59
+ for worked examples.
@@ -0,0 +1,15 @@
1
+ import { type LayawayPluginOptions } from "./service.js";
2
+ export type { LayawayPluginOptions, Layaway, LayawayPayment } from "./service.js";
3
+ export { LayawayService } from "./service.js";
4
+ export type { LayawayItem } from "./schema.js";
5
+ /**
6
+ * Layaway plugin (issue #58): partial-payment plans — reserve items with a
7
+ * deposit, record installments (any tender), derived status, automatic
8
+ * completion to a core order (with the stock hold released) at full payment,
9
+ * and a forfeit policy hook.
10
+ *
11
+ * The actor needs `layaway:operate` for day-to-day flows and core
12
+ * `orders:create` (completion creates the order).
13
+ */
14
+ export declare function layawayPlugin(options?: LayawayPluginOptions): import("@porulle/core").CommercePlugin;
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAkB,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEzE,YAAY,EAAE,oBAAoB,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAW/C;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,0CAoG/D"}
package/dist/index.js ADDED
@@ -0,0 +1,106 @@
1
+ import { defineCommercePlugin, router } from "@porulle/core";
2
+ import { z } from "@hono/zod-openapi";
3
+ import { layaways, layawayPayments } from "./schema.js";
4
+ import { LayawayService } from "./service.js";
5
+ export { LayawayService } from "./service.js";
6
+ const ItemSchema = z.object({
7
+ entityId: z.string().uuid(),
8
+ variantId: z.string().uuid().optional(),
9
+ sku: z.string().optional(),
10
+ title: z.string().min(1),
11
+ quantity: z.number().int().positive(),
12
+ unitPrice: z.number().int().min(0),
13
+ });
14
+ /**
15
+ * Layaway plugin (issue #58): partial-payment plans — reserve items with a
16
+ * deposit, record installments (any tender), derived status, automatic
17
+ * completion to a core order (with the stock hold released) at full payment,
18
+ * and a forfeit policy hook.
19
+ *
20
+ * The actor needs `layaway:operate` for day-to-day flows and core
21
+ * `orders:create` (completion creates the order).
22
+ */
23
+ export function layawayPlugin(options = {}) {
24
+ return defineCommercePlugin({
25
+ id: "layaway",
26
+ version: "1.0.0",
27
+ permissions: [
28
+ { scope: "layaway:operate", description: "Create layaway plans, record installment payments." },
29
+ { scope: "layaway:manage", description: "Forfeit or cancel layaway plans." },
30
+ ],
31
+ schema: () => ({ layaways, layawayPayments }),
32
+ routes: (ctx) => {
33
+ const db = ctx.database.db;
34
+ if (!db)
35
+ return [];
36
+ const service = new LayawayService(db, ctx.services, options);
37
+ const r = router("Layaways", "/layaways", ctx);
38
+ r.post("/")
39
+ .summary("Create a layaway plan (reserves stock; optional initial deposit payment)")
40
+ .permission("layaway:operate")
41
+ .input(z.object({
42
+ currency: z.string().length(3),
43
+ customerId: z.string().uuid().optional(),
44
+ items: z.array(ItemSchema).min(1),
45
+ depositAmount: z.number().int().min(0).optional(),
46
+ depositPercent: z.number().min(0).max(100).optional(),
47
+ expiresAt: z.string().datetime().optional(),
48
+ initialPayment: z.object({
49
+ amount: z.number().int().positive(),
50
+ method: z.string().min(1),
51
+ reference: z.string().optional(),
52
+ }).optional(),
53
+ }))
54
+ .handler(async ({ input, actor, orgId }) => {
55
+ const result = await service.create(orgId, input, actor);
56
+ if (!result.ok)
57
+ throw new Error(result.error);
58
+ return result.value;
59
+ });
60
+ r.get("/")
61
+ .summary("List layaway plans")
62
+ .permission("layaway:operate")
63
+ .query(z.object({ status: z.string().optional() }))
64
+ .handler(async ({ query, orgId }) => {
65
+ const result = await service.list(orgId, query.status);
66
+ if (!result.ok)
67
+ throw new Error(result.error);
68
+ return result.value;
69
+ });
70
+ r.get("/{id}")
71
+ .summary("Get a layaway plan with its payment ledger")
72
+ .permission("layaway:operate")
73
+ .handler(async ({ params, orgId }) => {
74
+ const result = await service.getById(orgId, params.id);
75
+ if (!result.ok)
76
+ throw new Error(result.error);
77
+ return result.value;
78
+ });
79
+ r.post("/{id}/payments")
80
+ .summary("Record an installment (completes the plan at full payment)")
81
+ .permission("layaway:operate")
82
+ .input(z.object({
83
+ amount: z.number().int().positive(),
84
+ method: z.string().min(1),
85
+ reference: z.string().optional(),
86
+ }))
87
+ .handler(async ({ params, input, actor, orgId }) => {
88
+ const result = await service.addPayment(orgId, params.id, input, actor);
89
+ if (!result.ok)
90
+ throw new Error(result.error);
91
+ return result.value;
92
+ });
93
+ r.post("/{id}/forfeit")
94
+ .summary("Forfeit an active plan (releases stock, runs the forfeit policy)")
95
+ .permission("layaway:manage")
96
+ .input(z.object({ reason: z.string().max(500).optional() }))
97
+ .handler(async ({ params, input, actor, orgId }) => {
98
+ const result = await service.forfeit(orgId, params.id, input.reason, actor);
99
+ if (!result.ok)
100
+ throw new Error(result.error);
101
+ return result.value;
102
+ });
103
+ return r.routes();
104
+ },
105
+ });
106
+ }
@@ -0,0 +1,444 @@
1
+ /**
2
+ * Layaway plugin schema (issue #58).
3
+ *
4
+ * - layaways: a partial-payment plan reserving items until fully paid.
5
+ * `status` is stored but always derived from payments: active →
6
+ * completed (paidTotal >= total, creates the core order + releases the
7
+ * reservation hold) or forfeited/cancelled (releases the hold).
8
+ * - layaway_payments: installment ledger (any tender).
9
+ */
10
+ export interface LayawayItem {
11
+ entityId: string;
12
+ variantId?: string | undefined;
13
+ sku?: string | undefined;
14
+ title: string;
15
+ quantity: number;
16
+ unitPrice: number;
17
+ }
18
+ export declare const layaways: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
19
+ name: "layaways";
20
+ schema: undefined;
21
+ columns: {
22
+ id: import("@porulle/core/drizzle").PgColumn<{
23
+ name: "id";
24
+ tableName: "layaways";
25
+ dataType: "string";
26
+ columnType: "PgUUID";
27
+ data: string;
28
+ driverParam: string;
29
+ notNull: true;
30
+ hasDefault: true;
31
+ isPrimaryKey: true;
32
+ isAutoincrement: false;
33
+ hasRuntimeDefault: false;
34
+ enumValues: undefined;
35
+ baseColumn: never;
36
+ identity: undefined;
37
+ generated: undefined;
38
+ }, {}, {}>;
39
+ organizationId: import("@porulle/core/drizzle").PgColumn<{
40
+ name: "organization_id";
41
+ tableName: "layaways";
42
+ dataType: "string";
43
+ columnType: "PgText";
44
+ data: string;
45
+ driverParam: string;
46
+ notNull: true;
47
+ hasDefault: false;
48
+ isPrimaryKey: false;
49
+ isAutoincrement: false;
50
+ hasRuntimeDefault: false;
51
+ enumValues: [string, ...string[]];
52
+ baseColumn: never;
53
+ identity: undefined;
54
+ generated: undefined;
55
+ }, {}, {}>;
56
+ customerId: import("@porulle/core/drizzle").PgColumn<{
57
+ name: "customer_id";
58
+ tableName: "layaways";
59
+ dataType: "string";
60
+ columnType: "PgUUID";
61
+ data: string;
62
+ driverParam: string;
63
+ notNull: false;
64
+ hasDefault: false;
65
+ isPrimaryKey: false;
66
+ isAutoincrement: false;
67
+ hasRuntimeDefault: false;
68
+ enumValues: undefined;
69
+ baseColumn: never;
70
+ identity: undefined;
71
+ generated: undefined;
72
+ }, {}, {}>;
73
+ status: import("@porulle/core/drizzle").PgColumn<{
74
+ name: "status";
75
+ tableName: "layaways";
76
+ dataType: "string";
77
+ columnType: "PgText";
78
+ data: "active" | "completed" | "forfeited" | "cancelled";
79
+ driverParam: string;
80
+ notNull: true;
81
+ hasDefault: true;
82
+ isPrimaryKey: false;
83
+ isAutoincrement: false;
84
+ hasRuntimeDefault: false;
85
+ enumValues: ["active", "completed", "forfeited", "cancelled"];
86
+ baseColumn: never;
87
+ identity: undefined;
88
+ generated: undefined;
89
+ }, {}, {}>;
90
+ currency: import("@porulle/core/drizzle").PgColumn<{
91
+ name: "currency";
92
+ tableName: "layaways";
93
+ dataType: "string";
94
+ columnType: "PgText";
95
+ data: string;
96
+ driverParam: string;
97
+ notNull: true;
98
+ hasDefault: false;
99
+ isPrimaryKey: false;
100
+ isAutoincrement: false;
101
+ hasRuntimeDefault: false;
102
+ enumValues: [string, ...string[]];
103
+ baseColumn: never;
104
+ identity: undefined;
105
+ generated: undefined;
106
+ }, {}, {}>;
107
+ items: import("@porulle/core/drizzle").PgColumn<{
108
+ name: "items";
109
+ tableName: "layaways";
110
+ dataType: "json";
111
+ columnType: "PgJsonb";
112
+ data: LayawayItem[];
113
+ driverParam: unknown;
114
+ notNull: true;
115
+ hasDefault: false;
116
+ isPrimaryKey: false;
117
+ isAutoincrement: false;
118
+ hasRuntimeDefault: false;
119
+ enumValues: undefined;
120
+ baseColumn: never;
121
+ identity: undefined;
122
+ generated: undefined;
123
+ }, {}, {
124
+ $type: LayawayItem[];
125
+ }>;
126
+ total: import("@porulle/core/drizzle").PgColumn<{
127
+ name: "total";
128
+ tableName: "layaways";
129
+ dataType: "number";
130
+ columnType: "PgInteger";
131
+ data: number;
132
+ driverParam: string | number;
133
+ notNull: true;
134
+ hasDefault: false;
135
+ isPrimaryKey: false;
136
+ isAutoincrement: false;
137
+ hasRuntimeDefault: false;
138
+ enumValues: undefined;
139
+ baseColumn: never;
140
+ identity: undefined;
141
+ generated: undefined;
142
+ }, {}, {}>;
143
+ depositAmount: import("@porulle/core/drizzle").PgColumn<{
144
+ name: "deposit_amount";
145
+ tableName: "layaways";
146
+ dataType: "number";
147
+ columnType: "PgInteger";
148
+ data: number;
149
+ driverParam: string | number;
150
+ notNull: true;
151
+ hasDefault: true;
152
+ isPrimaryKey: false;
153
+ isAutoincrement: false;
154
+ hasRuntimeDefault: false;
155
+ enumValues: undefined;
156
+ baseColumn: never;
157
+ identity: undefined;
158
+ generated: undefined;
159
+ }, {}, {}>;
160
+ paidTotal: import("@porulle/core/drizzle").PgColumn<{
161
+ name: "paid_total";
162
+ tableName: "layaways";
163
+ dataType: "number";
164
+ columnType: "PgInteger";
165
+ data: number;
166
+ driverParam: string | number;
167
+ notNull: true;
168
+ hasDefault: true;
169
+ isPrimaryKey: false;
170
+ isAutoincrement: false;
171
+ hasRuntimeDefault: false;
172
+ enumValues: undefined;
173
+ baseColumn: never;
174
+ identity: undefined;
175
+ generated: undefined;
176
+ }, {}, {}>;
177
+ orderId: import("@porulle/core/drizzle").PgColumn<{
178
+ name: "order_id";
179
+ tableName: "layaways";
180
+ dataType: "string";
181
+ columnType: "PgUUID";
182
+ data: string;
183
+ driverParam: string;
184
+ notNull: false;
185
+ hasDefault: false;
186
+ isPrimaryKey: false;
187
+ isAutoincrement: false;
188
+ hasRuntimeDefault: false;
189
+ enumValues: undefined;
190
+ baseColumn: never;
191
+ identity: undefined;
192
+ generated: undefined;
193
+ }, {}, {}>;
194
+ expiresAt: import("@porulle/core/drizzle").PgColumn<{
195
+ name: "expires_at";
196
+ tableName: "layaways";
197
+ dataType: "date";
198
+ columnType: "PgTimestamp";
199
+ data: Date;
200
+ driverParam: string;
201
+ notNull: false;
202
+ hasDefault: false;
203
+ isPrimaryKey: false;
204
+ isAutoincrement: false;
205
+ hasRuntimeDefault: false;
206
+ enumValues: undefined;
207
+ baseColumn: never;
208
+ identity: undefined;
209
+ generated: undefined;
210
+ }, {}, {}>;
211
+ forfeitedAt: import("@porulle/core/drizzle").PgColumn<{
212
+ name: "forfeited_at";
213
+ tableName: "layaways";
214
+ dataType: "date";
215
+ columnType: "PgTimestamp";
216
+ data: Date;
217
+ driverParam: string;
218
+ notNull: false;
219
+ hasDefault: false;
220
+ isPrimaryKey: false;
221
+ isAutoincrement: false;
222
+ hasRuntimeDefault: false;
223
+ enumValues: undefined;
224
+ baseColumn: never;
225
+ identity: undefined;
226
+ generated: undefined;
227
+ }, {}, {}>;
228
+ forfeitReason: import("@porulle/core/drizzle").PgColumn<{
229
+ name: "forfeit_reason";
230
+ tableName: "layaways";
231
+ dataType: "string";
232
+ columnType: "PgText";
233
+ data: string;
234
+ driverParam: string;
235
+ notNull: false;
236
+ hasDefault: false;
237
+ isPrimaryKey: false;
238
+ isAutoincrement: false;
239
+ hasRuntimeDefault: false;
240
+ enumValues: [string, ...string[]];
241
+ baseColumn: never;
242
+ identity: undefined;
243
+ generated: undefined;
244
+ }, {}, {}>;
245
+ createdBy: import("@porulle/core/drizzle").PgColumn<{
246
+ name: "created_by";
247
+ tableName: "layaways";
248
+ dataType: "string";
249
+ columnType: "PgText";
250
+ data: string;
251
+ driverParam: string;
252
+ notNull: true;
253
+ hasDefault: false;
254
+ isPrimaryKey: false;
255
+ isAutoincrement: false;
256
+ hasRuntimeDefault: false;
257
+ enumValues: [string, ...string[]];
258
+ baseColumn: never;
259
+ identity: undefined;
260
+ generated: undefined;
261
+ }, {}, {}>;
262
+ metadata: import("@porulle/core/drizzle").PgColumn<{
263
+ name: "metadata";
264
+ tableName: "layaways";
265
+ dataType: "json";
266
+ columnType: "PgJsonb";
267
+ data: Record<string, unknown>;
268
+ driverParam: unknown;
269
+ notNull: false;
270
+ hasDefault: true;
271
+ isPrimaryKey: false;
272
+ isAutoincrement: false;
273
+ hasRuntimeDefault: false;
274
+ enumValues: undefined;
275
+ baseColumn: never;
276
+ identity: undefined;
277
+ generated: undefined;
278
+ }, {}, {
279
+ $type: Record<string, unknown>;
280
+ }>;
281
+ createdAt: import("@porulle/core/drizzle").PgColumn<{
282
+ name: "created_at";
283
+ tableName: "layaways";
284
+ dataType: "date";
285
+ columnType: "PgTimestamp";
286
+ data: Date;
287
+ driverParam: string;
288
+ notNull: true;
289
+ hasDefault: true;
290
+ isPrimaryKey: false;
291
+ isAutoincrement: false;
292
+ hasRuntimeDefault: false;
293
+ enumValues: undefined;
294
+ baseColumn: never;
295
+ identity: undefined;
296
+ generated: undefined;
297
+ }, {}, {}>;
298
+ updatedAt: import("@porulle/core/drizzle").PgColumn<{
299
+ name: "updated_at";
300
+ tableName: "layaways";
301
+ dataType: "date";
302
+ columnType: "PgTimestamp";
303
+ data: Date;
304
+ driverParam: string;
305
+ notNull: true;
306
+ hasDefault: true;
307
+ isPrimaryKey: false;
308
+ isAutoincrement: false;
309
+ hasRuntimeDefault: false;
310
+ enumValues: undefined;
311
+ baseColumn: never;
312
+ identity: undefined;
313
+ generated: undefined;
314
+ }, {}, {}>;
315
+ };
316
+ dialect: "pg";
317
+ }>;
318
+ export declare const layawayPayments: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
319
+ name: "layaway_payments";
320
+ schema: undefined;
321
+ columns: {
322
+ id: import("@porulle/core/drizzle").PgColumn<{
323
+ name: "id";
324
+ tableName: "layaway_payments";
325
+ dataType: "string";
326
+ columnType: "PgUUID";
327
+ data: string;
328
+ driverParam: string;
329
+ notNull: true;
330
+ hasDefault: true;
331
+ isPrimaryKey: true;
332
+ isAutoincrement: false;
333
+ hasRuntimeDefault: false;
334
+ enumValues: undefined;
335
+ baseColumn: never;
336
+ identity: undefined;
337
+ generated: undefined;
338
+ }, {}, {}>;
339
+ layawayId: import("@porulle/core/drizzle").PgColumn<{
340
+ name: "layaway_id";
341
+ tableName: "layaway_payments";
342
+ dataType: "string";
343
+ columnType: "PgUUID";
344
+ data: string;
345
+ driverParam: string;
346
+ notNull: true;
347
+ hasDefault: false;
348
+ isPrimaryKey: false;
349
+ isAutoincrement: false;
350
+ hasRuntimeDefault: false;
351
+ enumValues: undefined;
352
+ baseColumn: never;
353
+ identity: undefined;
354
+ generated: undefined;
355
+ }, {}, {}>;
356
+ amount: import("@porulle/core/drizzle").PgColumn<{
357
+ name: "amount";
358
+ tableName: "layaway_payments";
359
+ dataType: "number";
360
+ columnType: "PgInteger";
361
+ data: number;
362
+ driverParam: string | number;
363
+ notNull: true;
364
+ hasDefault: false;
365
+ isPrimaryKey: false;
366
+ isAutoincrement: false;
367
+ hasRuntimeDefault: false;
368
+ enumValues: undefined;
369
+ baseColumn: never;
370
+ identity: undefined;
371
+ generated: undefined;
372
+ }, {}, {}>;
373
+ method: import("@porulle/core/drizzle").PgColumn<{
374
+ name: "method";
375
+ tableName: "layaway_payments";
376
+ dataType: "string";
377
+ columnType: "PgText";
378
+ data: string;
379
+ driverParam: string;
380
+ notNull: true;
381
+ hasDefault: false;
382
+ isPrimaryKey: false;
383
+ isAutoincrement: false;
384
+ hasRuntimeDefault: false;
385
+ enumValues: [string, ...string[]];
386
+ baseColumn: never;
387
+ identity: undefined;
388
+ generated: undefined;
389
+ }, {}, {}>;
390
+ reference: import("@porulle/core/drizzle").PgColumn<{
391
+ name: "reference";
392
+ tableName: "layaway_payments";
393
+ dataType: "string";
394
+ columnType: "PgText";
395
+ data: string;
396
+ driverParam: string;
397
+ notNull: false;
398
+ hasDefault: false;
399
+ isPrimaryKey: false;
400
+ isAutoincrement: false;
401
+ hasRuntimeDefault: false;
402
+ enumValues: [string, ...string[]];
403
+ baseColumn: never;
404
+ identity: undefined;
405
+ generated: undefined;
406
+ }, {}, {}>;
407
+ performedBy: import("@porulle/core/drizzle").PgColumn<{
408
+ name: "performed_by";
409
+ tableName: "layaway_payments";
410
+ dataType: "string";
411
+ columnType: "PgText";
412
+ data: string;
413
+ driverParam: string;
414
+ notNull: true;
415
+ hasDefault: false;
416
+ isPrimaryKey: false;
417
+ isAutoincrement: false;
418
+ hasRuntimeDefault: false;
419
+ enumValues: [string, ...string[]];
420
+ baseColumn: never;
421
+ identity: undefined;
422
+ generated: undefined;
423
+ }, {}, {}>;
424
+ createdAt: import("@porulle/core/drizzle").PgColumn<{
425
+ name: "created_at";
426
+ tableName: "layaway_payments";
427
+ dataType: "date";
428
+ columnType: "PgTimestamp";
429
+ data: Date;
430
+ driverParam: string;
431
+ notNull: true;
432
+ hasDefault: true;
433
+ isPrimaryKey: false;
434
+ isAutoincrement: false;
435
+ hasRuntimeDefault: false;
436
+ enumValues: undefined;
437
+ baseColumn: never;
438
+ identity: undefined;
439
+ generated: undefined;
440
+ }, {}, {}>;
441
+ };
442
+ dialect: "pg";
443
+ }>;
444
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBlB,CAAC;AAEJ,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUzB,CAAC"}