export const subscriptions = pgTable('subscriptions', {
id: uuid('id').defaultRandom().primaryKey(),
userId: text('user_id')
.references(() => user.id)
.notNull(),
stripeCustomerId: text('stripe_customer_id').notNull().unique(),
productId: integer('product_id').references(() => products.id),
stripeSubscriptionId: text('stripe_subscription_id').notNull(),
status: subscriptionStatus('status').default('active'),
currentPeriodStart: timestamp('current_period_start').notNull(),
currentPeriodEnd: timestamp('current_period_end').notNull(),
});
export const subscriptions = pgTable('subscriptions', {
id: uuid('id').defaultRandom().primaryKey(),
userId: text('user_id')
.references(() => user.id)
.notNull(),
stripeCustomerId: text('stripe_customer_id').notNull().unique(),
productId: integer('product_id').references(() => products.id),
stripeSubscriptionId: text('stripe_subscription_id').notNull(),
status: subscriptionStatus('status').default('active'),
currentPeriodStart: timestamp('current_period_start').notNull(),
currentPeriodEnd: timestamp('current_period_end').notNull(),
});