refactor: subscriptions to nestjs

This commit is contained in:
Ahmed Bouhuolia
2025-03-24 23:38:43 +02:00
parent 4c42515613
commit ef22b9ddaf
87 changed files with 3949 additions and 92 deletions

View File

@@ -1,8 +1,10 @@
import { BaseModel } from "@/models/Model";
export class PaymentIntegration extends BaseModel {
paymentEnabled!: boolean;
payoutEnabled!: boolean;
readonly service!: string;
readonly paymentEnabled!: boolean;
readonly payoutEnabled!: boolean;
readonly accountId!: string;
static get tableName() {
return 'payment_integrations';
@@ -24,6 +26,9 @@ export class PaymentIntegration extends BaseModel {
return this.paymentEnabled && this.payoutEnabled;
}
/**
*
*/
static get modifiers() {
return {
/**

View File

@@ -1,7 +1,16 @@
import { Model } from 'objection';
import { BaseModel } from '@/models/Model';
import { PaymentIntegration } from './PaymentIntegration.model';
export class TransactionPaymentServiceEntry extends BaseModel {
readonly referenceId!: number;
readonly referenceType!: string;
readonly paymentIntegrationId!: number;
readonly enable!: boolean;
readonly options!: Record<string, any>;
readonly paymentIntegration: PaymentIntegration;
/**
* Table name
*/