Spaces:
Paused
Paused
File size: 436 Bytes
1fe7075 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import type { Subscription } from '../../generated/prisma/client.js';
export class SubscriptionDto {
plan: Subscription['plan'];
status: Subscription['status'];
currentPeriodEnd: Date;
cancelAtPeriodEnd: boolean;
static from(subscription: Subscription): SubscriptionDto {
const { plan, status, currentPeriodEnd, cancelAtPeriodEnd } = subscription;
return { plan, status, currentPeriodEnd, cancelAtPeriodEnd };
}
}
|