Merge branch 'main' of https://git.shiblysolution.id/BRITL/entity
This commit is contained in:
@ -1,52 +1,52 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||||
|
|
||||||
import { BrizziCardStatus } from '../types/brizzi';
|
import { BrizziCardStatus } from "../types/brizzi";
|
||||||
import { BrizziBatch } from './brizzi_batchs';
|
import { BrizziBatch } from "./brizzi_batchs";
|
||||||
|
|
||||||
@Entity('brizzi_cards', { schema: 'brizzis' })
|
@Entity("brizzi_cards", { schema: "brizzis" })
|
||||||
export class BrizziCard {
|
export class BrizziCard {
|
||||||
@PrimaryGeneratedColumn('uuid')
|
@PrimaryGeneratedColumn("uuid")
|
||||||
id: string;
|
id: string;
|
||||||
|
|
||||||
@ManyToOne(() => BrizziBatch, { onDelete: 'RESTRICT' })
|
@ManyToOne(() => BrizziBatch, { onDelete: "RESTRICT" })
|
||||||
@JoinTable()
|
@JoinTable()
|
||||||
batch: BrizziBatch;
|
batch: BrizziBatch;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
length: 256
|
length: 256,
|
||||||
})
|
})
|
||||||
brand: string;
|
brand: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
length: 256
|
length: 256,
|
||||||
})
|
})
|
||||||
model: string;
|
model: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
unique: true,
|
unique: true,
|
||||||
length: 256
|
length: 256,
|
||||||
})
|
})
|
||||||
code: string;
|
code: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
length: 256
|
length: 256,
|
||||||
})
|
})
|
||||||
uid: string;
|
uid: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 4096
|
length: 4096,
|
||||||
})
|
})
|
||||||
notes: string;
|
notes: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
type: 'float8',
|
type: "float8",
|
||||||
nullable: false,
|
nullable: false,
|
||||||
default: 0
|
default: 0,
|
||||||
})
|
})
|
||||||
balance: number;
|
balance: number;
|
||||||
|
|
||||||
@ -55,10 +55,13 @@ export class BrizziCard {
|
|||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
length: 64
|
length: 64,
|
||||||
})
|
})
|
||||||
status: BrizziCardStatus;
|
status: BrizziCardStatus;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
active_at: Date;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
71
src/entity/trx_customer_slas.ts
Normal file
71
src/entity/trx_customer_slas.ts
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||||
|
import { TrxCustomerPosition, TrxCustomerStatus } from "../types/trx";
|
||||||
|
import { TrxCustomer } from "./trx_customers";
|
||||||
|
|
||||||
|
@Entity("trx_customer_slas", { schema: "trx" })
|
||||||
|
export class TrxCustomerSla {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxCustomer, { onDelete: "NO ACTION" })
|
||||||
|
@JoinColumn()
|
||||||
|
customer: TrxCustomer;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
position: TrxCustomerPosition;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
status: TrxCustomerStatus;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
start_by: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
start_at: Date;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
length: 256,
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
end_by: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
end_at: Date;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: "float8",
|
||||||
|
})
|
||||||
|
duration: number;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by: string;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by: string;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@DeleteDateColumn()
|
||||||
|
deleted_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by: string;
|
||||||
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
import { TrxCustomerStatus, TrxCustomerType, TrxIdentityType } from "../types/trx";
|
import { TrxCustomerPosition, TrxCustomerStatus, TrxCustomerType, TrxIdentityType } from "../types/trx";
|
||||||
import { TrxOccupation } from "./trx_occupations";
|
import { TrxOccupation } from "./trx_occupations";
|
||||||
import { TrxCountry } from "./trx_countries";
|
import { TrxCountry } from "./trx_countries";
|
||||||
|
|
||||||
@ -99,6 +99,36 @@ export class TrxCustomer {
|
|||||||
})
|
})
|
||||||
identity_type: TrxIdentityType;
|
identity_type: TrxIdentityType;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
position: TrxCustomerPosition;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
tellered_by: string;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
tellered_at: Date;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
default: false,
|
||||||
|
})
|
||||||
|
is_teller: boolean;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
manager_by: string;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
manager_at: Date;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
default: false,
|
||||||
|
})
|
||||||
|
is_manager: boolean;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -8,6 +8,7 @@ export * from "../entity/trx_customer_user_signatures";
|
|||||||
export * from "../entity/trx_customer_user_refresh_tokens";
|
export * from "../entity/trx_customer_user_refresh_tokens";
|
||||||
export * from "../entity/trx_customer_user_activities";
|
export * from "../entity/trx_customer_user_activities";
|
||||||
export * from "../entity/trx_customer_costs";
|
export * from "../entity/trx_customer_costs";
|
||||||
|
export * from "../entity/trx_customer_slas";
|
||||||
export * from "../entity/trx_countries";
|
export * from "../entity/trx_countries";
|
||||||
export * from "../entity/trx_currencies";
|
export * from "../entity/trx_currencies";
|
||||||
export * from "../entity/trx_country_currencies";
|
export * from "../entity/trx_country_currencies";
|
||||||
|
|||||||
@ -15,11 +15,11 @@ export enum TrxVerificationStatus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export enum TrxCustomerStatus {
|
export enum TrxCustomerStatus {
|
||||||
"Pending Supervisor" = "pending_supervisor",
|
"pending_supervisor" = "pending_supervisor",
|
||||||
"Pending Manager" = "pending_manager",
|
"pending_manager" = "pending_manager",
|
||||||
"Reject" = "reject",
|
"reject" = "reject",
|
||||||
"Active" = "active",
|
"Active" = "active",
|
||||||
"Not Active" = "not_active",
|
"not_active" = "not_active",
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum TrxCustomerType {
|
export enum TrxCustomerType {
|
||||||
@ -27,6 +27,12 @@ export enum TrxCustomerType {
|
|||||||
"business" = "business",
|
"business" = "business",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum TrxCustomerPosition {
|
||||||
|
"teller" = "teller",
|
||||||
|
"manager" = "manager",
|
||||||
|
"done" = "done",
|
||||||
|
}
|
||||||
|
|
||||||
export enum TrxCostCode {
|
export enum TrxCostCode {
|
||||||
"BRI_TL_USD" = "BRI_TL_USD",
|
"BRI_TL_USD" = "BRI_TL_USD",
|
||||||
"OTHER_TL_USD" = "OTHER_TL_USD",
|
"OTHER_TL_USD" = "OTHER_TL_USD",
|
||||||
|
|||||||
Reference in New Issue
Block a user