remove relation asset_category
This commit is contained in:
@ -6,12 +6,9 @@ import {
|
|||||||
UpdateDateColumn,
|
UpdateDateColumn,
|
||||||
DeleteDateColumn,
|
DeleteDateColumn,
|
||||||
Index,
|
Index,
|
||||||
ManyToOne,
|
|
||||||
JoinColumn,
|
|
||||||
} from 'typeorm';
|
} from 'typeorm';
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
import { Status } from '../types/status';
|
||||||
import { AssetCategory } from './asset_category';
|
|
||||||
|
|
||||||
@Entity('goods')
|
@Entity('goods')
|
||||||
export class Goods {
|
export class Goods {
|
||||||
@ -51,10 +48,7 @@ export class Goods {
|
|||||||
})
|
})
|
||||||
quantity: number;
|
quantity: number;
|
||||||
|
|
||||||
@ManyToOne(() => AssetCategory, (category) => category.goods, { nullable: true })
|
@Index()
|
||||||
@JoinColumn({ name: 'category_id' })
|
|
||||||
category: AssetCategory;
|
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
type: 'uuid',
|
type: 'uuid',
|
||||||
|
|||||||
Reference in New Issue
Block a user