- Add modules: ai, audit, billing-usage, biometrics, branches, dashboard, feature-flags, invoices, mcp, mobile, notifications, partners, payment-terminals, products, profiles, purchases, reports, sales, storage, warehouses, webhooks, whatsapp - Add controllers, DTOs, entities, and services for each module - Add shared services and utilities Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
58 lines
1.2 KiB
TypeScript
58 lines
1.2 KiB
TypeScript
/**
|
|
* Create Tenant Subscription DTO
|
|
*/
|
|
|
|
import { BillingCycle, SubscriptionStatus } from '../entities';
|
|
|
|
export class CreateTenantSubscriptionDto {
|
|
tenantId: string;
|
|
planId: string;
|
|
billingCycle?: BillingCycle;
|
|
currentPeriodStart?: Date;
|
|
currentPeriodEnd?: Date;
|
|
billingEmail?: string;
|
|
billingName?: string;
|
|
billingAddress?: Record<string, any>;
|
|
taxId?: string;
|
|
currentPrice: number;
|
|
discountPercent?: number;
|
|
discountReason?: string;
|
|
contractedUsers?: number;
|
|
contractedBranches?: number;
|
|
autoRenew?: boolean;
|
|
// Trial
|
|
startWithTrial?: boolean;
|
|
trialDays?: number;
|
|
}
|
|
|
|
export class UpdateTenantSubscriptionDto {
|
|
planId?: string;
|
|
billingCycle?: BillingCycle;
|
|
billingEmail?: string;
|
|
billingName?: string;
|
|
billingAddress?: Record<string, any>;
|
|
taxId?: string;
|
|
currentPrice?: number;
|
|
discountPercent?: number;
|
|
discountReason?: string;
|
|
contractedUsers?: number;
|
|
contractedBranches?: number;
|
|
autoRenew?: boolean;
|
|
}
|
|
|
|
export class CancelSubscriptionDto {
|
|
reason?: string;
|
|
cancelImmediately?: boolean;
|
|
}
|
|
|
|
export class ChangePlanDto {
|
|
newPlanId: string;
|
|
effectiveDate?: Date;
|
|
prorateBilling?: boolean;
|
|
}
|
|
|
|
export class SetPaymentMethodDto {
|
|
paymentMethodId: string;
|
|
paymentProvider: string;
|
|
}
|