add table log pulls
This commit is contained in:
46
src/entity/log_pull.ts
Normal file
46
src/entity/log_pull.ts
Normal file
@ -0,0 +1,46 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, OneToOne, JoinColumn } from 'typeorm';
|
||||
|
||||
import { LogPullType, StatusLogPull } from '../types/pull';
|
||||
|
||||
@Entity('log_pulls')
|
||||
export class LogPull {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 32
|
||||
})
|
||||
type: LogPullType;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 256
|
||||
})
|
||||
filename: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
default: false
|
||||
})
|
||||
is_file_deleted: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 64
|
||||
})
|
||||
status: StatusLogPull;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@Column({
|
||||
nullable: true
|
||||
})
|
||||
finished_at: Date;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@DeleteDateColumn()
|
||||
deleted_at: Date;
|
||||
}
|
||||
@ -21,6 +21,8 @@ import { District } from "./entity/district";
|
||||
import { IncomeTier } from "./entity/income_tier";
|
||||
import { Munisipo } from "./entity/munisipo";
|
||||
import { Suco } from "./entity/suco";
|
||||
import { LogPull } from "./entity/log_pull";
|
||||
import { LogPullType, StatusLogPull } from "./types/pull";
|
||||
|
||||
export {
|
||||
User,
|
||||
@ -46,5 +48,8 @@ export {
|
||||
District,
|
||||
IncomeTier,
|
||||
Munisipo,
|
||||
Suco
|
||||
Suco,
|
||||
LogPull,
|
||||
LogPullType,
|
||||
StatusLogPull
|
||||
};
|
||||
15
src/types/pull.ts
Normal file
15
src/types/pull.ts
Normal file
@ -0,0 +1,15 @@
|
||||
export enum LogPullType {
|
||||
"LNKOLEK" = "LNKOLEK",
|
||||
"CIF_BEREKENING" = "CIF_BEREKENING",
|
||||
"TRIAL_BALANCE_BRANCH" = "TRIAL_BALANCE_BRANCH",
|
||||
"TRIAL_BALANCE_KONSOLIDASI" = "TRIAL_BALANCE_KONSOLIDASI",
|
||||
"TRANSAKSI_CS" = "TRANSAKSI_CS"
|
||||
};
|
||||
|
||||
|
||||
export enum StatusLogPull {
|
||||
"Waiting Schedule" = "W",
|
||||
"Failed Pull Data" = "N",
|
||||
"Retry Pull Data" = "R",
|
||||
"Success Pull Data" = "Y"
|
||||
};
|
||||
Reference in New Issue
Block a user