update
This commit is contained in:
63
src/entity/trx_company_user_activity.ts
Normal file
63
src/entity/trx_company_user_activity.ts
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||||
|
|
||||||
|
import { ActivityType } from "../types/action";
|
||||||
|
import { TrxCompanyUser } from "./trx_company_users";
|
||||||
|
|
||||||
|
@Entity("trx_company_user_activities")
|
||||||
|
export class TrxCompanyUserActivity {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxCompanyUser, { onDelete: "NO ACTION", nullable: false })
|
||||||
|
@JoinColumn()
|
||||||
|
user: TrxCompanyUser;
|
||||||
|
|
||||||
|
@Index()
|
||||||
|
@Column({
|
||||||
|
type: "uuid",
|
||||||
|
})
|
||||||
|
refresh_token: string;
|
||||||
|
|
||||||
|
@Index()
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 512,
|
||||||
|
})
|
||||||
|
module: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 2048,
|
||||||
|
})
|
||||||
|
description: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 1,
|
||||||
|
})
|
||||||
|
action: ActivityType;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 2048,
|
||||||
|
})
|
||||||
|
url: String;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
data_body: String;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@DeleteDateColumn()
|
||||||
|
deleted_at: Date;
|
||||||
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
export * from "../entity/trx_companies";
|
export * from "../entity/trx_companies";
|
||||||
export * from "../entity/trx_company_users";
|
export * from "../entity/trx_company_users";
|
||||||
|
export * from "../entity/trx_company_user_activity";
|
||||||
export * from "../entity/trx_company_user_refresh_token";
|
export * from "../entity/trx_company_user_refresh_token";
|
||||||
export * from "../entity/trx_company_accounts";
|
export * from "../entity/trx_company_accounts";
|
||||||
export * from "../entity/trx_otp_email";
|
export * from "../entity/trx_otp_email";
|
||||||
|
|||||||
@ -30,3 +30,25 @@ export enum TrxConfigBankType {
|
|||||||
"indonesia" = "indonesia",
|
"indonesia" = "indonesia",
|
||||||
"domestic" = "domestic",
|
"domestic" = "domestic",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum TrxActivityType {
|
||||||
|
"Create" = "C",
|
||||||
|
"View" = "V",
|
||||||
|
"Update" = "U",
|
||||||
|
"Delete" = "D",
|
||||||
|
"Restore" = "T",
|
||||||
|
"Download" = "W",
|
||||||
|
"Login" = "L",
|
||||||
|
"Logout" = "O",
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum TrxActivityTypeReverse {
|
||||||
|
"C" = "Create",
|
||||||
|
"V" = "View",
|
||||||
|
"U" = "Update",
|
||||||
|
"D" = "Delete",
|
||||||
|
"T" = "Restore",
|
||||||
|
"W" = "Download",
|
||||||
|
"L" = "Login",
|
||||||
|
"O" = "Logout",
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user