remove user relation
This commit is contained in:
@ -11,7 +11,6 @@ import {
|
|||||||
} from 'typeorm';
|
} from 'typeorm';
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
import { Status } from '../types/status';
|
||||||
import { User } from './users';
|
|
||||||
import { Supplier } from './supplier';
|
import { Supplier } from './supplier';
|
||||||
import { AssetCategory } from './asset_category';
|
import { AssetCategory } from './asset_category';
|
||||||
|
|
||||||
@ -35,7 +34,7 @@ export class Goods {
|
|||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
length: 64,
|
length: 64,
|
||||||
unique: true,
|
unique: true,
|
||||||
})
|
})
|
||||||
item_code: string;
|
item_code: string;
|
||||||
|
|
||||||
@ -63,20 +62,12 @@ export class Goods {
|
|||||||
})
|
})
|
||||||
category_id: string;
|
category_id: string;
|
||||||
|
|
||||||
@ManyToOne(() => User, (user) => user.id, { nullable: true })
|
|
||||||
@JoinColumn({ name: 'created_by' })
|
|
||||||
createdBy: User;
|
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
type: 'uuid',
|
type: 'uuid',
|
||||||
})
|
})
|
||||||
created_by: string;
|
created_by: string;
|
||||||
|
|
||||||
@ManyToOne(() => User, (user) => user.id, { nullable: true })
|
|
||||||
@JoinColumn({ name: 'updated_by' })
|
|
||||||
updatedBy: User;
|
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
@ -88,12 +79,11 @@ export class Goods {
|
|||||||
@ManyToOne(() => Supplier, { nullable: false })
|
@ManyToOne(() => Supplier, { nullable: false })
|
||||||
@JoinColumn({ name: 'supplier_id' })
|
@JoinColumn({ name: 'supplier_id' })
|
||||||
supplier: Supplier;
|
supplier: Supplier;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
type: 'uuid',
|
type: 'uuid',
|
||||||
})
|
})
|
||||||
|
|
||||||
supplier_id: string;
|
supplier_id: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
|
|||||||
Reference in New Issue
Block a user