Files
cfw-autumn/shared/models/subModels/subModels.ts
John Yeo 3d0e4f94f2 wip
2025-09-29 11:15:23 +01:00

21 lines
539 B
TypeScript

import { z } from "zod/v4";
import { AppEnv } from "../genModels/genEnums.js";
export const SubscriptionSchema = z.object({
id: z.string(),
stripe_id: z.string().nullable(),
stripe_schedule_id: z.string().nullable(),
created_at: z.number(),
// metadata: z.record(z.string(), z.any()),
usage_features: z.array(z.string()),
org_id: z.string(),
current_period_start: z.number().nullable(),
current_period_end: z.number().nullable(),
env: z.nativeEnum(AppEnv),
});
export type Subscription = z.infer<typeof SubscriptionSchema>;