remove user relation
This commit is contained in:
@ -9,9 +9,7 @@ import {
|
|||||||
JoinColumn,
|
JoinColumn,
|
||||||
} from 'typeorm';
|
} from 'typeorm';
|
||||||
|
|
||||||
import { Supplier } from './supplier';
|
|
||||||
import { RequestOrder } from './request_orders';
|
import { RequestOrder } from './request_orders';
|
||||||
import { User } from './users';
|
|
||||||
|
|
||||||
export enum PaymentStatus {
|
export enum PaymentStatus {
|
||||||
PAID = 'PAID',
|
PAID = 'PAID',
|
||||||
@ -55,10 +53,6 @@ export class Invoice {
|
|||||||
})
|
})
|
||||||
due_date: Date;
|
due_date: Date;
|
||||||
|
|
||||||
@ManyToOne(() => Supplier, (supplier) => supplier.id, { nullable: false })
|
|
||||||
@JoinColumn({ name: 'supplier_id' })
|
|
||||||
supplier: Supplier;
|
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
type: 'uuid',
|
type: 'uuid',
|
||||||
@ -126,10 +120,6 @@ export class Invoice {
|
|||||||
})
|
})
|
||||||
payment_method: PaymentMethod;
|
payment_method: PaymentMethod;
|
||||||
|
|
||||||
@ManyToOne(() => User, (user) => user.id, { nullable: false })
|
|
||||||
@JoinColumn({ name: 'issued_by' })
|
|
||||||
issuedBy: User;
|
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
type: 'uuid',
|
type: 'uuid',
|
||||||
|
|||||||
@ -11,7 +11,6 @@ import {
|
|||||||
} from 'typeorm';
|
} from 'typeorm';
|
||||||
|
|
||||||
import { Department } from './department';
|
import { Department } from './department';
|
||||||
import { User } from './users';
|
|
||||||
import { AssetRealization } from './asset_realizations';
|
import { AssetRealization } from './asset_realizations';
|
||||||
|
|
||||||
@Entity('asset_realization_recaps')
|
@Entity('asset_realization_recaps')
|
||||||
@ -55,10 +54,6 @@ export class AssetRealizationRecap {
|
|||||||
})
|
})
|
||||||
department_id: string;
|
department_id: string;
|
||||||
|
|
||||||
@ManyToOne(() => User, (user) => user.id, { nullable: false })
|
|
||||||
@JoinColumn({ name: 'created_by' })
|
|
||||||
createdBy: User;
|
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
type: 'uuid',
|
type: 'uuid',
|
||||||
|
|||||||
@ -4,12 +4,9 @@ import {
|
|||||||
Column,
|
Column,
|
||||||
CreateDateColumn,
|
CreateDateColumn,
|
||||||
UpdateDateColumn,
|
UpdateDateColumn,
|
||||||
ManyToOne,
|
|
||||||
OneToMany,
|
OneToMany,
|
||||||
JoinColumn,
|
|
||||||
} from 'typeorm';
|
} from 'typeorm';
|
||||||
|
|
||||||
import { User } from './users';
|
|
||||||
import { PaymentApproval } from './payment_approval';
|
import { PaymentApproval } from './payment_approval';
|
||||||
|
|
||||||
@Entity('finance_memos')
|
@Entity('finance_memos')
|
||||||
@ -26,16 +23,6 @@ export class FinanceMemo {
|
|||||||
@OneToMany(() => PaymentApproval, (paymentApproval) => paymentApproval.financeMemo)
|
@OneToMany(() => PaymentApproval, (paymentApproval) => paymentApproval.financeMemo)
|
||||||
paymentApprovals: PaymentApproval[];
|
paymentApprovals: PaymentApproval[];
|
||||||
|
|
||||||
@ManyToOne(() => User, (user) => user.id, { nullable: false })
|
|
||||||
@JoinColumn({ name: 'created_by' })
|
|
||||||
createdBy: User;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
type: 'uuid',
|
|
||||||
})
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -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 { User } from './users';
|
|
||||||
|
|
||||||
@Entity('fixed_assets')
|
@Entity('fixed_assets')
|
||||||
export class FixedAssetClassification {
|
export class FixedAssetClassification {
|
||||||
@ -71,10 +68,6 @@ export class FixedAssetClassification {
|
|||||||
})
|
})
|
||||||
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,
|
||||||
@ -82,10 +75,6 @@ export class FixedAssetClassification {
|
|||||||
})
|
})
|
||||||
created_by: string;
|
created_by: string;
|
||||||
|
|
||||||
@ManyToOne(() => User, (user) => user.id, { nullable: true })
|
|
||||||
@JoinColumn({ name: 'updated_by' })
|
|
||||||
updatedBy: User;
|
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
|
|||||||
@ -7,11 +7,9 @@ import {
|
|||||||
DeleteDateColumn,
|
DeleteDateColumn,
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
OneToMany,
|
|
||||||
Index,
|
Index,
|
||||||
} from 'typeorm';
|
} from 'typeorm';
|
||||||
|
|
||||||
import { User } from './users';
|
|
||||||
import { Supplier } from './supplier';
|
import { Supplier } from './supplier';
|
||||||
import { RequestOrder } from './request_orders';
|
import { RequestOrder } from './request_orders';
|
||||||
import { Department } from './department';
|
import { Department } from './department';
|
||||||
@ -75,17 +73,6 @@ export class GoodsReceipt {
|
|||||||
})
|
})
|
||||||
status: string;
|
status: string;
|
||||||
|
|
||||||
@ManyToOne(() => User, (user) => user.id, { nullable: false })
|
|
||||||
@JoinColumn({ name: 'received_by' })
|
|
||||||
receivedBy: User;
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
type: 'uuid',
|
|
||||||
})
|
|
||||||
received_by: string;
|
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -9,7 +9,6 @@ import {
|
|||||||
JoinColumn,
|
JoinColumn,
|
||||||
} from 'typeorm';
|
} from 'typeorm';
|
||||||
|
|
||||||
import { User } from './users';
|
|
||||||
import { RequestOrder } from './request_orders';
|
import { RequestOrder } from './request_orders';
|
||||||
import { AssetJournalEntry } from './journal_entries';
|
import { AssetJournalEntry } from './journal_entries';
|
||||||
import { FinanceMemo } from './finance_memo';
|
import { FinanceMemo } from './finance_memo';
|
||||||
@ -51,10 +50,6 @@ export class PaymentApproval {
|
|||||||
})
|
})
|
||||||
finance_approval_status: ApprovalStatus;
|
finance_approval_status: ApprovalStatus;
|
||||||
|
|
||||||
@ManyToOne(() => User, (user) => user.id, { nullable: true })
|
|
||||||
@JoinColumn({ name: 'approved_by' })
|
|
||||||
approvedBy: User;
|
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
type: 'uuid',
|
type: 'uuid',
|
||||||
@ -81,4 +76,4 @@ export class PaymentApproval {
|
|||||||
@Column({ nullable: true })
|
@Column({ nullable: true })
|
||||||
@UpdateDateColumn()
|
@UpdateDateColumn()
|
||||||
updated_at: Date;
|
updated_at: Date;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,6 @@ import {
|
|||||||
JoinColumn,
|
JoinColumn,
|
||||||
} from 'typeorm';
|
} from 'typeorm';
|
||||||
|
|
||||||
import { User } from './users';
|
|
||||||
import { RequestOrder } from './request_orders';
|
import { RequestOrder } from './request_orders';
|
||||||
|
|
||||||
@Entity('request_submissions')
|
@Entity('request_submissions')
|
||||||
@ -28,17 +27,6 @@ export class RequestSubmission {
|
|||||||
})
|
})
|
||||||
request_order_id: string;
|
request_order_id: string;
|
||||||
|
|
||||||
@ManyToOne(() => User, (user) => user.id, { nullable: false })
|
|
||||||
@JoinColumn({ name: 'submitted_by' })
|
|
||||||
submittedBy: User;
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
type: 'uuid',
|
|
||||||
})
|
|
||||||
submitted_by: string;
|
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
type: 'date',
|
type: 'date',
|
||||||
|
|||||||
Reference in New Issue
Block a user