remove relation
This commit is contained in:
@ -4,15 +4,9 @@ import {
|
|||||||
Column,
|
Column,
|
||||||
CreateDateColumn,
|
CreateDateColumn,
|
||||||
UpdateDateColumn,
|
UpdateDateColumn,
|
||||||
DeleteDateColumn,
|
DeleteDateColumn
|
||||||
ManyToOne,
|
|
||||||
JoinColumn,
|
|
||||||
} from 'typeorm';
|
} from 'typeorm';
|
||||||
|
|
||||||
import { User } from './users';
|
|
||||||
import { Department } from './department';
|
|
||||||
import { Goods } from './goods';
|
|
||||||
|
|
||||||
@Entity('asset_realizations')
|
@Entity('asset_realizations')
|
||||||
export class AssetRealization {
|
export class AssetRealization {
|
||||||
@PrimaryGeneratedColumn('uuid')
|
@PrimaryGeneratedColumn('uuid')
|
||||||
@ -30,30 +24,18 @@ export class AssetRealization {
|
|||||||
})
|
})
|
||||||
realization_date: Date;
|
realization_date: Date;
|
||||||
|
|
||||||
@ManyToOne(() => Goods, (goods) => goods.id, { nullable: false })
|
|
||||||
@JoinColumn({ name: 'goods_id' })
|
|
||||||
goods: Goods;
|
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
type: 'uuid',
|
type: 'uuid',
|
||||||
})
|
})
|
||||||
goods_id: string;
|
goods_id: string;
|
||||||
|
|
||||||
@ManyToOne(() => Department, (department) => department.id, { nullable: false })
|
|
||||||
@JoinColumn({ name: 'department_id' })
|
|
||||||
department: Department;
|
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
type: 'uuid',
|
type: 'uuid',
|
||||||
})
|
})
|
||||||
department_id: string;
|
department_id: string;
|
||||||
|
|
||||||
@ManyToOne(() => User, (user) => user.id, { nullable: false })
|
|
||||||
@JoinColumn({ name: 'realized_by' })
|
|
||||||
realizedBy: User;
|
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
type: 'uuid',
|
type: 'uuid',
|
||||||
|
|||||||
@ -3,24 +3,14 @@ import {
|
|||||||
PrimaryGeneratedColumn,
|
PrimaryGeneratedColumn,
|
||||||
Column,
|
Column,
|
||||||
CreateDateColumn,
|
CreateDateColumn,
|
||||||
UpdateDateColumn,
|
UpdateDateColumn
|
||||||
ManyToOne,
|
|
||||||
JoinColumn,
|
|
||||||
} from 'typeorm';
|
} from 'typeorm';
|
||||||
|
|
||||||
import { User } from './users';
|
|
||||||
import { RequestOrder } from './request_orders';
|
|
||||||
import { Goods } from './goods';
|
|
||||||
|
|
||||||
@Entity('goods_handover')
|
@Entity('goods_handover')
|
||||||
export class GoodsHandover {
|
export class GoodsHandover {
|
||||||
@PrimaryGeneratedColumn('uuid')
|
@PrimaryGeneratedColumn('uuid')
|
||||||
id: string;
|
id: string;
|
||||||
|
|
||||||
@ManyToOne(() => RequestOrder, (requestOrder) => requestOrder.id, { nullable: false })
|
|
||||||
@JoinColumn({ name: 'request_order_id' })
|
|
||||||
requestOrder: RequestOrder;
|
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
type: 'uuid',
|
type: 'uuid',
|
||||||
@ -33,30 +23,18 @@ export class GoodsHandover {
|
|||||||
})
|
})
|
||||||
handover_date: Date;
|
handover_date: Date;
|
||||||
|
|
||||||
@ManyToOne(() => Goods, (goods) => goods.id, { nullable: false })
|
|
||||||
@JoinColumn({ name: 'goods_id' })
|
|
||||||
goods: Goods;
|
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
type: 'uuid',
|
type: 'uuid',
|
||||||
})
|
})
|
||||||
goods_id: string;
|
goods_id: string;
|
||||||
|
|
||||||
@ManyToOne(() => User, (user) => user.id, { nullable: false })
|
|
||||||
@JoinColumn({ name: 'handed_over_by' })
|
|
||||||
handedOverBy: User;
|
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
type: 'uuid',
|
type: 'uuid',
|
||||||
})
|
})
|
||||||
handed_over_by: string;
|
handed_over_by: string;
|
||||||
|
|
||||||
@ManyToOne(() => User, (user) => user.id, { nullable: false })
|
|
||||||
@JoinColumn({ name: 'received_by' })
|
|
||||||
receivedBy: User;
|
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
type: 'uuid',
|
type: 'uuid',
|
||||||
|
|||||||
Reference in New Issue
Block a user