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:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user