Skip to content

Commit

Permalink
comment:comment User entity
Browse files Browse the repository at this point in the history
  • Loading branch information
LAPTOP-EIABQG0H\tulip committed Oct 4, 2023
1 parent 50cf09c commit 08f9e49
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modules/products/entities/product.entity.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CommonColumns } from '@/common/entities/common-columns';
import { UserEntity } from '@/modules/users/entities/user.entity';
// import { UserEntity } from '@/modules/users/entities/user.entity';
import { Column, PrimaryGeneratedColumn, ManyToMany, JoinTable, ManyToOne, JoinColumn, Entity } from 'typeorm';

@Entity({ name: 'products' })
Expand All @@ -8,9 +8,9 @@ export class ProductEntity extends CommonColumns {
@PrimaryGeneratedColumn()

Check warning on line 8 in src/modules/products/entities/product.entity.ts

View workflow job for this annotation

GitHub Actions / test nestjs

'ManyToOne' is defined but never used
id: number;

Check warning on line 9 in src/modules/products/entities/product.entity.ts

View workflow job for this annotation

GitHub Actions / test nestjs

'JoinColumn' is defined but never used

@ManyToOne(() => UserEntity, seller => seller.products)
@JoinColumn({ name: 'seller_id' }) // This sets up the foreign key
seller: UserEntity;
// @ManyToOne(() => UserEntity, seller => seller.products)
// @JoinColumn({ name: 'seller_id' }) // This sets up the foreign key
// seller: UserEntity;

@Column()
name: string;
Expand Down

0 comments on commit 08f9e49

Please sign in to comment.