Skip to content

Commit

Permalink
Remove graphql decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
martmull committed Feb 21, 2024
1 parent 152c2d4 commit 2177ba9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import { Field, ID, ObjectType } from '@nestjs/graphql';

import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';
import { IDField } from '@ptc-org/nestjs-query-graphql';

import { BillingSubscription } from 'src/core/billing/entities/billing-subscription.entity';

@Entity({ name: 'billingProduct', schema: 'core' })
@ObjectType('BillingProduct')
export class BillingProduct {
@IDField(() => ID)
@PrimaryGeneratedColumn('uuid')
id: string;

@Field()
@Column({ nullable: false })
billingSubscriptionId: string;

Expand All @@ -25,15 +19,12 @@ export class BillingProduct {
)
billingSubscription: BillingSubscription;

@Field()
@Column({ nullable: false })
stripeProductId: string;

@Field()
@Column({ nullable: false })
stripePriceId: string;

@Field()
@Column({ nullable: false })
quantity: number;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { Field, ID, ObjectType } from '@nestjs/graphql';

import {
Column,
Entity,
Expand All @@ -8,16 +6,13 @@ import {
OneToOne,
PrimaryGeneratedColumn,
} from 'typeorm';
import { IDField } from '@ptc-org/nestjs-query-graphql';
import Stripe from 'stripe';

import { Workspace } from 'src/core/workspace/workspace.entity';
import { BillingProduct } from 'src/core/billing/entities/billing-product.entity';

@Entity({ name: 'billingSubscription', schema: 'core' })
@ObjectType('BillingSubscription')
export class BillingSubscription {
@IDField(() => ID)
@PrimaryGeneratedColumn('uuid')
id: string;

Expand All @@ -27,19 +22,15 @@ export class BillingSubscription {
@JoinColumn()
workspace: Workspace;

@Field()
@Column({ nullable: false, type: 'uuid' })
workspaceId: string;

@Field()
@Column({ unique: true, nullable: false })
stripeCustomerId: string;

@Field()
@Column({ unique: true, nullable: false })
stripeSubscriptionId: string;

@Field()
@Column({ nullable: false })
status: Stripe.Subscription.Status;

Expand Down

0 comments on commit 2177ba9

Please sign in to comment.