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