|
|
@@ -2,6 +2,7 @@ import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, CreateDa
|
|
|
import { GoodsCategory } from './goods-category.entity';
|
|
|
import { Supplier } from '@/server/modules/supplier/supplier.entity';
|
|
|
import { File } from '@/server/modules/files/file.entity';
|
|
|
+import { Merchant } from '@/server/modules/merchant/merchant.entity';
|
|
|
|
|
|
@Entity('goods')
|
|
|
export class Goods {
|
|
|
@@ -107,4 +108,8 @@ export class Goods {
|
|
|
@ManyToOne(() => File, { nullable: true })
|
|
|
@JoinColumn({ name: 'image_file_id', referencedColumnName: 'id' })
|
|
|
imageFile!: File | null;
|
|
|
+
|
|
|
+ @ManyToOne(() => Merchant, { nullable: true })
|
|
|
+ @JoinColumn({ name: 'merchant_id', referencedColumnName: 'id' })
|
|
|
+ merchant!: Merchant | null;
|
|
|
}
|