Skip to content

Commit

Permalink
🐛 fix: join column에 user_id 이름 추가 (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
swkim12345 authored Dec 4, 2024
1 parent c4d1d9e commit 830dcd1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/backend/src/alarm/domain/subscription.entity.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';
import {
Column,
Entity,
JoinColumn,
ManyToOne,
PrimaryGeneratedColumn,
} from 'typeorm';
import { User } from '@/user/domain/user.entity';

@Entity()
Expand All @@ -7,6 +13,7 @@ export class PushSubscription {
id: number;

@ManyToOne(() => User, (user) => user.subscriptions, { onDelete: 'CASCADE' })
@JoinColumn({ name: 'user_id' })
user: User;

@Column({ type: 'text' })
Expand Down

0 comments on commit 830dcd1

Please sign in to comment.