feat(account): final touch to the account dto
This commit is contained in:
parent
aa566ee356
commit
c357f4bdaa
|
|
@ -20,7 +20,7 @@ model account {
|
||||||
email String? @db.VarChar(255)
|
email String? @db.VarChar(255)
|
||||||
email_autre String? @db.VarChar(255) //second email
|
email_autre String? @db.VarChar(255) //second email
|
||||||
company String? @db.VarChar(255) //name of the company account
|
company String? @db.VarChar(255) //name of the company account
|
||||||
contact String @db.Text //name of the contact at the company
|
contact String @db.Text //name of the contact at the company or account contact
|
||||||
address1 String? @db.VarChar(128)
|
address1 String? @db.VarChar(128)
|
||||||
address2 String? @db.VarChar(128) //sometimes used to specify the unit, the suit, the camping lot or used as a note???
|
address2 String? @db.VarChar(128) //sometimes used to specify the unit, the suit, the camping lot or used as a note???
|
||||||
city String? @db.VarChar(128)
|
city String? @db.VarChar(128)
|
||||||
|
|
@ -74,60 +74,18 @@ model account_group {
|
||||||
group_name String? @db.VarChar(64) //group name
|
group_name String? @db.VarChar(64) //group name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// this table could be ignored ? see comment on memo column
|
||||||
model account_memo {
|
model account_memo {
|
||||||
id BigInt @id @default(autoincrement())
|
id BigInt @id @default(autoincrement())
|
||||||
date_orig BigInt?
|
date_orig BigInt?
|
||||||
last_updated BigInt @default(0) @db.UnsignedBigInt
|
last_updated BigInt @default(0) @db.UnsignedBigInt
|
||||||
staff_id BigInt?
|
staff_id BigInt?
|
||||||
account_id BigInt?
|
account_id BigInt?
|
||||||
memo String? @db.VarChar(1024)
|
memo String? @db.VarChar(1024) //comment, seems to be a copy paste of a form, giving a bunch of infos on the account, should be queried instead of copied
|
||||||
color String @default(dbgenerated("(000000)")) @db.VarChar(6)
|
color String @default(dbgenerated("(000000)")) @db.VarChar(6) //CSS
|
||||||
bcolor String @default(dbgenerated("(E0E0E0)")) @db.VarChar(6)
|
bcolor String @default(dbgenerated("(E0E0E0)")) @db.VarChar(6) //CSS
|
||||||
border String @default(dbgenerated("(000000)")) @db.VarChar(6)
|
border String @default(dbgenerated("(000000)")) @db.VarChar(6) //CSS
|
||||||
|
|
||||||
@@index([account_id], map: "account_id")
|
@@index([account_id], map: "account_id")
|
||||||
@@index([staff_id], map: "staff_id")
|
@@index([staff_id], map: "staff_id")
|
||||||
}
|
}
|
||||||
|
|
||||||
model notes {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
account_id Int @db.UnsignedInt
|
|
||||||
notes String @db.MediumText
|
|
||||||
}
|
|
||||||
|
|
||||||
model email {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
account_id BigInt?
|
|
||||||
email String? @db.VarChar(128)
|
|
||||||
password String? @db.VarChar(128)
|
|
||||||
}
|
|
||||||
|
|
||||||
model client_pwd {
|
|
||||||
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
||||||
account_id Int @db.UnsignedInt
|
|
||||||
date BigInt @db.UnsignedBigInt
|
|
||||||
uid String @db.VarChar(32)
|
|
||||||
used Boolean @default(false)
|
|
||||||
}
|
|
||||||
|
|
||||||
model deposit_slip {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
customer_id String? @db.VarChar(32)
|
|
||||||
name String? @db.VarChar(512)
|
|
||||||
amount Float @default(0)
|
|
||||||
type String @db.VarChar(32)
|
|
||||||
desc String? @db.VarChar(255)
|
|
||||||
date BigInt? @db.UnsignedBigInt
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//NO USES FOR TICKETING PURPOSES
|
|
||||||
model account_profile {
|
|
||||||
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
||||||
account_id Int @db.UnsignedInt
|
|
||||||
profile_id String @db.VarChar(64)
|
|
||||||
address_id String @db.VarChar(64)
|
|
||||||
card_id String @db.VarChar(64)
|
|
||||||
token String @db.VarChar(32)
|
|
||||||
initial_transaction String @db.VarChar(128)
|
|
||||||
}
|
|
||||||
|
|
@ -92,7 +92,56 @@ model account_memo_template {
|
||||||
bcolor String @db.VarChar(6)
|
bcolor String @db.VarChar(6)
|
||||||
border String @default(dbgenerated("(000000)")) @db.VarChar(6)
|
border String @default(dbgenerated("(000000)")) @db.VarChar(6)
|
||||||
}
|
}
|
||||||
//this table display suspended account NOT USED
|
|
||||||
|
//not used
|
||||||
|
model notes {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
account_id Int @db.UnsignedInt
|
||||||
|
notes String @db.MediumText
|
||||||
|
}
|
||||||
|
|
||||||
|
//NOT USED
|
||||||
|
model email {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
account_id BigInt?
|
||||||
|
email String? @db.VarChar(128)
|
||||||
|
password String? @db.VarChar(128)
|
||||||
|
}
|
||||||
|
|
||||||
|
//not relevant to ticket module
|
||||||
|
model client_pwd {
|
||||||
|
id Int @id @default(autoincrement()) @db.UnsignedInt
|
||||||
|
account_id Int @db.UnsignedInt
|
||||||
|
date BigInt @db.UnsignedBigInt
|
||||||
|
uid String @db.VarChar(32)
|
||||||
|
used Boolean @default(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//NO USES FOR TICKETING PURPOSES
|
||||||
|
model account_profile {
|
||||||
|
id Int @id @default(autoincrement()) @db.UnsignedInt
|
||||||
|
account_id Int @db.UnsignedInt
|
||||||
|
profile_id String @db.VarChar(64)
|
||||||
|
address_id String @db.VarChar(64)
|
||||||
|
card_id String @db.VarChar(64)
|
||||||
|
token String @db.VarChar(32)
|
||||||
|
initial_transaction String @db.VarChar(128)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//not relevant to ticket module
|
||||||
|
model deposit_slip {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
customer_id String? @db.VarChar(32)
|
||||||
|
name String? @db.VarChar(512)
|
||||||
|
amount Float @default(0)
|
||||||
|
type String @db.VarChar(32)
|
||||||
|
desc String? @db.VarChar(255)
|
||||||
|
date BigInt? @db.UnsignedBigInt
|
||||||
|
}
|
||||||
|
|
||||||
|
//this table display suspended account
|
||||||
model account_suspension {
|
model account_suspension {
|
||||||
id Int @id @default(autoincrement()) @db.UnsignedInt
|
id Int @id @default(autoincrement()) @db.UnsignedInt
|
||||||
account_id Int @unique(map: "account_id") @db.UnsignedInt
|
account_id Int @unique(map: "account_id") @db.UnsignedInt
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,28 @@
|
||||||
export class AccountDto {
|
export class AccountDto {
|
||||||
id: number;
|
id: number;
|
||||||
customer_id: string;
|
customer_id?: string;
|
||||||
language_id: string;
|
language_id: string;
|
||||||
username: string;
|
username?: string;
|
||||||
password: string;
|
password?: string;
|
||||||
group_id: number;
|
group_id: GroupName;
|
||||||
status: number;
|
status?: number; //link to be made with AccountSuspension, somehow
|
||||||
first_name: string;
|
first_name?: string;
|
||||||
last_name: string;
|
last_name?: string;
|
||||||
mandataire: string;
|
mandataire?: string; //sometimes the first_name and last_name are found here, sometimes its the name of someone who manage the account
|
||||||
title: string;
|
title?: Title;
|
||||||
email: string;
|
email?: string[];
|
||||||
email_autre?: string;
|
|
||||||
company?: string;
|
company?: string;
|
||||||
contact: string;
|
contact: string;
|
||||||
address1: string;
|
address?: string[]; //string of country, city, state, zip, road, number, apt concat.
|
||||||
address2?: string;
|
|
||||||
city: string;
|
|
||||||
state: string;
|
|
||||||
zip: string;
|
|
||||||
tel_home?: string;
|
tel_home?: string;
|
||||||
tel_office?: string;
|
tel_office?: string;
|
||||||
tel_office_ext?: string;
|
tel_office_ext?: string;
|
||||||
cell?: string;
|
cell?: string;
|
||||||
fax?: string;
|
fax?: string;
|
||||||
land_owner: string;
|
land_owner: boolean;
|
||||||
commercial: string;
|
commercial: boolean;
|
||||||
vip: string;
|
vip: boolean;
|
||||||
notes_client?: string;
|
notes_client?: string[];
|
||||||
terminate_reason?: string;
|
terminate_reason?: string;
|
||||||
terminate_cie?: string;
|
terminate_cie?: string;
|
||||||
terminate_note?: string;
|
terminate_note?: string;
|
||||||
|
|
@ -35,47 +30,39 @@ export class AccountDto {
|
||||||
mauvais_payeur: boolean;
|
mauvais_payeur: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export class AccountMemo {
|
export class AccountMemo {
|
||||||
last_updated: number;
|
last_updated: number;
|
||||||
memo?: string;
|
staff_id: number;
|
||||||
|
memo?: string[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export class AccountSuspension {
|
//represents the account_group table
|
||||||
account_id: number;
|
class GroupName {
|
||||||
date_start: number;
|
Admin: number = 1;
|
||||||
date_end: number;
|
Comptabilite: number = 2;
|
||||||
note: string;
|
Facturation: number = 3;
|
||||||
|
Staff: number = 4;
|
||||||
|
Client: number = 5;
|
||||||
|
Prospect: number = 6;
|
||||||
|
Fournisseur: number = 7;
|
||||||
|
Relais: number = 8;
|
||||||
|
Cabinet: number = 9;
|
||||||
|
ÉquipementMotorisé: number = 10;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Title = [
|
//represents the country table
|
||||||
"Mme",
|
class Country {
|
||||||
"Mrs",
|
canada: number = 120;
|
||||||
"Mr.",
|
madagascar: number = 450;
|
||||||
"M.",
|
virginIsland: number = 840;
|
||||||
"",
|
};
|
||||||
];
|
|
||||||
|
|
||||||
// export type Groupe_id = [
|
|
||||||
// 1 = "Admin",
|
|
||||||
// 2 = "Comptabilite",
|
|
||||||
// 3 = "Facturation",
|
|
||||||
// 4 = "Staff",
|
|
||||||
// 5 = "Client",
|
|
||||||
// 6 = "Prospect",
|
|
||||||
// 7 = "Fournisseur",
|
|
||||||
// 8 = "Relais",
|
|
||||||
// 9 = "Cabinet",
|
|
||||||
// 10 = "Équipement motorisé",
|
|
||||||
// ];
|
|
||||||
|
|
||||||
|
|
||||||
|
// enum placeholder to avoid direct entries to the DB
|
||||||
// export type AccountStatus = [
|
class Title {
|
||||||
// 1 = "Actif",
|
m: string = 'M';
|
||||||
// 2 = "suspension",
|
mDot: string = 'M.';
|
||||||
// 3 = "non paiement",
|
mr: string = 'Mr';
|
||||||
// 4 = "terminé",
|
mrs: string = 'Mrs';
|
||||||
// 5 = "recouvr",
|
mme: string = 'Mme';
|
||||||
// 6 = "creance"
|
};
|
||||||
// ];
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user