Skip to content

Commit

Permalink
➕ add: 사용자 보유 주식 테이블 유니크 조건 추가 #53
Browse files Browse the repository at this point in the history
  • Loading branch information
sieunie committed Nov 15, 2024
1 parent 57d1174 commit 139bc4a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions BE/src/userStock/user-stock.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import {
Column,
Entity,
PrimaryGeneratedColumn,
Unique,
UpdateDateColumn,
} from 'typeorm';

@Entity('user_stocks')
@Unique(['user_id', 'stock_code'])
export class UserStock {
@PrimaryGeneratedColumn()
id: number;
Expand Down

0 comments on commit 139bc4a

Please sign in to comment.