45 create billing core tables (#4096)

* Add self billing feature flag

* Add two core tables for billing

* Remove useless imports

* Remove graphql decorators

* Rename subscriptionProduct table
This commit is contained in:
martmull
2024-02-21 18:17:09 +01:00
committed by GitHub
parent f407c70356
commit d4fac2ea70
10 changed files with 177 additions and 11 deletions

View File

@ -6,12 +6,14 @@ import {
CreateDateColumn,
Entity,
OneToMany,
OneToOne,
PrimaryGeneratedColumn,
UpdateDateColumn,
} from 'typeorm';
import { User } from 'src/core/user/user.entity';
import { FeatureFlagEntity } from 'src/core/feature-flag/feature-flag.entity';
import { BillingSubscription } from 'src/core/billing/entities/billing-subscription.entity';
@Entity({ name: 'workspace', schema: 'core' })
@ObjectType('Workspace')
@ -65,4 +67,10 @@ export class Workspace {
@Field()
activationStatus: 'active' | 'inactive';
@OneToOne(
() => BillingSubscription,
(billingSubscription) => billingSubscription.workspace,
)
billingSubscription: BillingSubscription;
}