diff --git a/eslint.config.mjs b/eslint.config.mjs index caebf6e..e1d8c31 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,6 +1,6 @@ // @ts-check import eslint from '@eslint/js'; -import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; +// import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; import globals from 'globals'; import tseslint from 'typescript-eslint'; @@ -10,7 +10,7 @@ export default tseslint.config( }, eslint.configs.recommended, ...tseslint.configs.recommendedTypeChecked, - eslintPluginPrettierRecommended, + // eslintPluginPrettierRecommended, { languageOptions: { globals: { @@ -26,6 +26,7 @@ export default tseslint.config( }, { rules: { + "no-unused-vars": "off", '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-floating-promises': 'warn', '@typescript-eslint/no-unsafe-argument': 'warn' diff --git a/prisma/mariadb/generated/prisma/client/mariadb/browser.ts b/prisma/mariadb/generated/prisma/client/mariadb/browser.ts index a651224..8281d1a 100644 --- a/prisma/mariadb/generated/prisma/client/mariadb/browser.ts +++ b/prisma/mariadb/generated/prisma/client/mariadb/browser.ts @@ -69,7 +69,7 @@ export type compta_journal_ecriture_detail_bk = Prisma.compta_journal_ecriture_d export type compta_periode = Prisma.compta_periodeModel /** * Model compta_ppa_file_id - * This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments + * */ export type compta_ppa_file_id = Prisma.compta_ppa_file_idModel /** diff --git a/prisma/mariadb/generated/prisma/client/mariadb/client.ts b/prisma/mariadb/generated/prisma/client/mariadb/client.ts index 659c8f1..eb69005 100644 --- a/prisma/mariadb/generated/prisma/client/mariadb/client.ts +++ b/prisma/mariadb/generated/prisma/client/mariadb/client.ts @@ -89,7 +89,7 @@ export type compta_journal_ecriture_detail_bk = Prisma.compta_journal_ecriture_d export type compta_periode = Prisma.compta_periodeModel /** * Model compta_ppa_file_id - * This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments + * */ export type compta_ppa_file_id = Prisma.compta_ppa_file_idModel /** diff --git a/prisma/mariadb/generated/prisma/client/mariadb/commonInputTypes.ts b/prisma/mariadb/generated/prisma/client/mariadb/commonInputTypes.ts index f8fb070..edea3a7 100644 --- a/prisma/mariadb/generated/prisma/client/mariadb/commonInputTypes.ts +++ b/prisma/mariadb/generated/prisma/client/mariadb/commonInputTypes.ts @@ -14,15 +14,15 @@ import * as $Enums from "./enums" import type * as Prisma from "./internal/prismaNamespace" -export type BigIntFilter<$PrismaModel = never> = { - equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - in?: bigint[] | number[] - notIn?: bigint[] | number[] - lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - not?: Prisma.NestedBigIntFilter<$PrismaModel> | bigint | number +export type IntFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntFilter<$PrismaModel> | number } export type StringNullableFilter<$PrismaModel = never> = { @@ -66,17 +66,6 @@ export type StringFilter<$PrismaModel = never> = { not?: Prisma.NestedStringFilter<$PrismaModel> | string } -export type IntFilter<$PrismaModel = never> = { - equals?: number | Prisma.IntFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] - lt?: number | Prisma.IntFieldRefInput<$PrismaModel> - lte?: number | Prisma.IntFieldRefInput<$PrismaModel> - gt?: number | Prisma.IntFieldRefInput<$PrismaModel> - gte?: number | Prisma.IntFieldRefInput<$PrismaModel> - not?: Prisma.NestedIntFilter<$PrismaModel> | number -} - export type IntNullableFilter<$PrismaModel = never> = { equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null in?: number[] | null @@ -120,20 +109,20 @@ export type SortOrderInput = { nulls?: Prisma.NullsOrder } -export type BigIntWithAggregatesFilter<$PrismaModel = never> = { - equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - in?: bigint[] | number[] - notIn?: bigint[] | number[] - lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - not?: Prisma.NestedBigIntWithAggregatesFilter<$PrismaModel> | bigint | number +export type IntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number _count?: Prisma.NestedIntFilter<$PrismaModel> _avg?: Prisma.NestedFloatFilter<$PrismaModel> - _sum?: Prisma.NestedBigIntFilter<$PrismaModel> - _min?: Prisma.NestedBigIntFilter<$PrismaModel> - _max?: Prisma.NestedBigIntFilter<$PrismaModel> + _sum?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedIntFilter<$PrismaModel> + _max?: Prisma.NestedIntFilter<$PrismaModel> } export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { @@ -188,22 +177,6 @@ export type StringWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedStringFilter<$PrismaModel> } -export type IntWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | Prisma.IntFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] - lt?: number | Prisma.IntFieldRefInput<$PrismaModel> - lte?: number | Prisma.IntFieldRefInput<$PrismaModel> - gt?: number | Prisma.IntFieldRefInput<$PrismaModel> - gte?: number | Prisma.IntFieldRefInput<$PrismaModel> - not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number - _count?: Prisma.NestedIntFilter<$PrismaModel> - _avg?: Prisma.NestedFloatFilter<$PrismaModel> - _sum?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedIntFilter<$PrismaModel> - _max?: Prisma.NestedIntFilter<$PrismaModel> -} - export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null in?: number[] | null @@ -260,6 +233,33 @@ export type FloatWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedFloatFilter<$PrismaModel> } +export type BigIntFilter<$PrismaModel = never> = { + equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + in?: bigint[] | number[] + notIn?: bigint[] | number[] + lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + not?: Prisma.NestedBigIntFilter<$PrismaModel> | bigint | number +} + +export type BigIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + in?: bigint[] | number[] + notIn?: bigint[] | number[] + lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + not?: Prisma.NestedBigIntWithAggregatesFilter<$PrismaModel> | bigint | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedBigIntFilter<$PrismaModel> + _min?: Prisma.NestedBigIntFilter<$PrismaModel> + _max?: Prisma.NestedBigIntFilter<$PrismaModel> +} + export type FloatNullableFilter<$PrismaModel = never> = { equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> | null in?: number[] | null @@ -369,15 +369,15 @@ export type DecimalNullableWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedDecimalNullableFilter<$PrismaModel> } -export type NestedBigIntFilter<$PrismaModel = never> = { - equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - in?: bigint[] | number[] - notIn?: bigint[] | number[] - lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - not?: Prisma.NestedBigIntFilter<$PrismaModel> | bigint | number +export type NestedIntFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntFilter<$PrismaModel> | number } export type NestedStringNullableFilter<$PrismaModel = never> = { @@ -421,17 +421,6 @@ export type NestedStringFilter<$PrismaModel = never> = { not?: Prisma.NestedStringFilter<$PrismaModel> | string } -export type NestedIntFilter<$PrismaModel = never> = { - equals?: number | Prisma.IntFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] - lt?: number | Prisma.IntFieldRefInput<$PrismaModel> - lte?: number | Prisma.IntFieldRefInput<$PrismaModel> - gt?: number | Prisma.IntFieldRefInput<$PrismaModel> - gte?: number | Prisma.IntFieldRefInput<$PrismaModel> - not?: Prisma.NestedIntFilter<$PrismaModel> | number -} - export type NestedIntNullableFilter<$PrismaModel = never> = { equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null in?: number[] | null @@ -470,20 +459,20 @@ export type NestedFloatFilter<$PrismaModel = never> = { not?: Prisma.NestedFloatFilter<$PrismaModel> | number } -export type NestedBigIntWithAggregatesFilter<$PrismaModel = never> = { - equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - in?: bigint[] | number[] - notIn?: bigint[] | number[] - lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> - not?: Prisma.NestedBigIntWithAggregatesFilter<$PrismaModel> | bigint | number +export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number _count?: Prisma.NestedIntFilter<$PrismaModel> _avg?: Prisma.NestedFloatFilter<$PrismaModel> - _sum?: Prisma.NestedBigIntFilter<$PrismaModel> - _min?: Prisma.NestedBigIntFilter<$PrismaModel> - _max?: Prisma.NestedBigIntFilter<$PrismaModel> + _sum?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedIntFilter<$PrismaModel> + _max?: Prisma.NestedIntFilter<$PrismaModel> } export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { @@ -549,22 +538,6 @@ export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedStringFilter<$PrismaModel> } -export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | Prisma.IntFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] - lt?: number | Prisma.IntFieldRefInput<$PrismaModel> - lte?: number | Prisma.IntFieldRefInput<$PrismaModel> - gt?: number | Prisma.IntFieldRefInput<$PrismaModel> - gte?: number | Prisma.IntFieldRefInput<$PrismaModel> - not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number - _count?: Prisma.NestedIntFilter<$PrismaModel> - _avg?: Prisma.NestedFloatFilter<$PrismaModel> - _sum?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedIntFilter<$PrismaModel> - _max?: Prisma.NestedIntFilter<$PrismaModel> -} - export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null in?: number[] | null @@ -621,6 +594,33 @@ export type NestedFloatWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedFloatFilter<$PrismaModel> } +export type NestedBigIntFilter<$PrismaModel = never> = { + equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + in?: bigint[] | number[] + notIn?: bigint[] | number[] + lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + not?: Prisma.NestedBigIntFilter<$PrismaModel> | bigint | number +} + +export type NestedBigIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + in?: bigint[] | number[] + notIn?: bigint[] | number[] + lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + not?: Prisma.NestedBigIntWithAggregatesFilter<$PrismaModel> | bigint | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedBigIntFilter<$PrismaModel> + _min?: Prisma.NestedBigIntFilter<$PrismaModel> + _max?: Prisma.NestedBigIntFilter<$PrismaModel> +} + export type NestedFloatNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> | null in?: number[] | null diff --git a/prisma/mariadb/generated/prisma/client/mariadb/internal/class.ts b/prisma/mariadb/generated/prisma/client/mariadb/internal/class.ts index 72d0660..5a7f4ab 100644 --- a/prisma/mariadb/generated/prisma/client/mariadb/internal/class.ts +++ b/prisma/mariadb/generated/prisma/client/mariadb/internal/class.ts @@ -20,7 +20,7 @@ const config: runtime.GetPrismaClientConfig = { "clientVersion": "7.3.0", "engineVersion": "9d6ad21cbbceab97458517b147a6a09ff43aa735", "activeProvider": "mysql", - "inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"generated/prisma/client/mariadb\"\n}\n\ndatasource db {\n provider = \"mysql\"\n}\n\nmodel account {\n id BigInt @id @default(autoincrement())\n customer_id String? @db.VarChar(32) //variable string, composition varies a lot, used by customers to identify their account\n date_orig BigInt? //timestamp\n date_last BigInt? //timestamp\n date_expire BigInt? //not used\n language_id String @default(dbgenerated(\"(francais)\")) @db.VarChar(32) //either \"anglais\", \"francais\"\n country_id Int @default(124) //124 (canada), 450 (Madagascar) or 840 (Virgin island)\n currency_id Int? //not used\n username String? @db.VarChar(128)\n password String? @db.VarChar(128)\n group_id Int @default(6) @db.TinyInt //refers to the account_group table\n misc String? @db.VarChar(128) //comments of some sort\n status Int? //1-actif, 2-suspension,3- non paiement, 4- terminé, 5- recouvre, 6-creance\n first_name String? @db.VarChar(128)\n middle_name String? @db.VarChar(128) //not used\n last_name String? @db.VarChar(128)\n mandataire String? @db.VarChar(128) //sometimes the first_name and last_name are found here, sometimes its the name of someone who manage the account\n title String? @db.VarChar(128) //Mme, Mrs, Mr., M., \"\"\n email String? @db.VarChar(255)\n email_autre String? @db.VarChar(255) //second email\n company String? @db.VarChar(255) //name of the company account\n contact String @db.Text //name of the contact at the company or account contact\n address1 String? @db.VarChar(128)\n address2 String? @db.VarChar(128) //sometimes used to specify the unit, the suit, the camping lot or used as a note???\n city String? @db.VarChar(128)\n state String? @db.VarChar(32)\n zip String? @db.VarChar(16)\n tel_home String? @db.VarChar(16)\n tel_office String? @db.VarChar(16)\n tel_office_ext String? @db.VarChar(4)\n cell String? @db.VarChar(16)\n fax String? @db.VarChar(16)\n invoice_delivery Int @default(2) //1-email, 2-poste, 3-default\n land_owner Boolean @default(false) //tinyInt boolean\n frais Boolean @default(false) //tinyInt boolean\n ppa Boolean @default(false)\n ppa_all_invoice Int @default(0) @db.TinyInt\n ppa_name String? @db.VarChar(64)\n ppa_code String? @db.VarChar(255)\n ppa_branch String? @db.VarChar(255)\n ppa_account String? @db.VarChar(255)\n ppa_amount Decimal @default(0.00) @db.Decimal(6, 2)\n ppa_amount_buffer Float @default(30.00)\n ppa_all_tmp Int @default(0) @db.TinyInt\n ppa_fixed Boolean @default(false)\n commercial Boolean @default(false)\n vip Boolean @default(false)\n tax_group Int @default(1) @db.TinyInt\n data_check Boolean @default(false)\n created_by Int?\n notes_client String? @db.VarChar(256) //comments left by customer via the \"portail\"\n keyword String? @db.VarChar(512)\n terminate_reason String? @db.VarChar(32) //install,demenage, cie, autre, NULL\n terminate_cie String? @db.VarChar(32) // null, bell, autre, videotron, cogeco, deery, explirnet, sftl, haut-richelieu\n terminate_note String? @db.MediumText // comment on the termination of the account\n terminate_date String? @db.VarChar(16)\n call Boolean @default(false) //tinyInt boolean\n pub Boolean @default(true) //TinyInt boolean\n portal_client_log Boolean @default(false) //TinyInt boolean\n mauvais_payeur Boolean @default(false) //TinyInt boolean\n renew_phone Boolean @default(false) //TinyInt boolean\n ppa_cc Int @default(0) @db.TinyInt\n stripe_id String? @db.VarChar(32)\n\n @@index([customer_id], map: \"customer_id\")\n @@index([id, status], map: \"id\")\n @@index([status], map: \"status\")\n}\n\nmodel account_group {\n id Int @id @default(autoincrement()) @db.TinyInt //see group_id in account table for references\n date_orig BigInt?\n group_name String? @db.VarChar(64) //group name\n}\n\n// this table could be ignored ? see comment on memo column\nmodel account_memo {\n id BigInt @id @default(autoincrement())\n date_orig BigInt?\n last_updated BigInt @default(0) @db.UnsignedBigInt\n staff_id BigInt?\n account_id BigInt?\n 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\n color String @default(dbgenerated(\"(000000)\")) @db.VarChar(6) //CSS\n bcolor String @default(dbgenerated(\"(E0E0E0)\")) @db.VarChar(6) //CSS\n border String @default(dbgenerated(\"(000000)\")) @db.VarChar(6) //CSS\n\n @@index([account_id], map: \"account_id\")\n @@index([staff_id], map: \"staff_id\")\n}\n\nmodel compta_comptes {\n id BigInt @id @default(autoincrement())\n category String? @db.VarChar(64)\n num_compte String? @db.VarChar(16)\n desc String? @db.MediumText\n}\n\nmodel compta_comptes_soldes {\n id BigInt @id @default(autoincrement())\n num_compte Int\n year Int\n amount Float @db.Float\n comment String @db.VarChar(64)\n type String @db.VarChar(3)\n}\n\nmodel compta_journal_ecriture {\n id BigInt @id @default(autoincrement())\n date_orig BigInt?\n type String? @db.VarChar(4)\n num BigInt?\n customer_id String? @db.VarChar(32)\n full_name String? @db.VarChar(256)\n desc String? @db.MediumText\n mo String? @db.VarChar(4)\n em Int @default(0) @db.TinyInt\n\n @@index([customer_id], map: \"customer_id\")\n @@index([date_orig], map: \"date_orig\")\n @@index([num], map: \"num\")\n}\n\nmodel compta_journal_ecriture_bk {\n id BigInt @id @default(autoincrement())\n date_orig BigInt?\n type String? @db.VarChar(4)\n num BigInt?\n customer_id String? @db.VarChar(32)\n full_name String? @db.VarChar(256)\n desc String? @db.MediumText\n mo String? @db.VarChar(4)\n em Int @default(0) @db.TinyInt\n\n @@index([customer_id], map: \"customer_id\")\n @@index([date_orig], map: \"date_orig\")\n @@index([num], map: \"num\")\n}\n\nmodel compta_journal_ecriture_detail {\n id BigInt @id @default(autoincrement())\n journal_id BigInt?\n num_compte BigInt?\n amount Float?\n action String? @db.VarChar(16)\n\n @@index([journal_id], map: \"journal_id\")\n}\n\nmodel compta_journal_ecriture_detail_bk {\n id BigInt @id @default(autoincrement())\n journal_id BigInt?\n num_compte BigInt?\n amount Float?\n action String? @db.VarChar(16)\n\n @@index([journal_id], map: \"journal_id\")\n}\n\nmodel compta_periode {\n month Int @id @default(7)\n}\n\n/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments\nmodel compta_ppa_file_id {\n last_id Int @id @default(1)\n}\n\nmodel compta_setup {\n setup_id Int @id @default(1)\n period_month Int @default(7)\n ppa_id Int @default(1)\n excedent_max Float @default(0)\n month_closed BigInt?\n pay_week_closed Int @db.UnsignedTinyInt\n attachment_ext String @db.MediumText\n netadmin_dispo Int @default(0) @db.UnsignedInt\n imap_token String? @db.Text\n}\n\nmodel credit_code {\n id Int @id @default(autoincrement())\n code String @db.VarChar(16)\n desc String @db.VarChar(256)\n}\n\nmodel tax {\n id Int @id @default(autoincrement())\n name String? @db.VarChar(128)\n description String? @db.VarChar(255)\n rate Float?\n}\n\nmodel tax_group {\n id Int @id @default(autoincrement())\n name String? @db.VarChar(128)\n description String? @db.VarChar(255)\n tax String? @db.VarChar(128)\n}\n\nmodel td_payable {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n ticket_id Int @default(0) @db.UnsignedInt\n invoice String @default(dbgenerated(\"()\")) @db.VarChar(32)\n date_invoice String @db.VarChar(20)\n fournisseur String? @default(dbgenerated(\"()\")) @db.VarChar(128)\n montant Decimal @default(0.00) @db.Decimal(15, 2)\n devise String @default(dbgenerated(\"(ca)\")) @db.VarChar(2)\n methode String? @default(dbgenerated(\"()\")) @db.VarChar(64)\n reference String? @default(dbgenerated(\"()\")) @db.VarChar(128)\n date_paiement String? @default(dbgenerated(\"()\")) @db.VarChar(20)\n releve String? @db.VarChar(128)\n\n @@index([ticket_id], map: \"ticket_id\")\n}\n\nmodel conso {\n id BigInt @id @default(autoincrement())\n ip_id String? @db.VarChar(16)\n date BigInt?\n total BigInt? @default(0)\n total_day BigInt? @default(0)\n total_night BigInt? @default(0)\n\n @@index([ip_id], map: \"ip_id\")\n}\n\nmodel conso_archive {\n id BigInt @id @default(autoincrement())\n ip_id String? @db.VarChar(16)\n date BigInt?\n total BigInt? @default(0)\n total_day BigInt? @default(0)\n total_night BigInt? @default(0)\n\n @@index([ip_id], map: \"ip_id\")\n}\n\nmodel conso_avis {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date BigInt\n account_id Int @db.UnsignedInt\n delivery_id Int @default(0) @db.UnsignedInt\n service_id Int @default(0) @db.UnsignedInt\n ip_id Int\n avis String @db.VarChar(32)\n}\n\nmodel conso_radius {\n id BigInt @id @default(autoincrement()) @db.UnsignedBigInt\n username String @db.VarChar(32)\n date String @db.VarChar(32)\n download String @db.Text\n upload String @db.Text\n nb_sess Int @default(0) @db.UnsignedInt\n\n @@index([date], map: \"date\")\n @@index([username], map: \"username\")\n}\n\nmodel conso_radius_daily {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n username String @db.VarChar(32)\n date String @db.VarChar(32)\n download_nuit String @db.Text\n upload_nuit String @db.Text\n download_jour String @db.Text\n upload_jour String @db.Text\n\n @@index([date], map: \"date\")\n @@index([username], map: \"username\")\n}\n\nmodel conso_radius_daily2 {\n id BigInt @id @default(autoincrement()) @db.UnsignedBigInt\n username String @db.VarChar(32)\n date String @db.VarChar(32)\n download_nuit String @default(dbgenerated(\"(0)\")) @db.VarChar(64)\n upload_nuit String @default(dbgenerated(\"(0)\")) @db.VarChar(64)\n download_jour String @default(dbgenerated(\"(0)\")) @db.VarChar(64)\n upload_jour String @default(dbgenerated(\"(0)\")) @db.VarChar(64)\n\n @@index([date], map: \"date\")\n @@index([username], map: \"username\")\n}\n\nmodel conso_radius_hourly {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n username String @db.VarChar(32)\n date String @db.VarChar(32)\n download String @db.Text\n upload String @db.Text\n\n @@index([date], map: \"date\")\n @@index([username], map: \"username\")\n}\n\nmodel conso_radius_monthly {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date String @db.VarChar(32)\n username String @db.VarChar(32)\n nuit String @db.Text\n jour String @db.Text\n\n @@index([date], map: \"date\")\n @@index([username], map: \"username\")\n}\n\nmodel conso_radius_monthly2 {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date String @db.VarChar(32)\n username String @db.VarChar(32)\n nuit String @default(dbgenerated(\"(0)\")) @db.VarChar(64)\n jour String @default(dbgenerated(\"(0)\")) @db.VarChar(64)\n\n @@index([date], map: \"date\")\n @@index([username], map: \"username\")\n}\n\nmodel delivery {\n id BigInt @id @default(autoincrement())\n account_id BigInt?\n name String @db.VarChar(32)\n comment String @db.VarChar(512)\n date_orig BigInt?\n address1 String? @db.VarChar(128)\n address2 String? @db.VarChar(128)\n city String? @db.VarChar(32)\n state String? @db.VarChar(32)\n zip String? @db.VarChar(16)\n longitude Decimal @db.Decimal(12, 7)\n latitude Decimal @db.Decimal(12, 7)\n tel_home String? @db.VarChar(16)\n tel_office String? @db.VarChar(16)\n tel_office_ext String? @db.VarChar(4)\n cell String? @db.VarChar(12)\n fax String? @db.VarChar(12)\n email String? @db.VarChar(255)\n quota_max_day BigInt @default(0) @db.UnsignedBigInt\n quota_max_night BigInt @default(0) @db.UnsignedBigInt\n contact String? @db.VarChar(128)\n expanded Int? @default(0) @db.TinyInt\n placemarks_id BigInt? @db.UnsignedBigInt\n epg_subid Int @default(0) @db.UnsignedInt\n\n @@index([account_id], map: \"account_id\")\n @@index([placemarks_id], map: \"placemarks_id\")\n}\n\nmodel delivery_history {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n date_orig BigInt @db.UnsignedBigInt\n address1 String @db.VarChar(128)\n address2 String @db.VarChar(128)\n city String @db.VarChar(128)\n state String @db.VarChar(32)\n zip String @db.VarChar(8)\n\n @@index([account_id], map: \"account_id\")\n}\n\nmodel device {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n delivery_id Int @db.UnsignedInt\n category String @db.VarChar(64)\n name String @db.VarChar(128)\n manufacturier String? @db.VarChar(128)\n model String? @db.VarChar(128)\n sn String? @db.VarChar(128)\n mac String? @db.VarChar(32)\n manage String @db.VarChar(256)\n port String @default(dbgenerated(\"()\")) @db.VarChar(5)\n protocol String @default(dbgenerated(\"(https)\")) @db.VarChar(8)\n manage_cli String @db.VarChar(256)\n port_cli String @default(dbgenerated(\"()\")) @db.VarChar(5)\n protocol_cli String @db.VarChar(8)\n user String @db.VarChar(64)\n pass String @db.VarChar(128)\n parent Int @default(0) @db.UnsignedInt\n\n @@index([delivery_id], map: \"delivery_id\")\n @@index([sn], map: \"sn\")\n}\n\nmodel device_archive {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n delivery_id Int @db.UnsignedInt\n category String @db.VarChar(64)\n name String @db.VarChar(128)\n manufacturier String? @db.VarChar(128)\n model String? @db.VarChar(128)\n sn String? @db.VarChar(128)\n mac String? @db.VarChar(32)\n manage String @db.VarChar(256)\n port String @default(dbgenerated(\"()\")) @db.VarChar(5)\n protocol String @default(dbgenerated(\"(https)\")) @db.VarChar(8)\n manage_cli String @db.VarChar(256)\n port_cli String @default(dbgenerated(\"()\")) @db.VarChar(5)\n protocol_cli String @db.VarChar(8)\n user String @db.VarChar(64)\n pass String @db.VarChar(128)\n parent Int @default(0) @db.UnsignedInt\n\n @@index([delivery_id], map: \"delivery_id\")\n @@index([sn], map: \"sn\")\n}\n\nmodel device_attr {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n device_id Int @db.UnsignedInt\n attr String @db.VarChar(128)\n value String @db.VarChar(128)\n\n @@index([device_id], map: \"device_id\")\n}\n\nmodel device_link {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n parent Int @db.UnsignedInt\n child Int @db.UnsignedInt\n}\n\nmodel device_template {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n nom String @db.VarChar(128)\n}\n\nmodel device_template_attr {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n template_id Int @db.UnsignedInt\n attr String @db.VarChar(128)\n default_val String @db.VarChar(128)\n}\n\nmodel product {\n id Int @id @default(autoincrement())\n date_orig BigInt?\n sku String? @db.VarChar(32)\n active Int? @db.TinyInt\n price Float?\n price_recurr_type Int? @db.TinyInt\n price_recurr_weekday Int?\n price_recurr_week Int?\n price_recurr_schedule Int? @db.TinyInt\n download_speed BigInt?\n upload_speed BigInt?\n night_package Int @default(0) @db.TinyInt\n quota_day BigInt? @db.UnsignedBigInt\n quota_night BigInt? @db.UnsignedBigInt\n category Int? @db.TinyInt\n uniq_charge Int @default(0) @db.TinyInt\n commercial Boolean @default(false)\n portal_hidden Boolean @default(false)\n inv_keep Boolean @default(false)\n inv_tag String? @db.VarChar(255)\n inv_threshold Int @default(0) @db.UnsignedInt\n inv_qte Int @default(0) @db.UnsignedInt\n emplacement String @default(dbgenerated(\"()\")) @db.VarChar(16)\n list_tech Int @default(0) @db.UnsignedTinyInt\n type Int @default(0) @db.UnsignedTinyInt\n combo_ready Int @default(0) @db.UnsignedTinyInt\n fibre_lineprofile String? @db.VarChar(8)\n fibre_serviceprofile String? @db.VarChar(8)\n\n @@index([sku], map: \"sku\")\n}\n\nmodel product_cat {\n id Int @id @default(autoincrement())\n name String? @db.VarChar(255)\n notes String? @db.VarChar(255)\n status Int? @db.TinyInt\n num_compte BigInt?\n combo_dispo Int @default(0) @db.UnsignedTinyInt\n}\n\nmodel product_format {\n id BigInt @id @default(autoincrement())\n date_orig BigInt?\n name String? @db.VarChar(255)\n type Int? @db.TinyInt\n product_idx String? @db.MediumText\n description String? @db.MediumText\n}\n\nmodel product_fournisseur {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n product_id Int @db.UnsignedInt\n nom_fournisseur String @db.VarChar(255)\n prix_us Boolean @default(false)\n prix_achat Float @default(0.00)\n prix_livr String @default(dbgenerated(\"()\")) @db.VarChar(16)\n delais_livr String @default(dbgenerated(\"()\")) @db.VarChar(128)\n comment String @default(dbgenerated(\"()\")) @db.VarChar(128)\n\n @@index([product_id], map: \"product_id\")\n}\n\nmodel product_profile {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n product_id Int @db.UnsignedInt\n device_type String @db.VarChar(64)\n line_profile Int @db.UnsignedInt\n service_profile Int @db.UnsignedInt\n}\n\nmodel product_speciaux {\n id BigInt @id @default(autoincrement())\n product_zone_id BigInt\n product_id BigInt\n price Float?\n price_install Float?\n exp_timestamp BigInt?\n duree_contrat Int? @db.UnsignedTinyInt\n\n @@index([product_zone_id], map: \"product_zone_id\")\n}\n\nmodel product_translate {\n id Int @id @default(autoincrement())\n product_id Int?\n language_id String? @db.VarChar(16)\n name String? @db.VarChar(512)\n description_short String? @db.LongText\n description_full String? @db.LongText\n\n @@index([language_id], map: \"language_id\")\n @@index([product_id], map: \"product_id\")\n}\n\nmodel product_zone {\n id BigInt @id @default(autoincrement())\n zoneNumber Int @db.UnsignedInt\n description String? @db.VarChar(255)\n\n @@index([zoneNumber], map: \"zoneNumber\")\n}\n\nmodel product_zone_placemarks {\n id BigInt @id @default(autoincrement())\n product_zone_id BigInt @db.UnsignedBigInt\n placemarks_id BigInt @db.UnsignedBigInt\n\n @@index([placemarks_id], map: \"placemarks_id\")\n}\n\nmodel inventaire_log {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n prod_tag String @db.VarChar(255)\n staff_id Int @db.UnsignedInt\n action String @db.VarChar(1)\n qte Int @db.UnsignedInt\n timestamp String @db.VarChar(10)\n\n @@index([prod_tag], map: \"prod_tag\")\n}\n\nmodel phone {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n service_id Int @db.UnsignedInt\n phone_num String @db.VarChar(16)\n note String? @db.Text\n fournisseur String? @db.VarChar(64)\n}\n\nmodel phone_addr {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n phone String @db.VarChar(16)\n street_number String @db.VarChar(10)\n apt String @db.VarChar(30)\n street_name String @db.VarChar(84)\n city String @db.VarChar(38)\n state String @db.VarChar(2)\n zip String @db.VarChar(10)\n first_name String @db.VarChar(38)\n last_name String @db.VarChar(100)\n info String @db.VarChar(100)\n enhanced_capable phone_addr_enhanced_capable @default(dbgenerated(\"(Y)\"))\n code_cauca String? @db.VarChar(3)\n class_service String @default(dbgenerated(\"(RES)\")) @db.VarChar(3)\n}\n\nmodel phone_comwave {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id BigInt?\n service_id BigInt?\n requestId Int @unique(map: \"requestId\") @db.UnsignedInt\n phoneNumber String @db.VarChar(10)\n status String @default(dbgenerated(\"(P)\")) @db.VarChar(1)\n date String? @db.VarChar(10)\n reason String? @db.Text\n}\n\nmodel phone_note {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n phone String @unique(map: \"phone\") @db.VarChar(11)\n rate_center String? @db.VarChar(128)\n fournisseur String @default(dbgenerated(\"(comwave)\")) @db.VarChar(64)\n note String? @db.Text\n}\n\nmodel phone_provisioning {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n delivery_id Int @db.UnsignedInt\n service_id Int @db.UnsignedInt\n phone String @db.VarChar(10)\n app String @db.VarChar(16)\n mac String @db.VarChar(16)\n password String @db.VarChar(32)\n internationnal String? @db.VarChar(6)\n date_orig BigInt @db.UnsignedBigInt\n date_update BigInt @db.UnsignedBigInt\n}\n\nmodel phonecall_channel {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n timestamp BigInt @unique(map: \"timestamp\") @db.UnsignedBigInt\n max_tinktell Int @default(0) @db.UnsignedTinyInt\n max_outgoing_thinktell Int @default(0) @db.UnsignedTinyInt\n max_comwave Int @default(0) @db.UnsignedTinyInt\n max_outgoing_comwave Int @default(0) @db.UnsignedTinyInt\n max_total Int @default(0) @db.UnsignedTinyInt\n}\n\nmodel phonecall_log_2025 {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n caller_id_name String @db.VarChar(64)\n caller_id_number String @db.VarChar(32)\n destination_number String @db.VarChar(32)\n start_stamp DateTime @db.DateTime(0)\n answer_stamp DateTime @db.DateTime(0)\n end_stamp DateTime @db.DateTime(0)\n duration Int\n billing Decimal @default(0.00000) @db.Decimal(15, 5)\n hangup_cause String @db.VarChar(32)\n uuid String @unique(map: \"uuid\") @db.VarChar(64)\n}\n\nmodel phonecall_log_2026 {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n caller_id_name String @db.VarChar(64)\n caller_id_number String @db.VarChar(32)\n destination_number String @db.VarChar(32)\n start_stamp DateTime @db.DateTime(0)\n answer_stamp DateTime @db.DateTime(0)\n end_stamp DateTime @db.DateTime(0)\n duration Int\n billing Decimal @default(0.00000) @db.Decimal(15, 5)\n hangup_cause String @db.VarChar(32)\n uuid String @unique(map: \"uuid\") @db.VarChar(64)\n}\n\nmodel voicemeup {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n date BigInt @db.UnsignedBigInt\n duration Int @db.UnsignedInt\n destination String @db.VarChar(16)\n country String @db.VarChar(256)\n state String? @db.VarChar(128)\n district String? @db.VarChar(128)\n amount Float\n uuid String? @db.VarChar(64)\n}\n\n/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.\nmodel babytel {\n date_time BigInt?\n record_type String? @db.VarChar(20)\n record_format_version Int?\n id String? @db.VarChar(24)\n rate_id String? @db.VarChar(20)\n cost Float? @db.Float\n calling_user String? @db.VarChar(24)\n called_user String? @db.VarChar(24)\n calling_domain String? @db.VarChar(24)\n called_domain String? @db.VarChar(24)\n destination String? @db.VarChar(24)\n duration_seconds String? @db.VarChar(24)\n call_start String? @db.VarChar(24)\n call_type String? @db.VarChar(24)\n call_direction String? @db.VarChar(24)\n test_call String? @db.VarChar(24)\n calling_number String? @db.VarChar(24)\n called_number_e164 String? @db.VarChar(24)\n billable_duration String? @db.VarChar(24)\n billed_duration_outbound_seconds String? @db.VarChar(24)\n reseller_cost Float? @db.Float\n master_account_id String? @db.VarChar(24)\n forwarded_to String? @db.VarChar(24)\n master_account_pk String? @db.VarChar(24)\n account_pk String? @db.VarChar(24)\n reseller_rate_id String? @db.VarChar(24)\n internal_information1 String? @db.VarChar(24)\n concurrents_calls String? @db.VarChar(24)\n external_id String? @db.VarChar(24)\n commission Float? @db.Float\n minute_plan_id String? @db.VarChar(24)\n internal_information2 String? @db.VarChar(24)\n internal_information3 String? @db.VarChar(24)\n billed_duration_inbound_seconds String? @db.VarChar(24)\n selected_destination String? @db.VarChar(24)\n internal_information4 String? @db.VarChar(24)\n internal_information5 String? @db.VarChar(24)\n cost_center String? @db.VarChar(24)\n subscriber_group String? @db.VarChar(24)\n\n @@ignore\n}\n\n/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments\nmodel pbx {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n delivery_id Int @db.UnsignedInt\n service_id Int @db.UnsignedInt\n phone String @db.VarChar(10)\n name String? @db.VarChar(32)\n password String @db.VarChar(8)\n vm_password String @default(dbgenerated(\"(1234)\")) @db.VarChar(16)\n has_vm Int @default(1) @db.TinyInt\n vm_email String? @db.VarChar(64)\n keep_msg Int @default(0) @db.TinyInt\n vm_disk_quota Int @default(180) @db.UnsignedInt\n int_code String @db.VarChar(4)\n language String @default(dbgenerated(\"(fr)\")) @db.VarChar(2)\n call_911 String @db.VarChar(11)\n max_calls Int @default(2) @db.UnsignedTinyInt\n call_timeout Int @default(30) @db.UnsignedSmallInt\n user_context String @default(dbgenerated(\"(sip.targo.ca)\")) @db.VarChar(32)\n country_whitelist String @db.Text\n date_origin BigInt @db.UnsignedBigInt\n date_update BigInt @db.UnsignedBigInt\n update_by Int? @db.UnsignedInt\n\n @@index([phone], map: \"phone\")\n}\n\nmodel pbx_app {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n pbx_id Int @db.UnsignedInt\n username String @db.VarChar(16)\n mac String @db.VarChar(16)\n app String @default(dbgenerated(\"(ht502)\")) @db.VarChar(16)\n note String @db.Text\n date_origin BigInt @db.UnsignedBigInt\n date_update BigInt @db.UnsignedBigInt\n update_by Int? @db.UnsignedInt\n\n @@index([pbx_id], map: \"pbx_id\")\n}\n\nmodel pbx_com {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n delivery_id Int @db.UnsignedInt\n service_id Int @db.UnsignedInt\n phone String @db.VarChar(10)\n name String @db.VarChar(32)\n failover String @db.VarChar(16)\n auth_method String @default(dbgenerated(\"(password)\")) @db.VarChar(8)\n password String @db.VarChar(8)\n ip String @db.VarChar(16)\n int_code String @db.VarChar(4)\n country_whitelist String @db.Text\n language String @db.VarChar(2)\n call_911 String @db.VarChar(16)\n max_calls Int @db.UnsignedTinyInt\n user_context String @db.VarChar(32)\n date_origin String @db.VarChar(16)\n date_update String @db.VarChar(16)\n update_by Int @db.UnsignedInt\n}\n\nmodel pbx_com_wl {\n id Int @id @default(autoincrement())\n phone String @unique(map: \"phone\") @db.VarChar(10)\n country_whitelist String @db.Text\n}\n\nmodel pbx_fax {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n number String @db.VarChar(10)\n email String @db.VarChar(128)\n description String? @db.VarChar(128)\n service_id Int @default(0) @db.UnsignedInt\n\n @@index([number], map: \"number\")\n}\n\nmodel payment {\n id BigInt @id @default(autoincrement())\n account_id BigInt?\n date_orig BigInt?\n amount Float?\n applied_amt Float?\n type String? @db.VarChar(25)\n memo String? @db.VarChar(512)\n reference String? @db.VarChar(128)\n excedent Int @default(0) @db.TinyInt\n correction Int @default(0) @db.TinyInt\n cr Int @default(0) @db.TinyInt\n uniqsess String? @db.VarChar(32)\n\n @@index([account_id], map: \"account_id\")\n @@index([date_orig], map: \"date_orig\")\n}\n\nmodel payment_item {\n id BigInt @id @default(autoincrement())\n payment_id BigInt?\n invoice_id BigInt?\n amount Float?\n date_orig BigInt?\n\n @@index([invoice_id], map: \"invoice_id\")\n @@index([payment_id], map: \"payment_id\")\n}\n\nmodel passwords_manager {\n id BigInt @id @default(autoincrement())\n title String @db.VarChar(64)\n login String @db.VarChar(255)\n pass String @db.Text\n url String? @db.VarChar(255)\n email String? @db.VarChar(128)\n phone String? @db.VarChar(32)\n category String? @db.VarChar(32)\n subcategory String? @db.VarChar(32)\n desc String? @db.MediumText\n notes String? @db.MediumText\n logs String? @db.MediumText\n date_orig BigInt\n date_last BigInt\n users_granted String? @db.MediumText\n group_granted String? @db.Text\n created_by BigInt\n keywords String? @db.MediumText\n}\n\nmodel passwords_manager_cat {\n id Int @id @default(autoincrement()) @db.TinyInt\n title String @db.VarChar(32)\n desc String? @db.VarChar(255)\n}\n\nmodel passwords_manager_group {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n name String @db.VarChar(32)\n users String? @db.Text\n}\n\nmodel notification {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n staff_id Int\n endpoint String @db.Text\n authToken String @db.Text\n publicKey String @db.Text\n contentEncoding String @default(dbgenerated(\"(aesgcm)\")) @db.VarChar(128)\n plateforme String? @db.VarChar(128)\n\n @@index([staff_id], map: \"staff_id\")\n}\n\nmodel notification_payload {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n notification_id Int @db.UnsignedInt\n payload String @db.Text\n timestamp DateTime @default(now()) @db.Timestamp(0)\n}\n\n/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.\nmodel country {\n id Int? @unique(map: \"IDS\")\n name_en String? @db.VarChar(128)\n name_fr String? @db.VarChar(128)\n description String? @db.VarChar(128)\n notes String? @db.VarChar(128)\n two_code String? @db.VarChar(16)\n three_code String? @db.VarChar(16)\n\n @@ignore\n}\n\nmodel municipalite {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n nom String @db.VarChar(64)\n code String @db.VarChar(4)\n administration String @db.VarChar(64)\n often_used Boolean @default(false)\n}\n\nmodel sommaire_porte {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n fibre_id Int @default(0) @db.UnsignedInt\n id_adresse String @db.VarChar(48)\n id_subvention String @db.VarChar(32)\n adresse_subvention String @db.VarChar(128)\n ville_subvention String @db.VarChar(128)\n latitude String @db.VarChar(32)\n longitude String @db.VarChar(32)\n contest_adresse Int @default(0) @db.UnsignedTinyInt\n new_adresse Int @default(0) @db.UnsignedTinyInt\n placemarks_id BigInt @db.UnsignedBigInt\n}\n\nmodel state {\n id Int @id @default(autoincrement()) @db.UnsignedTinyInt\n name_en String @db.VarChar(64)\n name_fr String @db.VarChar(64)\n abbrev String @db.VarChar(2)\n country String @db.VarChar(8)\n}\n\nmodel licence {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n nom String @db.VarChar(128)\n date String @db.VarChar(10)\n can_manage String @db.VarChar(64)\n comment String? @db.Text\n}\n\nmodel licence_key {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n licence_id Int @db.UnsignedInt\n licence_key String @db.Text\n date String @db.VarChar(10)\n date_expire String? @db.VarChar(10)\n comment String @db.Text\n\n @@index([licence_id], map: \"licence_id\")\n}\n\nmodel ip {\n id Int @id @default(autoincrement())\n service_id BigInt?\n ip String? @db.VarChar(32)\n prive String? @db.VarChar(32)\n ip_relais String? @db.VarChar(128)\n technology String? @db.VarChar(32)\n name_access_point String? @db.VarChar(64)\n mac String? @db.VarChar(32)\n web_link String? @db.VarChar(128)\n link_relais String? @db.VarChar(128)\n ip_conso Int @default(0) @db.TinyInt\n actif Int @default(1) @db.TinyInt\n comment String? @db.MediumText\n cidr String? @db.VarChar(32)\n last_updated DateTime @default(now()) @db.DateTime(0)\n\n @@index([ip], map: \"ip\")\n @@index([prive], map: \"prive\")\n @@index([service_id], map: \"service_id\")\n}\n\nmodel ip_admin {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n ip String @db.VarChar(20)\n comment String? @db.VarChar(128)\n}\n\nmodel ip_history {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n delivery_id Int @db.UnsignedInt\n service_id Int @db.UnsignedInt\n ip String @db.VarChar(32)\n date BigInt @db.UnsignedBigInt\n}\n\nmodel ip_pp {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n ip_prive String @db.VarChar(32)\n ip_public String @db.VarChar(32)\n date BigInt @db.UnsignedBigInt\n ip_id String @default(dbgenerated(\"(0)\")) @db.VarChar(64)\n}\n\nmodel ip_static {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n ip String @unique(map: \"ip\") @db.VarChar(32)\n static Boolean @default(false)\n reverse String? @db.VarChar(128)\n}\n\nmodel ip_targo {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n ip String @db.VarChar(15)\n cidr Int @db.UnsignedTinyInt\n comment String? @db.VarChar(128)\n}\n\n/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments\nmodel invoice {\n id BigInt @id @default(autoincrement())\n date_orig BigInt?\n process_status Int? @db.TinyInt\n billing_status Int? @db.TinyInt\n refund_status Int? @db.TinyInt\n print_status Int? @db.TinyInt\n account_id BigInt?\n total_amt Float?\n billed_amt Float?\n due_date BigInt?\n notes String? @db.MediumText\n template_message String? @db.MediumText\n email_status Int? @db.TinyInt\n working_order String? @db.VarChar(64)\n correction Int @default(0) @db.TinyInt\n ppa_charge Int @default(0) @db.TinyInt\n credit_code_id Int @default(0) @db.TinyInt\n\n @@index([account_id], map: \"account_id\")\n @@index([billing_status], map: \"billing_status\")\n @@index([date_orig], map: \"date_orig\")\n @@index([refund_status], map: \"refund_status\")\n}\n\n/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments\nmodel invoice_bk {\n id BigInt @id @default(autoincrement())\n date_orig BigInt?\n process_status Int? @db.TinyInt\n billing_status Int? @db.TinyInt\n refund_status Int? @db.TinyInt\n print_status Int? @db.TinyInt\n account_id BigInt?\n total_amt Float?\n billed_amt Float?\n due_date BigInt?\n notes String? @db.MediumText\n template_message String? @db.MediumText\n email_status Int? @db.TinyInt\n working_order String? @db.VarChar(64)\n correction Int @default(0) @db.TinyInt\n ppa_charge Int @default(0) @db.TinyInt\n credit_code_id Int @default(0) @db.TinyInt\n\n @@index([account_id], map: \"account_id\")\n @@index([billing_status], map: \"billing_status\")\n @@index([date_orig], map: \"date_orig\")\n @@index([refund_status], map: \"refund_status\")\n}\n\nmodel invoice_call {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date BigInt @db.UnsignedBigInt\n number String @db.VarChar(10)\n amount Float\n}\n\nmodel invoice_item {\n id BigInt @id @default(autoincrement())\n service_id BigInt?\n invoice_id BigInt?\n sku String? @db.VarChar(128)\n quantity Float @default(0)\n product_name String? @db.VarChar(512)\n unitary_price Float?\n nosub Boolean @default(false)\n delivery_name String? @db.VarChar(32)\n\n @@index([invoice_id], map: \"invoice_id\")\n}\n\nmodel invoice_item_bk {\n id BigInt @id @default(autoincrement())\n service_id BigInt?\n invoice_id BigInt?\n sku String? @db.VarChar(128)\n quantity Float @default(0)\n product_name String? @db.VarChar(512)\n unitary_price Float?\n nosub Boolean @default(false)\n delivery_name String? @db.VarChar(32)\n\n @@index([invoice_id], map: \"invoice_id\")\n}\n\nmodel invoice_msg_template {\n id BigInt @id @default(autoincrement())\n name String? @db.VarChar(32)\n message String? @db.MediumText\n}\n\nmodel invoice_tax {\n id BigInt @id @default(autoincrement())\n invoice_id BigInt?\n tax_name String? @db.VarChar(128)\n tax_description String? @db.VarChar(128)\n tax_rate Float?\n amount Float?\n\n @@index([invoice_id], map: \"invoice_id\")\n}\n\nmodel invoice_tax_bk {\n id BigInt @id @default(autoincrement())\n invoice_id BigInt?\n tax_name String? @db.VarChar(128)\n tax_description String? @db.VarChar(128)\n tax_rate Float?\n amount Float?\n\n @@index([invoice_id], map: \"invoice_id\")\n}\n\n/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments\nmodel accord_paiement {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n date_accord BigInt\n date_echeance BigInt\n date_coupure BigInt @db.UnsignedBigInt\n raison_changement String? @db.Text\n montant Decimal @db.Decimal(10, 2)\n method Int @default(0) @db.UnsignedTinyInt\n ferie Boolean @default(false)\n note String? @db.Text\n status Int @default(-1) @db.TinyInt\n staff_id Int @default(1) @db.UnsignedInt\n date_create String @db.VarChar(16)\n\n @@index([account_id], map: \"account_id\")\n}\n\nmodel autologin {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n token String @db.VarChar(32)\n date String @db.VarChar(16)\n staff Int @db.UnsignedInt\n}\n\nmodel statement {\n id BigInt @id @default(autoincrement())\n date BigInt?\n type String? @db.VarChar(2)\n number BigInt?\n reference String? @db.MediumText\n amt Float?\n paid_amt Float?\n}\n\nmodel intranet_doc {\n id BigInt @id @default(autoincrement())\n account_id BigInt\n date BigInt\n title String @db.VarChar(128)\n msg String @db.MediumText\n attachment String @db.VarChar(256)\n unread_csv String @db.MediumText\n path_id Int @db.UnsignedInt\n priority_order Int @default(1)\n update_timestamp DateTime @default(now()) @db.Timestamp(0)\n\n @@index([account_id], map: \"account_id\")\n @@index([path_id], map: \"path_id\")\n}\n\nmodel intranet_doc_paths {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n description String @db.VarChar(256)\n parent_id Int? @db.UnsignedInt\n priority_order Int @default(1)\n}\n\nmodel intranet_doc_reply {\n id BigInt @id @default(autoincrement())\n feed_id BigInt\n date BigInt\n account_id BigInt\n msg String @db.MediumText\n attachment BigInt @default(0)\n update_timestamp DateTime @default(now()) @db.Timestamp(0)\n}\n\nmodel intranet_feed {\n id BigInt @id @default(autoincrement())\n account_id BigInt\n date BigInt\n title String @db.VarChar(128)\n msg String @db.MediumText\n attachment String @db.VarChar(256)\n unread_csv String @db.MediumText\n}\n\nmodel intranet_feed_reply {\n id BigInt @id @default(autoincrement())\n feed_id BigInt\n date BigInt\n account_id BigInt\n msg String @db.MediumText\n attachment BigInt\n}\n\nmodel intranet_techniciens {\n id BigInt @id @default(autoincrement())\n account_id BigInt\n date BigInt\n title String @db.VarChar(128)\n msg String @db.MediumText\n attachment String @db.VarChar(256)\n unread_csv String @db.MediumText\n}\n\nmodel intranet_techniciens_reply {\n id BigInt @id @default(autoincrement())\n feed_id BigInt\n date BigInt\n account_id BigInt\n msg String @db.MediumText\n attachment BigInt\n}\n\nmodel intranet_techno {\n id BigInt @id @default(autoincrement())\n account_id BigInt\n date BigInt\n title String @db.VarChar(128)\n msg String @db.MediumText\n attachment String @db.VarChar(256)\n unread_csv String @db.MediumText\n}\n\nmodel intranet_techno_reply {\n id BigInt @id @default(autoincrement())\n feed_id BigInt\n date BigInt\n account_id BigInt\n msg String @db.MediumText\n attachment BigInt\n}\n\nmodel fibre {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n terrain String @db.VarChar(16)\n rue String @db.VarChar(128)\n ville String @db.VarChar(128)\n zip String @default(dbgenerated(\"()\")) @db.VarChar(7)\n ontid Int? @db.UnsignedInt\n sn String? @db.VarChar(32)\n tech Int @default(2) @db.UnsignedSmallInt\n info_connect String @default(dbgenerated(\"(172.17.0.2)\")) @db.VarChar(64)\n frame Int? @db.UnsignedTinyInt\n slot Int? @db.UnsignedTinyInt\n port Int? @db.UnsignedTinyInt\n vlan_manage Int? @db.UnsignedInt\n vlan_internet Int? @db.UnsignedInt\n vlan_telephone Int? @db.UnsignedInt\n vlan_tele Int? @db.UnsignedInt\n manage_service_id Int? @db.UnsignedInt\n internet_service_id Int? @db.UnsignedInt\n telephone_service_id Int? @db.UnsignedInt\n tele_service_id Int? @db.UnsignedInt\n service_id Int? @db.UnsignedInt\n nb_drop Int @default(0) @db.UnsignedInt\n placemarks_id BigInt? @db.UnsignedBigInt\n appartements_id BigInt? @db.UnsignedBigInt\n latitude Float? @db.Float\n longitude Float? @db.Float\n boitier_pas_install Int? @db.UnsignedTinyInt\n description String? @db.VarChar(50)\n suite Int @default(0) @db.UnsignedTinyInt\n distance Int? @db.UnsignedInt\n nb_portees Int? @db.UnsignedTinyInt\n\n @@index([appartements_id, sn], map: \"appartements_id\")\n @@index([info_connect, appartements_id, sn, slot, port], map: \"info_connect\")\n @@index([placemarks_id, sn], map: \"placemarks_id\")\n @@index([service_id], map: \"service_id\")\n}\n\nmodel fibre_olt {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n tech Int @db.UnsignedSmallInt\n ip String @db.VarChar(64)\n description String @db.VarChar(128)\n}\n\nmodel fibre_service_port {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n last_service_id Int @db.UnsignedInt\n}\n\nmodel fibre_suivi {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n customer_id String? @db.VarChar(32)\n first_name String @db.VarChar(64)\n last_name String @db.VarChar(64)\n address String @db.VarChar(128)\n city String @db.VarChar(128)\n zip String @db.VarChar(7)\n phone String @db.VarChar(10)\n email String? @db.VarChar(64)\n longitude Decimal @db.Decimal(12, 7)\n latitude Decimal @db.Decimal(12, 7)\n called Int @default(-1) @db.TinyInt\n create_by Int @default(0) @db.UnsignedInt\n note String @db.Text\n}\n\nmodel fibre_tech {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n description String @db.VarChar(128)\n}\n\nmodel fibre_videotron {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date String @db.VarChar(16)\n download String @default(dbgenerated(\"(0)\")) @db.VarChar(128)\n upload String @default(dbgenerated(\"(0)\")) @db.VarChar(128)\n ethernet String @default(dbgenerated(\"()\")) @db.VarChar(64)\n interface String @default(dbgenerated(\"()\")) @db.VarChar(128)\n}\n\nmodel gantt {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @default(0) @db.UnsignedInt\n name String? @db.VarChar(128)\n gantt String @db.Text\n closed Int @default(0) @db.TinyInt\n}\n\nmodel gantt_template {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n name String? @db.VarChar(128)\n gantt String @db.Text\n}\n\nmodel project {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n name String @db.VarChar(128)\n status String @db.VarChar(16)\n desc String? @db.Text\n date_start BigInt? @db.UnsignedBigInt\n date_end BigInt? @db.UnsignedBigInt\n manager_name String? @db.VarChar(64)\n}\n\nmodel project_cmd {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n project_id Int @db.UnsignedInt\n date BigInt @db.UnsignedBigInt\n vendeur String? @db.VarChar(128)\n no_cmd String? @db.VarChar(64)\n po String? @db.VarChar(32)\n staff_id Int @default(4667) @db.UnsignedInt\n\n @@index([project_id], map: \"project_id\")\n}\n\nmodel project_cmd_item {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n cmd_id Int @db.UnsignedInt\n product_id Int @default(0) @db.UnsignedInt\n desc String @db.Text\n qte Float\n price Float\n usd Boolean @default(false)\n recu Int @default(0) @db.TinyInt\n qte_recu Float @default(0)\n date_recu String? @db.VarChar(64)\n comment String? @db.VarChar(128)\n eta String? @db.VarChar(10)\n status Int @default(0) @db.UnsignedTinyInt\n\n @@index([cmd_id], map: \"cmd_id\")\n @@index([product_id], map: \"product_id\")\n}\n\nmodel project_manager_cat {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n pos Int @db.UnsignedTinyInt\n name String @db.VarChar(32)\n color String @default(dbgenerated(\"(ffffff)\")) @db.VarChar(7)\n text_color String @default(dbgenerated(\"(#000000)\")) @db.VarChar(7)\n}\n\nmodel project_manager_checklist {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n task_id Int @db.UnsignedInt\n ticket_id Int @db.UnsignedInt\n desc String @db.VarChar(128)\n poids Int @default(1) @db.UnsignedTinyInt\n done Int @default(0) @db.TinyInt\n\n @@index([task_id], map: \"task_id\")\n}\n\nmodel project_manager_comment {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n task_id Int @db.UnsignedInt\n comment String @db.Text\n staff_id Int @db.UnsignedInt\n date String @db.VarChar(16)\n unread String @db.Text\n\n @@index([task_id], map: \"task_id\")\n}\n\nmodel project_manager_task {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n category_id Int @db.UnsignedInt\n pos Int @db.UnsignedTinyInt\n titre String @db.VarChar(255)\n color String @default(dbgenerated(\"(#ffffff)\")) @db.VarChar(7)\n text_color String @default(dbgenerated(\"(#000000)\")) @db.VarChar(7)\n desc String @db.Text\n ticket_id String? @db.VarChar(16)\n date_start String? @db.VarChar(16)\n date_deadline String? @db.VarChar(16)\n deadline_watch Int @default(1) @db.UnsignedTinyInt\n assign_staff String? @db.Text\n priority Int @default(0) @db.UnsignedTinyInt\n done Boolean @default(false)\n create_by Int @db.UnsignedInt\n date_creation String? @db.VarChar(16)\n date_update String? @db.VarChar(16)\n\n @@index([category_id], map: \"category_id\")\n}\n\nmodel service {\n id BigInt @id @default(autoincrement())\n date_orig BigInt?\n date_suspended BigInt?\n date_next_invoice BigInt?\n date_last_invoice BigInt?\n delivery_id Int?\n device_id Int @default(0) @db.UnsignedInt\n product_id Int?\n comment String? @db.VarChar(255)\n payment_recurrence Int? @db.TinyInt\n status Int? @db.TinyInt\n hijack Int @default(0) @db.TinyInt\n hijack_price Float @default(0)\n hijack_desc String? @db.VarChar(512)\n hijack_download_speed BigInt?\n hijack_upload_speed BigInt?\n hijack_quota_day BigInt?\n hijack_quota_night BigInt?\n date_end_contract BigInt?\n actif_until BigInt?\n forfait_internet Int @default(0) @db.TinyInt\n radius_user String @db.VarChar(24)\n radius_pwd String @db.VarChar(16)\n radius_conso Boolean @default(false)\n\n @@index([date_orig], map: \"date_orig\")\n @@index([delivery_id], map: \"delivery_id\")\n @@index([device_id], map: \"device_id\")\n @@index([id, status], map: \"id\")\n @@index([product_id], map: \"product_id\")\n}\n\nmodel service_snapshot {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date BigInt @db.UnsignedBigInt\n account_id Int @db.UnsignedInt\n service_id Int @db.UnsignedInt\n quota_day BigInt @default(0) @db.UnsignedBigInt\n quota_night BigInt @default(0) @db.UnsignedBigInt\n\n @@index([account_id], map: \"account_id\")\n @@index([service_id], map: \"service_id\")\n}\n\nmodel soumission {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id BigInt\n name String @db.VarChar(64)\n po String? @db.VarChar(64)\n date String @db.VarChar(10)\n tax Int @db.UnsignedTinyInt\n materiel String? @db.LongText\n mensuel String? @db.LongText\n text String? @db.Text\n\n @@index([account_id], map: \"account_id\")\n}\n\nmodel soumission_template {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n name String @db.VarChar(64)\n materiel String @db.LongText\n mensuel String @db.LongText\n}\n\nmodel staff {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n status Int @db.TinyInt\n username String @unique(map: \"username\") @db.VarChar(32)\n password String @db.VarChar(128)\n vpn String @db.VarChar(64)\n first_name String @db.VarChar(64)\n last_name String @db.VarChar(64)\n email String @db.VarChar(64)\n ext String @db.VarChar(16)\n cell String @db.VarChar(16)\n gpin String? @db.VarChar(4)\n rights String @db.Text\n date_embauche String? @db.VarChar(20)\n fete String? @db.VarChar(16)\n supp String? @db.Text\n group_ad String @default(dbgenerated(\"()\")) @db.VarChar(64)\n dept_list String @db.Text\n notification String @db.Text\n darkmode Boolean @default(false)\n matricule_desjardins Int? @db.UnsignedInt\n compagnie_desjardins String? @db.VarChar(8)\n ldap_id Int?\n}\n\nmodel staff_dispo {\n id Int @id @default(autoincrement()) @db.TinyInt\n day_num Int @db.TinyInt\n staff_id Int?\n}\n\nmodel staff_supp {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n nom String @db.VarChar(64)\n staff_ids String @db.VarChar(128)\n}\n\nmodel tele_carte {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n delivery_id Int @unique(map: \"delivery_id\") @default(0) @db.UnsignedInt\n service_id Int @db.UnsignedInt\n channels String @db.Text\n}\n\nmodel tele_channel {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n proprio String @db.VarChar(128)\n poste String @db.VarChar(128)\n pack_min Int @default(0) @db.UnsignedTinyInt\n pack_redevance Decimal @default(0.00) @db.Decimal(5, 2)\n pack_prix_vendu Decimal @default(0.00) @db.Decimal(5, 2)\n carte_percentage Decimal @db.Decimal(5, 2)\n carte_redevance_min Decimal @db.Decimal(5, 2)\n carte_prix_vendu Decimal @db.Decimal(5, 2)\n monthly_min Decimal @default(0.00) @db.Decimal(5, 2)\n has_penetration_rate Int @default(0) @db.UnsignedTinyInt\n penetration_actuel Decimal @default(0.00) @db.Decimal(3, 2)\n is_commercial Int @default(0) @db.UnsignedTinyInt\n note String @db.Text\n epgId Int @default(0) @db.UnsignedInt\n uptele_no Int @db.UnsignedInt\n uptele_code String @db.VarChar(32)\n abbr String @db.VarChar(32)\n groupe_id Int @default(0) @db.UnsignedInt\n ccsa_packageID Int @db.UnsignedInt\n ccsa_desc String @db.VarChar(256)\n rapport_bell Int @default(0) @db.TinyInt\n}\n\nmodel tele_groupe {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n nom String @db.VarChar(128)\n small_desc String @db.VarChar(128)\n}\n\nmodel tele_network {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n network_name String @db.VarChar(128)\n fournisseur String @db.VarChar(128)\n}\n\nmodel tele_pack {\n id Int @id @default(autoincrement())\n product_id Int @db.UnsignedInt\n channels String @db.Text\n actif Boolean @default(true)\n ccsa_packageID Int @db.UnsignedInt\n ccsa_desc String @db.VarChar(256)\n rapport_bell Int @default(0) @db.TinyInt\n bell_name String? @db.VarChar(64)\n epgId Int? @db.UnsignedInt\n}\n\nmodel tele_penetration {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n id_channel Int @db.UnsignedInt\n percentage Decimal @db.Decimal(3, 2)\n prix Decimal @db.Decimal(10, 5)\n}\n\nmodel tele_sub_archive {\n id Int @id @default(autoincrement())\n date_archive String @db.VarChar(16)\n subs String @db.Text\n}\n\nmodel tele_wiz {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n delivery_id Int @db.UnsignedInt\n ticket_id Int @db.UnsignedInt\n nb_stb Int @db.UnsignedTinyInt\n credit Int @db.UnsignedTinyInt\n fbase Int @db.UnsignedInt\n fthem String @db.Text\n}\n\nmodel tv_mac {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n service_id Int @db.UnsignedInt\n mac String @db.VarChar(12)\n}\n\nmodel ticket {\n id BigInt @id @default(autoincrement()) @db.UnsignedBigInt\n ost_id Int? @db.UnsignedInt\n parent BigInt @default(0)\n account_id BigInt?\n delivery_id BigInt @default(0)\n bon_id Int? @db.UnsignedInt\n subject String? @db.VarChar(256)\n dept_id Int?\n open_by Int @default(1)\n email_from String @db.VarChar(128)\n assign_to Int @default(0)\n status String @default(dbgenerated(\"(open)\")) @db.VarChar(32)\n due_date BigInt @default(0)\n due_time String @default(dbgenerated(\"(day)\")) @db.VarChar(8)\n date_create BigInt?\n last_update BigInt?\n date_closed String @default(dbgenerated(\"()\")) @db.VarChar(16)\n pending_to_open BigInt @default(0) @db.UnsignedBigInt\n waiting_for BigInt? @db.UnsignedBigInt\n lock_name String @db.VarChar(64)\n public Boolean? @default(false)\n priority Int @default(2) @db.TinyInt\n install_success Int @default(0) @db.TinyInt\n wizard String? @db.Text\n wizard_fibre String? @db.VarChar(64)\n important Int @default(0) @db.TinyInt\n followed_by String @db.Text\n participant String @db.Text\n update_timestamp DateTime @default(now()) @db.Timestamp(0)\n closed_by Int @default(0) @db.UnsignedInt\n\n @@index([account_id], map: \"account_id\")\n @@index([assign_to], map: \"assign_to\")\n @@index([dept_id], map: \"dept_id\")\n}\n\nmodel ticket_calendar_lock {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date_lock BigInt @default(0) @db.UnsignedBigInt\n dept_id Int @default(12) @db.UnsignedInt\n nb_install Int @default(0) @db.UnsignedSmallInt\n create_by Int @db.UnsignedInt\n update_by Int @db.UnsignedInt\n last_update DateTime @default(now()) @db.Timestamp(0)\n\n @@unique([date_lock, dept_id], map: \"date_dept\")\n}\n\nmodel ticket_calendar_staff_lock {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date BigInt\n staff_id Int @db.UnsignedInt\n}\n\nmodel ticket_conge {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n name String @db.VarChar(128)\n date BigInt @db.UnsignedBigInt\n desc String @db.VarChar(255)\n ticket_id Int? @db.UnsignedInt\n\n @@index([account_id], map: \"account_id\")\n}\n\nmodel ticket_dept {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n parent Int @default(0)\n name String @unique(map: \"name\") @default(dbgenerated(\"()\")) @db.VarChar(32)\n hasChild Int @default(0) @db.SmallInt\n email String @db.VarChar(64)\n manager_id Int @default(0) @db.UnsignedInt\n member_only Boolean @default(false)\n protected Boolean @default(false)\n default_staff Int @default(0) @db.UnsignedInt\n default_follow String @default(dbgenerated(\"(0)\")) @db.VarChar(64)\n}\n\nmodel ticket_msg {\n id BigInt @id @default(autoincrement()) @db.UnsignedBigInt\n ticket_id BigInt\n staff_id BigInt @default(0)\n msg String? @db.MediumText\n date_orig BigInt?\n unread_csv String @db.MediumText\n public Boolean? @default(false)\n important Int @default(0) @db.TinyInt\n update_timestamp DateTime @default(now()) @db.Timestamp(0)\n\n @@index([staff_id], map: \"staff_id\")\n @@index([ticket_id], map: \"ticket_id\")\n}\n\nmodel ticket_template {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n name String @db.VarChar(128)\n template String @db.Text\n}\n\n/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.\nmodel tmp {\n id Int @db.UnsignedInt\n prive String @db.VarChar(20)\n public String @db.VarChar(20)\n\n @@ignore\n}\n\nmodel tmp_vpn {\n id Int @id\n username String @db.VarChar(64)\n password String @db.VarChar(64)\n ad_done Boolean @default(false)\n tacacs Boolean @default(false)\n m Int @default(2000) @db.UnsignedInt\n}\n\nmodel bon_travail {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date BigInt? @db.UnsignedBigInt\n account_id Int @db.UnsignedInt\n tech1 Int? @db.UnsignedInt\n heure_arrive_t1 String? @db.VarChar(10)\n heure_depart_t1 String? @db.VarChar(10)\n tech2 Int? @db.UnsignedInt\n heure_arrive_t2 String? @db.VarChar(10)\n heure_depart_t2 String? @db.VarChar(10)\n note String? @db.Text\n subtotal Decimal? @db.Decimal(10, 2)\n tps Decimal? @db.Decimal(10, 2)\n tvq Decimal? @db.Decimal(10, 2)\n total Decimal? @db.Decimal(10, 2)\n}\n\nmodel bon_travail_item {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n bon_id Int @db.UnsignedInt\n product_id Int @db.UnsignedInt\n qte Int\n price Decimal @db.Decimal(10, 2)\n desc String @db.Text\n}\n\nmodel checklist_relais {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n site_id Int @unique(map: \"site_id\") @db.UnsignedInt\n site_name String? @db.VarChar(128)\n account_id Int @db.UnsignedInt\n priority Int @default(2) @db.UnsignedTinyInt\n done Int @default(0) @db.UnsignedTinyInt\n equipement String? @db.Text\n connecteur String? @db.Text\n grounding String? @db.Text\n surge_lightning String? @db.Text\n switch_poe String? @db.Text\n switch_giga_shield String? @db.Text\n batterie String? @db.Text\n solidity String? @db.Text\n redondance String? @db.Text\n antenne_58_360 String? @db.Text\n antenne_24_360 String? @db.Text\n rspro_maj String? @db.Text\n boite String? @db.Text\n cable String? @db.Text\n staros_ubnt String? @db.Text\n autre String? @db.Text\n}\n\n/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments\nmodel conference {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n room_id Int @db.UnsignedInt\n time_start String @db.VarChar(16)\n time_end String @db.VarChar(16)\n name String @db.VarChar(128)\n description String? @db.Text\n host Int @db.UnsignedInt\n participant String @db.Text\n}\n\nmodel conference_room {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n name String @db.VarChar(128)\n status Int @default(1) @db.TinyInt\n location String? @db.VarChar(128)\n description String? @db.Text\n}\n\nmodel fournisseur {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n nom String @db.VarChar(128)\n email String @db.VarChar(64)\n actif Boolean @default(true)\n}\n\nmodel notice_gui {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n staff_id Int @db.UnsignedInt\n message String @db.Text\n is_read Int @default(0)\n timestamp String @db.VarChar(10)\n}\n\nmodel promo {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n name String? @db.VarChar(64)\n desc String? @db.Text\n date_start BigInt? @db.UnsignedBigInt\n date_end BigInt? @db.UnsignedBigInt\n date_orig BigInt?\n visible_until BigInt?\n actif Int @default(0) @db.TinyInt\n}\n\nmodel stbs {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n mac String @unique(map: \"mac\") @db.VarChar(32)\n sn String @db.VarChar(32)\n targo String? @db.VarChar(16)\n}\n\nmodel tech_dispo {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date BigInt @unique(map: \"date\") @db.UnsignedBigInt\n tech Int? @db.UnsignedInt\n}\n\nenum phone_addr_enhanced_capable {\n Y\n N\n}\n\n/// ************** DEPRECATED ********************************************\nmodel debug {\n id BigInt @id @default(autoincrement())\n autor String? @db.VarChar(32)\n url String? @db.VarChar(128)\n date_last BigInt?\n desc String? @db.MediumText\n note4autor String? @db.MediumText\n note4dev String? @db.MediumText\n status String? @db.VarChar(64)\n}\n\nmodel carte_temps {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n week Int @db.UnsignedTinyInt\n year Int? @db.UnsignedInt\n date BigInt @db.UnsignedBigInt\n staff_id BigInt @db.UnsignedBigInt\n start_am BigInt? @db.UnsignedBigInt\n end_am BigInt? @db.UnsignedBigInt\n start_pm BigInt? @db.UnsignedBigInt\n end_pm BigInt? @db.UnsignedBigInt\n start_night BigInt? @db.UnsignedBigInt\n end_night BigInt? @db.UnsignedBigInt\n relais Float?\n comment String? @db.Text\n note_int String? @db.Text\n conge Int @default(0) @db.UnsignedTinyInt\n appr String? @db.VarChar(8)\n appr_dir String? @db.VarChar(8)\n\n @@index([staff_id], map: \"staff_id\")\n}\n\nmodel carte_temps_periode {\n id Int @id @default(autoincrement()) @db.UnsignedSmallInt\n debut String @db.VarChar(16)\n fin String @db.VarChar(16)\n paid String @db.VarChar(16)\n periode Int @db.UnsignedTinyInt\n annee Int @db.UnsignedSmallInt\n}\n\nmodel banque_heure_staff {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n staff_id Int @db.UnsignedInt\n week Int @db.UnsignedTinyInt\n year Int @db.UnsignedSmallInt\n sunday String? @db.VarChar(16)\n heure Float\n\n @@index([staff_id], map: \"staff_id\")\n}\n\nmodel hour_bank {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id BigInt @db.UnsignedBigInt\n remaining_time Int @default(0)\n expiration_date BigInt @default(0) @db.UnsignedBigInt\n note String? @db.MediumText\n recurrence Int @default(0) @db.UnsignedTinyInt\n reset_value Int @default(0) @db.UnsignedSmallInt\n\n @@index([account_id], map: \"account_id\")\n}\n\nmodel hour_bank_detail {\n id Int @id @default(autoincrement())\n hour_id Int\n staff_id BigInt? @db.UnsignedBigInt\n date_orig BigInt @db.UnsignedBigInt\n used_time Int @default(0) @db.SmallInt\n ticket_id BigInt? @db.UnsignedBigInt\n working_order String? @db.VarChar(16)\n detail String? @db.MediumText\n\n @@index([hour_id], map: \"hour_id\")\n}\n\nmodel test {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n text String @db.Text\n c2 Int @default(1)\n}\n\n//this table is for CSS class only, no other uses\nmodel account_memo_template {\n id Int @id @default(autoincrement())\n name String @db.VarChar(32)\n color String @db.VarChar(6)\n bcolor String @db.VarChar(6)\n border String @default(dbgenerated(\"(000000)\")) @db.VarChar(6)\n}\n\n//not used\nmodel notes {\n id Int @id @default(autoincrement())\n account_id Int @db.UnsignedInt\n notes String @db.MediumText\n}\n\n//NOT USED\nmodel email {\n id Int @id @default(autoincrement())\n account_id BigInt?\n email String? @db.VarChar(128)\n password String? @db.VarChar(128)\n}\n\n//not relevant to ticket module\nmodel client_pwd {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n date BigInt @db.UnsignedBigInt\n uid String @db.VarChar(32)\n used Boolean @default(false)\n}\n\n//NO USES FOR TICKETING PURPOSES\nmodel account_profile {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n profile_id String @db.VarChar(64)\n address_id String @db.VarChar(64)\n card_id String @db.VarChar(64)\n token String @db.VarChar(32)\n initial_transaction String @db.VarChar(128)\n}\n\n//not relevant to ticket module\nmodel deposit_slip {\n id Int @id @default(autoincrement())\n customer_id String? @db.VarChar(32)\n name String? @db.VarChar(512)\n amount Float @default(0)\n type String @db.VarChar(32)\n desc String? @db.VarChar(255)\n date BigInt? @db.UnsignedBigInt\n}\n\n//this table display suspended account\nmodel account_suspension {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @unique(map: \"account_id\") @db.UnsignedInt\n date_start BigInt @db.UnsignedBigInt\n date_end BigInt @db.UnsignedBigInt\n note String @db.VarChar(128)\n}\n", + "inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"generated/prisma/client/mariadb\"\n}\n\ndatasource db {\n provider = \"mysql\"\n}\n\nmodel account {\n id Int @id @default(autoincrement())\n customer_id String? @db.VarChar(32) //variable string, composition varies a lot, used by customers to identify their account\n date_orig BigInt? //timestamp\n date_last BigInt? //timestamp\n date_expire BigInt? //not used\n language_id String @default(dbgenerated(\"(francais)\")) @db.VarChar(32) //either \"anglais\", \"francais\"\n country_id Int @default(124) //124 (canada), 450 (Madagascar) or 840 (Virgin island)\n currency_id Int? //not used\n username String? @db.VarChar(128)\n password String? @db.VarChar(128)\n group_id Int @default(6) @db.TinyInt //refers to the account_group table\n misc String? @db.VarChar(128) //comments of some sort\n status Int? //1-actif, 2-suspension,3- non paiement, 4- terminé, 5- recouvre, 6-creance\n first_name String? @db.VarChar(128)\n middle_name String? @db.VarChar(128) //not used\n last_name String? @db.VarChar(128)\n mandataire String? @db.VarChar(128) //sometimes the first_name and last_name are found here, sometimes its the name of someone who manage the account\n title String? @db.VarChar(128) //Mme, Mrs, Mr., M., \"\"\n email String? @db.VarChar(255)\n email_autre String? @db.VarChar(255) //second email\n company String? @db.VarChar(255) //name of the company account\n contact String @db.Text //name of the contact at the company or account contact\n address1 String? @db.VarChar(128)\n address2 String? @db.VarChar(128) //sometimes used to specify the unit, the suit, the camping lot or used as a note???\n city String? @db.VarChar(128)\n state String? @db.VarChar(32)\n zip String? @db.VarChar(16)\n tel_home String? @db.VarChar(16)\n tel_office String? @db.VarChar(16)\n tel_office_ext String? @db.VarChar(4)\n cell String? @db.VarChar(16)\n fax String? @db.VarChar(16)\n invoice_delivery Int @default(2) //1-email, 2-poste, 3-default\n land_owner Boolean @default(false) //tinyInt boolean\n frais Boolean @default(false) //tinyInt boolean\n ppa Boolean @default(false)\n ppa_all_invoice Int @default(0) @db.TinyInt\n ppa_name String? @db.VarChar(64)\n ppa_code String? @db.VarChar(255)\n ppa_branch String? @db.VarChar(255)\n ppa_account String? @db.VarChar(255)\n ppa_amount Decimal @default(0.00) @db.Decimal(6, 2)\n ppa_amount_buffer Float @default(30.00)\n ppa_all_tmp Int @default(0) @db.TinyInt\n ppa_fixed Boolean @default(false)\n commercial Boolean @default(false)\n vip Boolean @default(false)\n tax_group Int @default(1) @db.TinyInt\n data_check Boolean @default(false)\n created_by Int?\n notes_client String? @db.VarChar(256) //comments left by customer via the \"portail\"\n keyword String? @db.VarChar(512)\n terminate_reason String? @db.VarChar(32) //install,demenage, cie, autre, NULL\n terminate_cie String? @db.VarChar(32) // null, bell, autre, videotron, cogeco, deery, explirnet, sftl, haut-richelieu\n terminate_note String? @db.MediumText // comment on the termination of the account\n terminate_date String? @db.VarChar(16)\n call Boolean @default(false) //tinyInt boolean\n pub Boolean @default(true) //TinyInt boolean\n portal_client_log Boolean @default(false) //TinyInt boolean\n mauvais_payeur Boolean @default(false) //TinyInt boolean\n renew_phone Boolean @default(false) //TinyInt boolean\n ppa_cc Int @default(0) @db.TinyInt\n stripe_id String? @db.VarChar(32)\n\n @@index([customer_id], map: \"customer_id\")\n @@index([id, status], map: \"id\")\n @@index([status], map: \"status\")\n}\n\nmodel account_group {\n id Int @id @default(autoincrement()) @db.TinyInt //see group_id in account table for references\n date_orig BigInt?\n group_name String? @db.VarChar(64) //group name\n}\n\n// this table could be ignored ? see comment on memo column\nmodel account_memo {\n id BigInt @id @default(autoincrement())\n date_orig BigInt?\n last_updated BigInt @default(0) @db.UnsignedBigInt\n staff_id BigInt?\n account_id BigInt?\n 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\n color String @default(dbgenerated(\"(000000)\")) @db.VarChar(6) //CSS\n bcolor String @default(dbgenerated(\"(E0E0E0)\")) @db.VarChar(6) //CSS\n border String @default(dbgenerated(\"(000000)\")) @db.VarChar(6) //CSS\n\n @@index([account_id], map: \"account_id\")\n @@index([staff_id], map: \"staff_id\")\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel compta_comptes {\n id BigInt @id @default(autoincrement())\n category String? @db.VarChar(64)\n num_compte String? @db.VarChar(16)\n desc String? @db.MediumText\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel compta_comptes_soldes {\n id BigInt @id @default(autoincrement())\n num_compte Int\n year Int\n amount Float @db.Float\n comment String @db.VarChar(64)\n type String @db.VarChar(3)\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel compta_journal_ecriture {\n id BigInt @id @default(autoincrement())\n date_orig BigInt?\n type String? @db.VarChar(4)\n num BigInt?\n customer_id String? @db.VarChar(32)\n full_name String? @db.VarChar(256)\n desc String? @db.MediumText\n mo String? @db.VarChar(4)\n em Int @default(0) @db.TinyInt\n\n @@index([customer_id], map: \"customer_id\")\n @@index([date_orig], map: \"date_orig\")\n @@index([num], map: \"num\")\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel compta_journal_ecriture_bk {\n id BigInt @id @default(autoincrement())\n date_orig BigInt?\n type String? @db.VarChar(4)\n num BigInt?\n customer_id String? @db.VarChar(32)\n full_name String? @db.VarChar(256)\n desc String? @db.MediumText\n mo String? @db.VarChar(4)\n em Int @default(0) @db.TinyInt\n\n @@index([customer_id], map: \"customer_id\")\n @@index([date_orig], map: \"date_orig\")\n @@index([num], map: \"num\")\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel compta_journal_ecriture_detail {\n id BigInt @id @default(autoincrement())\n journal_id BigInt?\n num_compte BigInt?\n amount Float?\n action String? @db.VarChar(16)\n\n @@index([journal_id], map: \"journal_id\")\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel compta_journal_ecriture_detail_bk {\n id BigInt @id @default(autoincrement())\n journal_id BigInt?\n num_compte BigInt?\n amount Float?\n action String? @db.VarChar(16)\n\n @@index([journal_id], map: \"journal_id\")\n}\n\nmodel compta_periode {\n month Int @id @default(7)\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel compta_ppa_file_id {\n last_id Int @id @default(1)\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel compta_setup {\n setup_id Int @id @default(1)\n period_month Int @default(7)\n ppa_id Int @default(1)\n excedent_max Float @default(0)\n month_closed BigInt?\n pay_week_closed Int @db.UnsignedTinyInt\n attachment_ext String @db.MediumText\n netadmin_dispo Int @default(0) @db.UnsignedInt\n imap_token String? @db.Text\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel credit_code {\n id Int @id @default(autoincrement())\n code String @db.VarChar(16)\n desc String @db.VarChar(256)\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel tax {\n id Int @id @default(autoincrement())\n name String? @db.VarChar(128)\n description String? @db.VarChar(255)\n rate Float?\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel tax_group {\n id Int @id @default(autoincrement())\n name String? @db.VarChar(128)\n description String? @db.VarChar(255)\n tax String? @db.VarChar(128)\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel td_payable {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n ticket_id Int @default(0) @db.UnsignedInt\n invoice String @default(dbgenerated(\"()\")) @db.VarChar(32)\n date_invoice String @db.VarChar(20)\n fournisseur String? @default(dbgenerated(\"()\")) @db.VarChar(128)\n montant Decimal @default(0.00) @db.Decimal(15, 2)\n devise String @default(dbgenerated(\"(ca)\")) @db.VarChar(2)\n methode String? @default(dbgenerated(\"()\")) @db.VarChar(64)\n reference String? @default(dbgenerated(\"()\")) @db.VarChar(128)\n date_paiement String? @default(dbgenerated(\"()\")) @db.VarChar(20)\n releve String? @db.VarChar(128)\n\n @@index([ticket_id], map: \"ticket_id\")\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel conso {\n id BigInt @id @default(autoincrement())\n ip_id String? @db.VarChar(16)\n date BigInt?\n total BigInt? @default(0)\n total_day BigInt? @default(0)\n total_night BigInt? @default(0)\n\n @@index([ip_id], map: \"ip_id\")\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel conso_archive {\n id BigInt @id @default(autoincrement())\n ip_id String? @db.VarChar(16)\n date BigInt?\n total BigInt? @default(0)\n total_day BigInt? @default(0)\n total_night BigInt? @default(0)\n\n @@index([ip_id], map: \"ip_id\")\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel conso_avis {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date BigInt\n account_id Int @db.UnsignedInt\n delivery_id Int @default(0) @db.UnsignedInt\n service_id Int @default(0) @db.UnsignedInt\n ip_id Int\n avis String @db.VarChar(32)\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel conso_radius {\n id BigInt @id @default(autoincrement()) @db.UnsignedBigInt\n username String @db.VarChar(32)\n date String @db.VarChar(32)\n download String @db.Text\n upload String @db.Text\n nb_sess Int @default(0) @db.UnsignedInt\n\n @@index([date], map: \"date\")\n @@index([username], map: \"username\")\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel conso_radius_daily {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n username String @db.VarChar(32)\n date String @db.VarChar(32)\n download_nuit String @db.Text\n upload_nuit String @db.Text\n download_jour String @db.Text\n upload_jour String @db.Text\n\n @@index([date], map: \"date\")\n @@index([username], map: \"username\")\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel conso_radius_daily2 {\n id BigInt @id @default(autoincrement()) @db.UnsignedBigInt\n username String @db.VarChar(32)\n date String @db.VarChar(32)\n download_nuit String @default(dbgenerated(\"(0)\")) @db.VarChar(64)\n upload_nuit String @default(dbgenerated(\"(0)\")) @db.VarChar(64)\n download_jour String @default(dbgenerated(\"(0)\")) @db.VarChar(64)\n upload_jour String @default(dbgenerated(\"(0)\")) @db.VarChar(64)\n\n @@index([date], map: \"date\")\n @@index([username], map: \"username\")\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel conso_radius_hourly {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n username String @db.VarChar(32)\n date String @db.VarChar(32)\n download String @db.Text\n upload String @db.Text\n\n @@index([date], map: \"date\")\n @@index([username], map: \"username\")\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel conso_radius_monthly {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date String @db.VarChar(32)\n username String @db.VarChar(32)\n nuit String @db.Text\n jour String @db.Text\n\n @@index([date], map: \"date\")\n @@index([username], map: \"username\")\n}\n\n//NOT USED BY THE TICKET MODULE *********************\nmodel conso_radius_monthly2 {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date String @db.VarChar(32)\n username String @db.VarChar(32)\n nuit String @default(dbgenerated(\"(0)\")) @db.VarChar(64)\n jour String @default(dbgenerated(\"(0)\")) @db.VarChar(64)\n\n @@index([date], map: \"date\")\n @@index([username], map: \"username\")\n}\n\nmodel delivery {\n id Int @id @default(autoincrement())\n account_id Int?\n name String @db.VarChar(32)\n comment String @db.VarChar(512)\n date_orig BigInt?\n address1 String? @db.VarChar(128)\n address2 String? @db.VarChar(128)\n city String? @db.VarChar(32)\n state String? @db.VarChar(32)\n zip String? @db.VarChar(16)\n longitude Decimal @db.Decimal(12, 7)\n latitude Decimal @db.Decimal(12, 7)\n tel_home String? @db.VarChar(16)\n tel_office String? @db.VarChar(16)\n tel_office_ext String? @db.VarChar(4)\n cell String? @db.VarChar(12)\n fax String? @db.VarChar(12)\n email String? @db.VarChar(255)\n quota_max_day BigInt @default(0) @db.UnsignedBigInt\n quota_max_night BigInt @default(0) @db.UnsignedBigInt\n contact String? @db.VarChar(128)\n expanded Int? @default(0) @db.TinyInt\n placemarks_id BigInt? @db.UnsignedBigInt\n epg_subid Int @default(0) @db.UnsignedInt\n\n @@index([account_id], map: \"account_id\")\n @@index([placemarks_id], map: \"placemarks_id\")\n}\n\nmodel delivery_history {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n date_orig BigInt @db.UnsignedBigInt\n address1 String @db.VarChar(128)\n address2 String @db.VarChar(128)\n city String @db.VarChar(128)\n state String @db.VarChar(32)\n zip String @db.VarChar(8)\n\n @@index([account_id], map: \"account_id\")\n}\n\nmodel device {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n delivery_id Int @db.UnsignedInt\n category String @db.VarChar(64)\n name String @db.VarChar(128)\n manufacturier String? @db.VarChar(128)\n model String? @db.VarChar(128)\n sn String? @db.VarChar(128)\n mac String? @db.VarChar(32)\n manage String @db.VarChar(256)\n port String @default(dbgenerated(\"()\")) @db.VarChar(5)\n protocol String @default(dbgenerated(\"(https)\")) @db.VarChar(8)\n manage_cli String @db.VarChar(256)\n port_cli String @default(dbgenerated(\"()\")) @db.VarChar(5)\n protocol_cli String @db.VarChar(8)\n user String @db.VarChar(64)\n pass String @db.VarChar(128)\n parent Int @default(0) @db.UnsignedInt\n\n @@index([delivery_id], map: \"delivery_id\")\n @@index([sn], map: \"sn\")\n}\n\nmodel device_archive {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n delivery_id Int @db.UnsignedInt\n category String @db.VarChar(64)\n name String @db.VarChar(128)\n manufacturier String? @db.VarChar(128)\n model String? @db.VarChar(128)\n sn String? @db.VarChar(128)\n mac String? @db.VarChar(32)\n manage String @db.VarChar(256)\n port String @default(dbgenerated(\"()\")) @db.VarChar(5)\n protocol String @default(dbgenerated(\"(https)\")) @db.VarChar(8)\n manage_cli String @db.VarChar(256)\n port_cli String @default(dbgenerated(\"()\")) @db.VarChar(5)\n protocol_cli String @db.VarChar(8)\n user String @db.VarChar(64)\n pass String @db.VarChar(128)\n parent Int @default(0) @db.UnsignedInt\n\n @@index([delivery_id], map: \"delivery_id\")\n @@index([sn], map: \"sn\")\n}\n\nmodel device_attr {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n device_id Int @db.UnsignedInt\n attr String @db.VarChar(128)\n value String @db.VarChar(128)\n\n @@index([device_id], map: \"device_id\")\n}\n\nmodel device_link {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n parent Int @db.UnsignedInt\n child Int @db.UnsignedInt\n}\n\nmodel device_template {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n nom String @db.VarChar(128)\n}\n\nmodel device_template_attr {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n template_id Int @db.UnsignedInt\n attr String @db.VarChar(128)\n default_val String @db.VarChar(128)\n}\n\nmodel product {\n id Int @id @default(autoincrement())\n date_orig BigInt?\n sku String? @db.VarChar(32)\n active Int? @db.TinyInt\n price Float?\n price_recurr_type Int? @db.TinyInt\n price_recurr_weekday Int?\n price_recurr_week Int?\n price_recurr_schedule Int? @db.TinyInt\n download_speed BigInt?\n upload_speed BigInt?\n night_package Int @default(0) @db.TinyInt\n quota_day BigInt? @db.UnsignedBigInt\n quota_night BigInt? @db.UnsignedBigInt\n category Int? @db.TinyInt\n uniq_charge Int @default(0) @db.TinyInt\n commercial Boolean @default(false)\n portal_hidden Boolean @default(false)\n inv_keep Boolean @default(false)\n inv_tag String? @db.VarChar(255)\n inv_threshold Int @default(0) @db.UnsignedInt\n inv_qte Int @default(0) @db.UnsignedInt\n emplacement String @default(dbgenerated(\"()\")) @db.VarChar(16)\n list_tech Int @default(0) @db.UnsignedTinyInt\n type Int @default(0) @db.UnsignedTinyInt\n combo_ready Int @default(0) @db.UnsignedTinyInt\n fibre_lineprofile String? @db.VarChar(8)\n fibre_serviceprofile String? @db.VarChar(8)\n\n @@index([sku], map: \"sku\")\n}\n\nmodel product_cat {\n id Int @id @default(autoincrement())\n name String? @db.VarChar(255)\n notes String? @db.VarChar(255)\n status Int? @db.TinyInt\n num_compte BigInt?\n combo_dispo Int @default(0) @db.UnsignedTinyInt\n}\n\nmodel product_format {\n id BigInt @id @default(autoincrement())\n date_orig BigInt?\n name String? @db.VarChar(255)\n type Int? @db.TinyInt\n product_idx String? @db.MediumText\n description String? @db.MediumText\n}\n\nmodel product_fournisseur {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n product_id Int @db.UnsignedInt\n nom_fournisseur String @db.VarChar(255)\n prix_us Boolean @default(false)\n prix_achat Float @default(0.00)\n prix_livr String @default(dbgenerated(\"()\")) @db.VarChar(16)\n delais_livr String @default(dbgenerated(\"()\")) @db.VarChar(128)\n comment String @default(dbgenerated(\"()\")) @db.VarChar(128)\n\n @@index([product_id], map: \"product_id\")\n}\n\nmodel product_profile {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n product_id Int @db.UnsignedInt\n device_type String @db.VarChar(64)\n line_profile Int @db.UnsignedInt\n service_profile Int @db.UnsignedInt\n}\n\nmodel product_speciaux {\n id BigInt @id @default(autoincrement())\n product_zone_id BigInt\n product_id BigInt\n price Float?\n price_install Float?\n exp_timestamp BigInt?\n duree_contrat Int? @db.UnsignedTinyInt\n\n @@index([product_zone_id], map: \"product_zone_id\")\n}\n\nmodel product_translate {\n id Int @id @default(autoincrement())\n product_id Int?\n language_id String? @db.VarChar(16)\n name String? @db.VarChar(512)\n description_short String? @db.LongText\n description_full String? @db.LongText\n\n @@index([language_id], map: \"language_id\")\n @@index([product_id], map: \"product_id\")\n}\n\nmodel product_zone {\n id BigInt @id @default(autoincrement())\n zoneNumber Int @db.UnsignedInt\n description String? @db.VarChar(255)\n\n @@index([zoneNumber], map: \"zoneNumber\")\n}\n\nmodel product_zone_placemarks {\n id BigInt @id @default(autoincrement())\n product_zone_id BigInt @db.UnsignedBigInt\n placemarks_id BigInt @db.UnsignedBigInt\n\n @@index([placemarks_id], map: \"placemarks_id\")\n}\n\nmodel inventaire_log {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n prod_tag String @db.VarChar(255)\n staff_id Int @db.UnsignedInt\n action String @db.VarChar(1)\n qte Int @db.UnsignedInt\n timestamp String @db.VarChar(10)\n\n @@index([prod_tag], map: \"prod_tag\")\n}\n\nmodel phone {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n service_id Int @db.UnsignedInt\n phone_num String @db.VarChar(16)\n note String? @db.Text\n fournisseur String? @db.VarChar(64)\n}\n\nmodel phone_addr {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n phone String @db.VarChar(16)\n street_number String @db.VarChar(10)\n apt String @db.VarChar(30)\n street_name String @db.VarChar(84)\n city String @db.VarChar(38)\n state String @db.VarChar(2)\n zip String @db.VarChar(10)\n first_name String @db.VarChar(38)\n last_name String @db.VarChar(100)\n info String @db.VarChar(100)\n enhanced_capable phone_addr_enhanced_capable @default(dbgenerated(\"(Y)\"))\n code_cauca String? @db.VarChar(3)\n class_service String @default(dbgenerated(\"(RES)\")) @db.VarChar(3)\n}\n\nmodel phone_comwave {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id BigInt?\n service_id BigInt?\n requestId Int @unique(map: \"requestId\") @db.UnsignedInt\n phoneNumber String @db.VarChar(10)\n status String @default(dbgenerated(\"(P)\")) @db.VarChar(1)\n date String? @db.VarChar(10)\n reason String? @db.Text\n}\n\nmodel phone_note {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n phone String @unique(map: \"phone\") @db.VarChar(11)\n rate_center String? @db.VarChar(128)\n fournisseur String @default(dbgenerated(\"(comwave)\")) @db.VarChar(64)\n note String? @db.Text\n}\n\nmodel phone_provisioning {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n delivery_id Int @db.UnsignedInt\n service_id Int @db.UnsignedInt\n phone String @db.VarChar(10)\n app String @db.VarChar(16)\n mac String @db.VarChar(16)\n password String @db.VarChar(32)\n internationnal String? @db.VarChar(6)\n date_orig BigInt @db.UnsignedBigInt\n date_update BigInt @db.UnsignedBigInt\n}\n\nmodel phonecall_channel {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n timestamp BigInt @unique(map: \"timestamp\") @db.UnsignedBigInt\n max_tinktell Int @default(0) @db.UnsignedTinyInt\n max_outgoing_thinktell Int @default(0) @db.UnsignedTinyInt\n max_comwave Int @default(0) @db.UnsignedTinyInt\n max_outgoing_comwave Int @default(0) @db.UnsignedTinyInt\n max_total Int @default(0) @db.UnsignedTinyInt\n}\n\nmodel phonecall_log_2025 {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n caller_id_name String @db.VarChar(64)\n caller_id_number String @db.VarChar(32)\n destination_number String @db.VarChar(32)\n start_stamp DateTime @db.DateTime(0)\n answer_stamp DateTime @db.DateTime(0)\n end_stamp DateTime @db.DateTime(0)\n duration Int\n billing Decimal @default(0.00000) @db.Decimal(15, 5)\n hangup_cause String @db.VarChar(32)\n uuid String @unique(map: \"uuid\") @db.VarChar(64)\n}\n\nmodel phonecall_log_2026 {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n caller_id_name String @db.VarChar(64)\n caller_id_number String @db.VarChar(32)\n destination_number String @db.VarChar(32)\n start_stamp DateTime @db.DateTime(0)\n answer_stamp DateTime @db.DateTime(0)\n end_stamp DateTime @db.DateTime(0)\n duration Int\n billing Decimal @default(0.00000) @db.Decimal(15, 5)\n hangup_cause String @db.VarChar(32)\n uuid String @unique(map: \"uuid\") @db.VarChar(64)\n}\n\nmodel voicemeup {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n date BigInt @db.UnsignedBigInt\n duration Int @db.UnsignedInt\n destination String @db.VarChar(16)\n country String @db.VarChar(256)\n state String? @db.VarChar(128)\n district String? @db.VarChar(128)\n amount Float\n uuid String? @db.VarChar(64)\n}\n\n/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.\nmodel babytel {\n date_time BigInt?\n record_type String? @db.VarChar(20)\n record_format_version Int?\n id String? @db.VarChar(24)\n rate_id String? @db.VarChar(20)\n cost Float? @db.Float\n calling_user String? @db.VarChar(24)\n called_user String? @db.VarChar(24)\n calling_domain String? @db.VarChar(24)\n called_domain String? @db.VarChar(24)\n destination String? @db.VarChar(24)\n duration_seconds String? @db.VarChar(24)\n call_start String? @db.VarChar(24)\n call_type String? @db.VarChar(24)\n call_direction String? @db.VarChar(24)\n test_call String? @db.VarChar(24)\n calling_number String? @db.VarChar(24)\n called_number_e164 String? @db.VarChar(24)\n billable_duration String? @db.VarChar(24)\n billed_duration_outbound_seconds String? @db.VarChar(24)\n reseller_cost Float? @db.Float\n master_account_id String? @db.VarChar(24)\n forwarded_to String? @db.VarChar(24)\n master_account_pk String? @db.VarChar(24)\n account_pk String? @db.VarChar(24)\n reseller_rate_id String? @db.VarChar(24)\n internal_information1 String? @db.VarChar(24)\n concurrents_calls String? @db.VarChar(24)\n external_id String? @db.VarChar(24)\n commission Float? @db.Float\n minute_plan_id String? @db.VarChar(24)\n internal_information2 String? @db.VarChar(24)\n internal_information3 String? @db.VarChar(24)\n billed_duration_inbound_seconds String? @db.VarChar(24)\n selected_destination String? @db.VarChar(24)\n internal_information4 String? @db.VarChar(24)\n internal_information5 String? @db.VarChar(24)\n cost_center String? @db.VarChar(24)\n subscriber_group String? @db.VarChar(24)\n\n @@ignore\n}\n\n/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments\nmodel pbx {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n delivery_id Int @db.UnsignedInt\n service_id Int @db.UnsignedInt\n phone String @db.VarChar(10)\n name String? @db.VarChar(32)\n password String @db.VarChar(8)\n vm_password String @default(dbgenerated(\"(1234)\")) @db.VarChar(16)\n has_vm Int @default(1) @db.TinyInt\n vm_email String? @db.VarChar(64)\n keep_msg Int @default(0) @db.TinyInt\n vm_disk_quota Int @default(180) @db.UnsignedInt\n int_code String @db.VarChar(4)\n language String @default(dbgenerated(\"(fr)\")) @db.VarChar(2)\n call_911 String @db.VarChar(11)\n max_calls Int @default(2) @db.UnsignedTinyInt\n call_timeout Int @default(30) @db.UnsignedSmallInt\n user_context String @default(dbgenerated(\"(sip.targo.ca)\")) @db.VarChar(32)\n country_whitelist String @db.Text\n date_origin BigInt @db.UnsignedBigInt\n date_update BigInt @db.UnsignedBigInt\n update_by Int? @db.UnsignedInt\n\n @@index([phone], map: \"phone\")\n}\n\nmodel pbx_app {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n pbx_id Int @db.UnsignedInt\n username String @db.VarChar(16)\n mac String @db.VarChar(16)\n app String @default(dbgenerated(\"(ht502)\")) @db.VarChar(16)\n note String @db.Text\n date_origin BigInt @db.UnsignedBigInt\n date_update BigInt @db.UnsignedBigInt\n update_by Int? @db.UnsignedInt\n\n @@index([pbx_id], map: \"pbx_id\")\n}\n\nmodel pbx_com {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n delivery_id Int @db.UnsignedInt\n service_id Int @db.UnsignedInt\n phone String @db.VarChar(10)\n name String @db.VarChar(32)\n failover String @db.VarChar(16)\n auth_method String @default(dbgenerated(\"(password)\")) @db.VarChar(8)\n password String @db.VarChar(8)\n ip String @db.VarChar(16)\n int_code String @db.VarChar(4)\n country_whitelist String @db.Text\n language String @db.VarChar(2)\n call_911 String @db.VarChar(16)\n max_calls Int @db.UnsignedTinyInt\n user_context String @db.VarChar(32)\n date_origin String @db.VarChar(16)\n date_update String @db.VarChar(16)\n update_by Int @db.UnsignedInt\n}\n\nmodel pbx_com_wl {\n id Int @id @default(autoincrement())\n phone String @unique(map: \"phone\") @db.VarChar(10)\n country_whitelist String @db.Text\n}\n\nmodel pbx_fax {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n number String @db.VarChar(10)\n email String @db.VarChar(128)\n description String? @db.VarChar(128)\n service_id Int @default(0) @db.UnsignedInt\n\n @@index([number], map: \"number\")\n}\n\nmodel payment {\n id BigInt @id @default(autoincrement())\n account_id BigInt?\n date_orig BigInt?\n amount Float?\n applied_amt Float?\n type String? @db.VarChar(25)\n memo String? @db.VarChar(512)\n reference String? @db.VarChar(128)\n excedent Int @default(0) @db.TinyInt\n correction Int @default(0) @db.TinyInt\n cr Int @default(0) @db.TinyInt\n uniqsess String? @db.VarChar(32)\n\n @@index([account_id], map: \"account_id\")\n @@index([date_orig], map: \"date_orig\")\n}\n\nmodel payment_item {\n id BigInt @id @default(autoincrement())\n payment_id BigInt?\n invoice_id BigInt?\n amount Float?\n date_orig BigInt?\n\n @@index([invoice_id], map: \"invoice_id\")\n @@index([payment_id], map: \"payment_id\")\n}\n\nmodel passwords_manager {\n id BigInt @id @default(autoincrement())\n title String @db.VarChar(64)\n login String @db.VarChar(255)\n pass String @db.Text\n url String? @db.VarChar(255)\n email String? @db.VarChar(128)\n phone String? @db.VarChar(32)\n category String? @db.VarChar(32)\n subcategory String? @db.VarChar(32)\n desc String? @db.MediumText\n notes String? @db.MediumText\n logs String? @db.MediumText\n date_orig BigInt\n date_last BigInt\n users_granted String? @db.MediumText\n group_granted String? @db.Text\n created_by BigInt\n keywords String? @db.MediumText\n}\n\nmodel passwords_manager_cat {\n id Int @id @default(autoincrement()) @db.TinyInt\n title String @db.VarChar(32)\n desc String? @db.VarChar(255)\n}\n\nmodel passwords_manager_group {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n name String @db.VarChar(32)\n users String? @db.Text\n}\n\nmodel notification {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n staff_id Int\n endpoint String @db.Text\n authToken String @db.Text\n publicKey String @db.Text\n contentEncoding String @default(dbgenerated(\"(aesgcm)\")) @db.VarChar(128)\n plateforme String? @db.VarChar(128)\n\n @@index([staff_id], map: \"staff_id\")\n}\n\nmodel notification_payload {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n notification_id Int @db.UnsignedInt\n payload String @db.Text\n timestamp DateTime @default(now()) @db.Timestamp(0)\n}\n\n/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.\nmodel country {\n id Int? @unique(map: \"IDS\")\n name_en String? @db.VarChar(128)\n name_fr String? @db.VarChar(128)\n description String? @db.VarChar(128)\n notes String? @db.VarChar(128)\n two_code String? @db.VarChar(16)\n three_code String? @db.VarChar(16)\n\n @@ignore\n}\n\nmodel municipalite {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n nom String @db.VarChar(64)\n code String @db.VarChar(4)\n administration String @db.VarChar(64)\n often_used Boolean @default(false)\n}\n\nmodel sommaire_porte {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n fibre_id Int @default(0) @db.UnsignedInt\n id_adresse String @db.VarChar(48)\n id_subvention String @db.VarChar(32)\n adresse_subvention String @db.VarChar(128)\n ville_subvention String @db.VarChar(128)\n latitude String @db.VarChar(32)\n longitude String @db.VarChar(32)\n contest_adresse Int @default(0) @db.UnsignedTinyInt\n new_adresse Int @default(0) @db.UnsignedTinyInt\n placemarks_id BigInt @db.UnsignedBigInt\n}\n\nmodel state {\n id Int @id @default(autoincrement()) @db.UnsignedTinyInt\n name_en String @db.VarChar(64)\n name_fr String @db.VarChar(64)\n abbrev String @db.VarChar(2)\n country String @db.VarChar(8)\n}\n\nmodel licence {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n nom String @db.VarChar(128)\n date String @db.VarChar(10)\n can_manage String @db.VarChar(64)\n comment String? @db.Text\n}\n\nmodel licence_key {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n licence_id Int @db.UnsignedInt\n licence_key String @db.Text\n date String @db.VarChar(10)\n date_expire String? @db.VarChar(10)\n comment String @db.Text\n\n @@index([licence_id], map: \"licence_id\")\n}\n\nmodel ip {\n id Int @id @default(autoincrement())\n service_id BigInt?\n ip String? @db.VarChar(32)\n prive String? @db.VarChar(32)\n ip_relais String? @db.VarChar(128)\n technology String? @db.VarChar(32)\n name_access_point String? @db.VarChar(64)\n mac String? @db.VarChar(32)\n web_link String? @db.VarChar(128)\n link_relais String? @db.VarChar(128)\n ip_conso Int @default(0) @db.TinyInt\n actif Int @default(1) @db.TinyInt\n comment String? @db.MediumText\n cidr String? @db.VarChar(32)\n last_updated DateTime @default(now()) @db.DateTime(0)\n\n @@index([ip], map: \"ip\")\n @@index([prive], map: \"prive\")\n @@index([service_id], map: \"service_id\")\n}\n\nmodel ip_admin {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n ip String @db.VarChar(20)\n comment String? @db.VarChar(128)\n}\n\nmodel ip_history {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n delivery_id Int @db.UnsignedInt\n service_id Int @db.UnsignedInt\n ip String @db.VarChar(32)\n date BigInt @db.UnsignedBigInt\n}\n\nmodel ip_pp {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n ip_prive String @db.VarChar(32)\n ip_public String @db.VarChar(32)\n date BigInt @db.UnsignedBigInt\n ip_id String @default(dbgenerated(\"(0)\")) @db.VarChar(64)\n}\n\nmodel ip_static {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n ip String @unique(map: \"ip\") @db.VarChar(32)\n static Boolean @default(false)\n reverse String? @db.VarChar(128)\n}\n\nmodel ip_targo {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n ip String @db.VarChar(15)\n cidr Int @db.UnsignedTinyInt\n comment String? @db.VarChar(128)\n}\n\n/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments\nmodel invoice {\n id BigInt @id @default(autoincrement())\n date_orig BigInt?\n process_status Int? @db.TinyInt\n billing_status Int? @db.TinyInt\n refund_status Int? @db.TinyInt\n print_status Int? @db.TinyInt\n account_id BigInt?\n total_amt Float?\n billed_amt Float?\n due_date BigInt?\n notes String? @db.MediumText\n template_message String? @db.MediumText\n email_status Int? @db.TinyInt\n working_order String? @db.VarChar(64)\n correction Int @default(0) @db.TinyInt\n ppa_charge Int @default(0) @db.TinyInt\n credit_code_id Int @default(0) @db.TinyInt\n\n @@index([account_id], map: \"account_id\")\n @@index([billing_status], map: \"billing_status\")\n @@index([date_orig], map: \"date_orig\")\n @@index([refund_status], map: \"refund_status\")\n}\n\n/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments\nmodel invoice_bk {\n id BigInt @id @default(autoincrement())\n date_orig BigInt?\n process_status Int? @db.TinyInt\n billing_status Int? @db.TinyInt\n refund_status Int? @db.TinyInt\n print_status Int? @db.TinyInt\n account_id BigInt?\n total_amt Float?\n billed_amt Float?\n due_date BigInt?\n notes String? @db.MediumText\n template_message String? @db.MediumText\n email_status Int? @db.TinyInt\n working_order String? @db.VarChar(64)\n correction Int @default(0) @db.TinyInt\n ppa_charge Int @default(0) @db.TinyInt\n credit_code_id Int @default(0) @db.TinyInt\n\n @@index([account_id], map: \"account_id\")\n @@index([billing_status], map: \"billing_status\")\n @@index([date_orig], map: \"date_orig\")\n @@index([refund_status], map: \"refund_status\")\n}\n\nmodel invoice_call {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date BigInt @db.UnsignedBigInt\n number String @db.VarChar(10)\n amount Float\n}\n\nmodel invoice_item {\n id BigInt @id @default(autoincrement())\n service_id BigInt?\n invoice_id BigInt?\n sku String? @db.VarChar(128)\n quantity Float @default(0)\n product_name String? @db.VarChar(512)\n unitary_price Float?\n nosub Boolean @default(false)\n delivery_name String? @db.VarChar(32)\n\n @@index([invoice_id], map: \"invoice_id\")\n}\n\nmodel invoice_item_bk {\n id BigInt @id @default(autoincrement())\n service_id BigInt?\n invoice_id BigInt?\n sku String? @db.VarChar(128)\n quantity Float @default(0)\n product_name String? @db.VarChar(512)\n unitary_price Float?\n nosub Boolean @default(false)\n delivery_name String? @db.VarChar(32)\n\n @@index([invoice_id], map: \"invoice_id\")\n}\n\nmodel invoice_msg_template {\n id BigInt @id @default(autoincrement())\n name String? @db.VarChar(32)\n message String? @db.MediumText\n}\n\nmodel invoice_tax {\n id BigInt @id @default(autoincrement())\n invoice_id BigInt?\n tax_name String? @db.VarChar(128)\n tax_description String? @db.VarChar(128)\n tax_rate Float?\n amount Float?\n\n @@index([invoice_id], map: \"invoice_id\")\n}\n\nmodel invoice_tax_bk {\n id BigInt @id @default(autoincrement())\n invoice_id BigInt?\n tax_name String? @db.VarChar(128)\n tax_description String? @db.VarChar(128)\n tax_rate Float?\n amount Float?\n\n @@index([invoice_id], map: \"invoice_id\")\n}\n\n/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments\nmodel accord_paiement {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n date_accord BigInt\n date_echeance BigInt\n date_coupure BigInt @db.UnsignedBigInt\n raison_changement String? @db.Text\n montant Decimal @db.Decimal(10, 2)\n method Int @default(0) @db.UnsignedTinyInt\n ferie Boolean @default(false)\n note String? @db.Text\n status Int @default(-1) @db.TinyInt\n staff_id Int @default(1) @db.UnsignedInt\n date_create String @db.VarChar(16)\n\n @@index([account_id], map: \"account_id\")\n}\n\nmodel autologin {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n token String @db.VarChar(32)\n date String @db.VarChar(16)\n staff Int @db.UnsignedInt\n}\n\nmodel statement {\n id BigInt @id @default(autoincrement())\n date BigInt?\n type String? @db.VarChar(2)\n number BigInt?\n reference String? @db.MediumText\n amt Float?\n paid_amt Float?\n}\n\nmodel intranet_doc {\n id BigInt @id @default(autoincrement())\n account_id BigInt\n date BigInt\n title String @db.VarChar(128)\n msg String @db.MediumText\n attachment String @db.VarChar(256)\n unread_csv String @db.MediumText\n path_id Int @db.UnsignedInt\n priority_order Int @default(1)\n update_timestamp DateTime @default(now()) @db.Timestamp(0)\n\n @@index([account_id], map: \"account_id\")\n @@index([path_id], map: \"path_id\")\n}\n\nmodel intranet_doc_paths {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n description String @db.VarChar(256)\n parent_id Int? @db.UnsignedInt\n priority_order Int @default(1)\n}\n\nmodel intranet_doc_reply {\n id BigInt @id @default(autoincrement())\n feed_id BigInt\n date BigInt\n account_id BigInt\n msg String @db.MediumText\n attachment BigInt @default(0)\n update_timestamp DateTime @default(now()) @db.Timestamp(0)\n}\n\nmodel intranet_feed {\n id BigInt @id @default(autoincrement())\n account_id BigInt\n date BigInt\n title String @db.VarChar(128)\n msg String @db.MediumText\n attachment String @db.VarChar(256)\n unread_csv String @db.MediumText\n}\n\nmodel intranet_feed_reply {\n id BigInt @id @default(autoincrement())\n feed_id BigInt\n date BigInt\n account_id BigInt\n msg String @db.MediumText\n attachment BigInt\n}\n\nmodel intranet_techniciens {\n id BigInt @id @default(autoincrement())\n account_id BigInt\n date BigInt\n title String @db.VarChar(128)\n msg String @db.MediumText\n attachment String @db.VarChar(256)\n unread_csv String @db.MediumText\n}\n\nmodel intranet_techniciens_reply {\n id BigInt @id @default(autoincrement())\n feed_id BigInt\n date BigInt\n account_id BigInt\n msg String @db.MediumText\n attachment BigInt\n}\n\nmodel intranet_techno {\n id BigInt @id @default(autoincrement())\n account_id BigInt\n date BigInt\n title String @db.VarChar(128)\n msg String @db.MediumText\n attachment String @db.VarChar(256)\n unread_csv String @db.MediumText\n}\n\nmodel intranet_techno_reply {\n id BigInt @id @default(autoincrement())\n feed_id BigInt\n date BigInt\n account_id BigInt\n msg String @db.MediumText\n attachment BigInt\n}\n\nmodel fibre {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n terrain String @db.VarChar(16)\n rue String @db.VarChar(128)\n ville String @db.VarChar(128)\n zip String @default(dbgenerated(\"()\")) @db.VarChar(7)\n ontid Int? @db.UnsignedInt\n sn String? @db.VarChar(32)\n tech Int @default(2) @db.UnsignedSmallInt\n info_connect String @default(dbgenerated(\"(172.17.0.2)\")) @db.VarChar(64)\n frame Int? @db.UnsignedTinyInt\n slot Int? @db.UnsignedTinyInt\n port Int? @db.UnsignedTinyInt\n vlan_manage Int? @db.UnsignedInt\n vlan_internet Int? @db.UnsignedInt\n vlan_telephone Int? @db.UnsignedInt\n vlan_tele Int? @db.UnsignedInt\n manage_service_id Int? @db.UnsignedInt\n internet_service_id Int? @db.UnsignedInt\n telephone_service_id Int? @db.UnsignedInt\n tele_service_id Int? @db.UnsignedInt\n service_id Int? @db.UnsignedInt\n nb_drop Int @default(0) @db.UnsignedInt\n placemarks_id BigInt? @db.UnsignedBigInt\n appartements_id BigInt? @db.UnsignedBigInt\n latitude Float? @db.Float\n longitude Float? @db.Float\n boitier_pas_install Int? @db.UnsignedTinyInt\n description String? @db.VarChar(50)\n suite Int @default(0) @db.UnsignedTinyInt\n distance Int? @db.UnsignedInt\n nb_portees Int? @db.UnsignedTinyInt\n\n @@index([appartements_id, sn], map: \"appartements_id\")\n @@index([info_connect, appartements_id, sn, slot, port], map: \"info_connect\")\n @@index([placemarks_id, sn], map: \"placemarks_id\")\n @@index([service_id], map: \"service_id\")\n}\n\nmodel fibre_olt {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n tech Int @db.UnsignedSmallInt\n ip String @db.VarChar(64)\n description String @db.VarChar(128)\n}\n\nmodel fibre_service_port {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n last_service_id Int @db.UnsignedInt\n}\n\nmodel fibre_suivi {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n customer_id String? @db.VarChar(32)\n first_name String @db.VarChar(64)\n last_name String @db.VarChar(64)\n address String @db.VarChar(128)\n city String @db.VarChar(128)\n zip String @db.VarChar(7)\n phone String @db.VarChar(10)\n email String? @db.VarChar(64)\n longitude Decimal @db.Decimal(12, 7)\n latitude Decimal @db.Decimal(12, 7)\n called Int @default(-1) @db.TinyInt\n create_by Int @default(0) @db.UnsignedInt\n note String @db.Text\n}\n\nmodel fibre_tech {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n description String @db.VarChar(128)\n}\n\nmodel fibre_videotron {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date String @db.VarChar(16)\n download String @default(dbgenerated(\"(0)\")) @db.VarChar(128)\n upload String @default(dbgenerated(\"(0)\")) @db.VarChar(128)\n ethernet String @default(dbgenerated(\"()\")) @db.VarChar(64)\n interface String @default(dbgenerated(\"()\")) @db.VarChar(128)\n}\n\nmodel gantt {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @default(0) @db.UnsignedInt\n name String? @db.VarChar(128)\n gantt String @db.Text\n closed Int @default(0) @db.TinyInt\n}\n\nmodel gantt_template {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n name String? @db.VarChar(128)\n gantt String @db.Text\n}\n\nmodel project {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n name String @db.VarChar(128)\n status String @db.VarChar(16)\n desc String? @db.Text\n date_start BigInt? @db.UnsignedBigInt\n date_end BigInt? @db.UnsignedBigInt\n manager_name String? @db.VarChar(64)\n}\n\nmodel project_cmd {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n project_id Int @db.UnsignedInt\n date BigInt @db.UnsignedBigInt\n vendeur String? @db.VarChar(128)\n no_cmd String? @db.VarChar(64)\n po String? @db.VarChar(32)\n staff_id Int @default(4667) @db.UnsignedInt\n\n @@index([project_id], map: \"project_id\")\n}\n\nmodel project_cmd_item {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n cmd_id Int @db.UnsignedInt\n product_id Int @default(0) @db.UnsignedInt\n desc String @db.Text\n qte Float\n price Float\n usd Boolean @default(false)\n recu Int @default(0) @db.TinyInt\n qte_recu Float @default(0)\n date_recu String? @db.VarChar(64)\n comment String? @db.VarChar(128)\n eta String? @db.VarChar(10)\n status Int @default(0) @db.UnsignedTinyInt\n\n @@index([cmd_id], map: \"cmd_id\")\n @@index([product_id], map: \"product_id\")\n}\n\nmodel project_manager_cat {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n pos Int @db.UnsignedTinyInt\n name String @db.VarChar(32)\n color String @default(dbgenerated(\"(ffffff)\")) @db.VarChar(7)\n text_color String @default(dbgenerated(\"(#000000)\")) @db.VarChar(7)\n}\n\nmodel project_manager_checklist {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n task_id Int @db.UnsignedInt\n ticket_id Int @db.UnsignedInt\n desc String @db.VarChar(128)\n poids Int @default(1) @db.UnsignedTinyInt\n done Int @default(0) @db.TinyInt\n\n @@index([task_id], map: \"task_id\")\n}\n\nmodel project_manager_comment {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n task_id Int @db.UnsignedInt\n comment String @db.Text\n staff_id Int @db.UnsignedInt\n date String @db.VarChar(16)\n unread String @db.Text\n\n @@index([task_id], map: \"task_id\")\n}\n\nmodel project_manager_task {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n category_id Int @db.UnsignedInt\n pos Int @db.UnsignedTinyInt\n titre String @db.VarChar(255)\n color String @default(dbgenerated(\"(#ffffff)\")) @db.VarChar(7)\n text_color String @default(dbgenerated(\"(#000000)\")) @db.VarChar(7)\n desc String @db.Text\n ticket_id String? @db.VarChar(16)\n date_start String? @db.VarChar(16)\n date_deadline String? @db.VarChar(16)\n deadline_watch Int @default(1) @db.UnsignedTinyInt\n assign_staff String? @db.Text\n priority Int @default(0) @db.UnsignedTinyInt\n done Boolean @default(false)\n create_by Int @db.UnsignedInt\n date_creation String? @db.VarChar(16)\n date_update String? @db.VarChar(16)\n\n @@index([category_id], map: \"category_id\")\n}\n\nmodel service {\n id BigInt @id @default(autoincrement())\n date_orig BigInt?\n date_suspended BigInt?\n date_next_invoice BigInt?\n date_last_invoice BigInt?\n delivery_id Int?\n device_id Int @default(0) @db.UnsignedInt\n product_id Int?\n comment String? @db.VarChar(255)\n payment_recurrence Int? @db.TinyInt\n status Int? @db.TinyInt\n hijack Int @default(0) @db.TinyInt\n hijack_price Float @default(0)\n hijack_desc String? @db.VarChar(512)\n hijack_download_speed BigInt?\n hijack_upload_speed BigInt?\n hijack_quota_day BigInt?\n hijack_quota_night BigInt?\n date_end_contract BigInt?\n actif_until BigInt?\n forfait_internet Int @default(0) @db.TinyInt\n radius_user String @db.VarChar(24)\n radius_pwd String @db.VarChar(16)\n radius_conso Boolean @default(false)\n\n @@index([date_orig], map: \"date_orig\")\n @@index([delivery_id], map: \"delivery_id\")\n @@index([device_id], map: \"device_id\")\n @@index([id, status], map: \"id\")\n @@index([product_id], map: \"product_id\")\n}\n\nmodel service_snapshot {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date BigInt @db.UnsignedBigInt\n account_id Int @db.UnsignedInt\n service_id Int @db.UnsignedInt\n quota_day BigInt @default(0) @db.UnsignedBigInt\n quota_night BigInt @default(0) @db.UnsignedBigInt\n\n @@index([account_id], map: \"account_id\")\n @@index([service_id], map: \"service_id\")\n}\n\nmodel soumission {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id BigInt\n name String @db.VarChar(64)\n po String? @db.VarChar(64)\n date String @db.VarChar(10)\n tax Int @db.UnsignedTinyInt\n materiel String? @db.LongText\n mensuel String? @db.LongText\n text String? @db.Text\n\n @@index([account_id], map: \"account_id\")\n}\n\nmodel soumission_template {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n name String @db.VarChar(64)\n materiel String @db.LongText\n mensuel String @db.LongText\n}\n\nmodel staff {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n status Int @db.TinyInt\n username String @unique(map: \"username\") @db.VarChar(32)\n password String @db.VarChar(128)\n vpn String @db.VarChar(64)\n first_name String @db.VarChar(64)\n last_name String @db.VarChar(64)\n email String @db.VarChar(64)\n ext String @db.VarChar(16)\n cell String @db.VarChar(16)\n gpin String? @db.VarChar(4)\n rights String @db.Text\n date_embauche String? @db.VarChar(20)\n fete String? @db.VarChar(16)\n supp String? @db.Text\n group_ad String @default(dbgenerated(\"()\")) @db.VarChar(64)\n dept_list String @db.Text\n notification String @db.Text\n darkmode Boolean @default(false)\n matricule_desjardins Int? @db.UnsignedInt\n compagnie_desjardins String? @db.VarChar(8)\n ldap_id Int?\n}\n\nmodel staff_dispo {\n id Int @id @default(autoincrement()) @db.TinyInt\n day_num Int @db.TinyInt\n staff_id Int?\n}\n\nmodel staff_supp {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n nom String @db.VarChar(64)\n staff_ids String @db.VarChar(128)\n}\n\nmodel tele_carte {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n delivery_id Int @unique(map: \"delivery_id\") @default(0) @db.UnsignedInt\n service_id Int @db.UnsignedInt\n channels String @db.Text\n}\n\nmodel tele_channel {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n proprio String @db.VarChar(128)\n poste String @db.VarChar(128)\n pack_min Int @default(0) @db.UnsignedTinyInt\n pack_redevance Decimal @default(0.00) @db.Decimal(5, 2)\n pack_prix_vendu Decimal @default(0.00) @db.Decimal(5, 2)\n carte_percentage Decimal @db.Decimal(5, 2)\n carte_redevance_min Decimal @db.Decimal(5, 2)\n carte_prix_vendu Decimal @db.Decimal(5, 2)\n monthly_min Decimal @default(0.00) @db.Decimal(5, 2)\n has_penetration_rate Int @default(0) @db.UnsignedTinyInt\n penetration_actuel Decimal @default(0.00) @db.Decimal(3, 2)\n is_commercial Int @default(0) @db.UnsignedTinyInt\n note String @db.Text\n epgId Int @default(0) @db.UnsignedInt\n uptele_no Int @db.UnsignedInt\n uptele_code String @db.VarChar(32)\n abbr String @db.VarChar(32)\n groupe_id Int @default(0) @db.UnsignedInt\n ccsa_packageID Int @db.UnsignedInt\n ccsa_desc String @db.VarChar(256)\n rapport_bell Int @default(0) @db.TinyInt\n}\n\nmodel tele_groupe {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n nom String @db.VarChar(128)\n small_desc String @db.VarChar(128)\n}\n\nmodel tele_network {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n network_name String @db.VarChar(128)\n fournisseur String @db.VarChar(128)\n}\n\nmodel tele_pack {\n id Int @id @default(autoincrement())\n product_id Int @db.UnsignedInt\n channels String @db.Text\n actif Boolean @default(true)\n ccsa_packageID Int @db.UnsignedInt\n ccsa_desc String @db.VarChar(256)\n rapport_bell Int @default(0) @db.TinyInt\n bell_name String? @db.VarChar(64)\n epgId Int? @db.UnsignedInt\n}\n\nmodel tele_penetration {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n id_channel Int @db.UnsignedInt\n percentage Decimal @db.Decimal(3, 2)\n prix Decimal @db.Decimal(10, 5)\n}\n\nmodel tele_sub_archive {\n id Int @id @default(autoincrement())\n date_archive String @db.VarChar(16)\n subs String @db.Text\n}\n\nmodel tele_wiz {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n delivery_id Int @db.UnsignedInt\n ticket_id Int @db.UnsignedInt\n nb_stb Int @db.UnsignedTinyInt\n credit Int @db.UnsignedTinyInt\n fbase Int @db.UnsignedInt\n fthem String @db.Text\n}\n\nmodel tv_mac {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n service_id Int @db.UnsignedInt\n mac String @db.VarChar(12)\n}\n\nmodel ticket {\n id Int @id @default(autoincrement())\n ost_id Int? @db.UnsignedInt\n parent BigInt @default(0)\n account_id Int?\n delivery_id Int @default(0)\n bon_id Int? @db.UnsignedInt\n subject String? @db.VarChar(256)\n dept_id Int?\n open_by Int @default(1)\n email_from String @db.VarChar(128)\n assign_to Int @default(0)\n status String @default(dbgenerated(\"(open)\")) @db.VarChar(32)\n due_date BigInt @default(0)\n due_time String @default(dbgenerated(\"(day)\")) @db.VarChar(8)\n date_create BigInt?\n last_update BigInt?\n date_closed String @default(dbgenerated(\"()\")) @db.VarChar(16)\n pending_to_open BigInt @default(0) @db.UnsignedBigInt\n waiting_for BigInt? @db.UnsignedBigInt\n lock_name String @db.VarChar(64)\n public Boolean? @default(false)\n priority Int @default(2) @db.TinyInt\n install_success Int @default(0) @db.TinyInt\n wizard String? @db.Text\n wizard_fibre String? @db.VarChar(64)\n important Int @default(0) @db.TinyInt\n followed_by String @db.Text\n participant String @db.Text\n update_timestamp DateTime @default(now()) @db.Timestamp(0)\n closed_by Int @default(0) @db.UnsignedInt\n\n @@index([account_id], map: \"account_id\")\n @@index([assign_to], map: \"assign_to\")\n @@index([dept_id], map: \"dept_id\")\n}\n\nmodel ticket_calendar_lock {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date_lock BigInt @default(0) @db.UnsignedBigInt\n dept_id Int @default(12) @db.UnsignedInt\n nb_install Int @default(0) @db.UnsignedSmallInt\n create_by Int @db.UnsignedInt\n update_by Int @db.UnsignedInt\n last_update DateTime @default(now()) @db.Timestamp(0)\n\n @@unique([date_lock, dept_id], map: \"date_dept\")\n}\n\nmodel ticket_calendar_staff_lock {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date BigInt\n staff_id Int @db.UnsignedInt\n}\n\nmodel ticket_conge {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n name String @db.VarChar(128)\n date BigInt @db.UnsignedBigInt\n desc String @db.VarChar(255)\n ticket_id Int? @db.UnsignedInt\n\n @@index([account_id], map: \"account_id\")\n}\n\nmodel ticket_dept {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n parent Int @default(0)\n name String @unique(map: \"name\") @default(dbgenerated(\"()\")) @db.VarChar(32)\n hasChild Int @default(0) @db.SmallInt\n email String @db.VarChar(64)\n manager_id Int @default(0) @db.UnsignedInt\n member_only Boolean @default(false)\n protected Boolean @default(false)\n default_staff Int @default(0) @db.UnsignedInt\n default_follow String @default(dbgenerated(\"(0)\")) @db.VarChar(64)\n}\n\nmodel ticket_msg {\n id Int @id @default(autoincrement())\n ticket_id Int\n staff_id Int @default(0)\n msg String? @db.MediumText\n date_orig BigInt?\n unread_csv String @db.MediumText\n public Boolean? @default(false)\n important Int @default(0) @db.TinyInt\n update_timestamp DateTime @default(now()) @db.Timestamp(0)\n\n @@index([staff_id], map: \"staff_id\")\n @@index([ticket_id], map: \"ticket_id\")\n}\n\nmodel ticket_template {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n name String @db.VarChar(128)\n template String @db.Text\n}\n\n/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.\nmodel tmp {\n id Int @db.UnsignedInt\n prive String @db.VarChar(20)\n public String @db.VarChar(20)\n\n @@ignore\n}\n\nmodel tmp_vpn {\n id Int @id\n username String @db.VarChar(64)\n password String @db.VarChar(64)\n ad_done Boolean @default(false)\n tacacs Boolean @default(false)\n m Int @default(2000) @db.UnsignedInt\n}\n\nmodel bon_travail {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date BigInt? @db.UnsignedBigInt\n account_id Int @db.UnsignedInt\n tech1 Int? @db.UnsignedInt\n heure_arrive_t1 String? @db.VarChar(10)\n heure_depart_t1 String? @db.VarChar(10)\n tech2 Int? @db.UnsignedInt\n heure_arrive_t2 String? @db.VarChar(10)\n heure_depart_t2 String? @db.VarChar(10)\n note String? @db.Text\n subtotal Decimal? @db.Decimal(10, 2)\n tps Decimal? @db.Decimal(10, 2)\n tvq Decimal? @db.Decimal(10, 2)\n total Decimal? @db.Decimal(10, 2)\n}\n\nmodel bon_travail_item {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n bon_id Int @db.UnsignedInt\n product_id Int @db.UnsignedInt\n qte Int\n price Decimal @db.Decimal(10, 2)\n desc String @db.Text\n}\n\nmodel checklist_relais {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n site_id Int @unique(map: \"site_id\") @db.UnsignedInt\n site_name String? @db.VarChar(128)\n account_id Int @db.UnsignedInt\n priority Int @default(2) @db.UnsignedTinyInt\n done Int @default(0) @db.UnsignedTinyInt\n equipement String? @db.Text\n connecteur String? @db.Text\n grounding String? @db.Text\n surge_lightning String? @db.Text\n switch_poe String? @db.Text\n switch_giga_shield String? @db.Text\n batterie String? @db.Text\n solidity String? @db.Text\n redondance String? @db.Text\n antenne_58_360 String? @db.Text\n antenne_24_360 String? @db.Text\n rspro_maj String? @db.Text\n boite String? @db.Text\n cable String? @db.Text\n staros_ubnt String? @db.Text\n autre String? @db.Text\n}\n\n/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments\nmodel conference {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n room_id Int @db.UnsignedInt\n time_start String @db.VarChar(16)\n time_end String @db.VarChar(16)\n name String @db.VarChar(128)\n description String? @db.Text\n host Int @db.UnsignedInt\n participant String @db.Text\n}\n\nmodel conference_room {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n name String @db.VarChar(128)\n status Int @default(1) @db.TinyInt\n location String? @db.VarChar(128)\n description String? @db.Text\n}\n\nmodel fournisseur {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n nom String @db.VarChar(128)\n email String @db.VarChar(64)\n actif Boolean @default(true)\n}\n\nmodel notice_gui {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n staff_id Int @db.UnsignedInt\n message String @db.Text\n is_read Int @default(0)\n timestamp String @db.VarChar(10)\n}\n\nmodel promo {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n name String? @db.VarChar(64)\n desc String? @db.Text\n date_start BigInt? @db.UnsignedBigInt\n date_end BigInt? @db.UnsignedBigInt\n date_orig BigInt?\n visible_until BigInt?\n actif Int @default(0) @db.TinyInt\n}\n\nmodel stbs {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n mac String @unique(map: \"mac\") @db.VarChar(32)\n sn String @db.VarChar(32)\n targo String? @db.VarChar(16)\n}\n\nmodel tech_dispo {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n date BigInt @unique(map: \"date\") @db.UnsignedBigInt\n tech Int? @db.UnsignedInt\n}\n\nenum phone_addr_enhanced_capable {\n Y\n N\n}\n\n/// ************** DEPRECATED ********************************************\nmodel debug {\n id BigInt @id @default(autoincrement())\n autor String? @db.VarChar(32)\n url String? @db.VarChar(128)\n date_last BigInt?\n desc String? @db.MediumText\n note4autor String? @db.MediumText\n note4dev String? @db.MediumText\n status String? @db.VarChar(64)\n}\n\nmodel carte_temps {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n week Int @db.UnsignedTinyInt\n year Int? @db.UnsignedInt\n date BigInt @db.UnsignedBigInt\n staff_id BigInt @db.UnsignedBigInt\n start_am BigInt? @db.UnsignedBigInt\n end_am BigInt? @db.UnsignedBigInt\n start_pm BigInt? @db.UnsignedBigInt\n end_pm BigInt? @db.UnsignedBigInt\n start_night BigInt? @db.UnsignedBigInt\n end_night BigInt? @db.UnsignedBigInt\n relais Float?\n comment String? @db.Text\n note_int String? @db.Text\n conge Int @default(0) @db.UnsignedTinyInt\n appr String? @db.VarChar(8)\n appr_dir String? @db.VarChar(8)\n\n @@index([staff_id], map: \"staff_id\")\n}\n\nmodel carte_temps_periode {\n id Int @id @default(autoincrement()) @db.UnsignedSmallInt\n debut String @db.VarChar(16)\n fin String @db.VarChar(16)\n paid String @db.VarChar(16)\n periode Int @db.UnsignedTinyInt\n annee Int @db.UnsignedSmallInt\n}\n\nmodel banque_heure_staff {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n staff_id Int @db.UnsignedInt\n week Int @db.UnsignedTinyInt\n year Int @db.UnsignedSmallInt\n sunday String? @db.VarChar(16)\n heure Float\n\n @@index([staff_id], map: \"staff_id\")\n}\n\nmodel hour_bank {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id BigInt @db.UnsignedBigInt\n remaining_time Int @default(0)\n expiration_date BigInt @default(0) @db.UnsignedBigInt\n note String? @db.MediumText\n recurrence Int @default(0) @db.UnsignedTinyInt\n reset_value Int @default(0) @db.UnsignedSmallInt\n\n @@index([account_id], map: \"account_id\")\n}\n\nmodel hour_bank_detail {\n id Int @id @default(autoincrement())\n hour_id Int\n staff_id BigInt? @db.UnsignedBigInt\n date_orig BigInt @db.UnsignedBigInt\n used_time Int @default(0) @db.SmallInt\n ticket_id BigInt? @db.UnsignedBigInt\n working_order String? @db.VarChar(16)\n detail String? @db.MediumText\n\n @@index([hour_id], map: \"hour_id\")\n}\n\nmodel test {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n text String @db.Text\n c2 Int @default(1)\n}\n\n//this table is for CSS class only, no other uses\nmodel account_memo_template {\n id Int @id @default(autoincrement())\n name String @db.VarChar(32)\n color String @db.VarChar(6)\n bcolor String @db.VarChar(6)\n border String @default(dbgenerated(\"(000000)\")) @db.VarChar(6)\n}\n\n//not used\nmodel notes {\n id Int @id @default(autoincrement())\n account_id Int @db.UnsignedInt\n notes String @db.MediumText\n}\n\n//NOT USED\nmodel email {\n id Int @id @default(autoincrement())\n account_id BigInt?\n email String? @db.VarChar(128)\n password String? @db.VarChar(128)\n}\n\n//not relevant to ticket module\nmodel client_pwd {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n date BigInt @db.UnsignedBigInt\n uid String @db.VarChar(32)\n used Boolean @default(false)\n}\n\n//NO USES FOR TICKETING PURPOSES\nmodel account_profile {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @db.UnsignedInt\n profile_id String @db.VarChar(64)\n address_id String @db.VarChar(64)\n card_id String @db.VarChar(64)\n token String @db.VarChar(32)\n initial_transaction String @db.VarChar(128)\n}\n\n//not relevant to ticket module\nmodel deposit_slip {\n id Int @id @default(autoincrement())\n customer_id String? @db.VarChar(32)\n name String? @db.VarChar(512)\n amount Float @default(0)\n type String @db.VarChar(32)\n desc String? @db.VarChar(255)\n date BigInt? @db.UnsignedBigInt\n}\n\n//this table display suspended account\nmodel account_suspension {\n id Int @id @default(autoincrement()) @db.UnsignedInt\n account_id Int @unique(map: \"account_id\") @db.UnsignedInt\n date_start BigInt @db.UnsignedBigInt\n date_end BigInt @db.UnsignedBigInt\n note String @db.VarChar(128)\n}\n", "runtimeDataModel": { "models": {}, "enums": {}, @@ -28,7 +28,7 @@ const config: runtime.GetPrismaClientConfig = { } } -config.runtimeDataModel = JSON.parse("{\"models\":{\"account\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"customer_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_last\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_expire\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"language_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"currency_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"group_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"misc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"first_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"middle_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"last_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mandataire\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email_autre\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"company\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"contact\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address1\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address2\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"city\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"zip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tel_home\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tel_office\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tel_office_ext\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"cell\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fax\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"invoice_delivery\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"land_owner\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"frais\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"ppa\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"ppa_all_invoice\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ppa_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ppa_code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ppa_branch\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ppa_account\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ppa_amount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"ppa_amount_buffer\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"ppa_all_tmp\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ppa_fixed\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"commercial\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"vip\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"tax_group\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"data_check\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"created_by\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"notes_client\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"keyword\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"terminate_reason\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"terminate_cie\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"terminate_note\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"terminate_date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"call\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"pub\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"portal_client_log\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"mauvais_payeur\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"renew_phone\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"ppa_cc\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"stripe_id\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"account_group\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"group_name\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"account_memo\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"last_updated\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"memo\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"color\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bcolor\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"border\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"compta_comptes\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"category\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"num_compte\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"compta_comptes_soldes\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"num_compte\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"year\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"compta_journal_ecriture\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"num\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"customer_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"full_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mo\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"em\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"compta_journal_ecriture_bk\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"num\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"customer_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"full_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mo\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"em\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"compta_journal_ecriture_detail\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"journal_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"num_compte\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"action\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"compta_journal_ecriture_detail_bk\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"journal_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"num_compte\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"action\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"compta_periode\":{\"fields\":[{\"name\":\"month\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"compta_ppa_file_id\":{\"fields\":[{\"name\":\"last_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"compta_setup\":{\"fields\":[{\"name\":\"setup_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"period_month\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ppa_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"excedent_max\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"month_closed\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"pay_week_closed\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"attachment_ext\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"netadmin_dispo\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"imap_token\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"credit_code\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tax\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rate\",\"kind\":\"scalar\",\"type\":\"Float\"}],\"dbName\":null},\"tax_group\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tax\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"td_payable\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ticket_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"invoice\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_invoice\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fournisseur\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"montant\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"devise\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"methode\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"reference\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_paiement\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"releve\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"conso\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"ip_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"total\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"total_day\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"total_night\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"conso_archive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"ip_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"total\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"total_day\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"total_night\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"conso_avis\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ip_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"avis\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"conso_radius\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"download\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"upload\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"nb_sess\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"conso_radius_daily\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"download_nuit\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"upload_nuit\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"download_jour\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"upload_jour\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"conso_radius_daily2\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"download_nuit\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"upload_nuit\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"download_jour\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"upload_jour\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"conso_radius_hourly\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"download\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"upload\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"conso_radius_monthly\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"nuit\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"jour\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"conso_radius_monthly2\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"nuit\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"jour\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"delivery\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"address1\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address2\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"city\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"zip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"longitude\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"latitude\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"tel_home\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tel_office\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tel_office_ext\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"cell\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fax\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"quota_max_day\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"quota_max_night\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"contact\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expanded\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"placemarks_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"epg_subid\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"delivery_history\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"address1\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address2\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"city\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"zip\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"device\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"category\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"manufacturier\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"model\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sn\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mac\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"manage\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"port\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"protocol\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"manage_cli\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"port_cli\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"protocol_cli\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"pass\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"parent\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"device_archive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"category\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"manufacturier\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"model\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sn\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mac\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"manage\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"port\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"protocol\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"manage_cli\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"port_cli\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"protocol_cli\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"pass\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"parent\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"device_attr\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"device_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"attr\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"value\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"device_link\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"parent\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"child\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"device_template\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nom\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"device_template_attr\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"template_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"attr\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"default_val\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"product\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"sku\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"active\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"price\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"price_recurr_type\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"price_recurr_weekday\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"price_recurr_week\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"price_recurr_schedule\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"download_speed\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"upload_speed\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"night_package\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"quota_day\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"quota_night\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"category\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"uniq_charge\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"commercial\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"portal_hidden\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"inv_keep\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"inv_tag\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"inv_threshold\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inv_qte\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"emplacement\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"list_tech\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"combo_ready\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"fibre_lineprofile\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fibre_serviceprofile\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"product_cat\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"notes\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"num_compte\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"combo_dispo\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"product_format\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product_idx\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"product_fournisseur\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nom_fournisseur\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"prix_us\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"prix_achat\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"prix_livr\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"delais_livr\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"product_profile\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"device_type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"line_profile\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_profile\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"product_speciaux\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"product_zone_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"product_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"price\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"price_install\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"exp_timestamp\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"duree_contrat\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"product_translate\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"language_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description_short\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description_full\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"product_zone\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"zoneNumber\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"product_zone_placemarks\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"product_zone_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"placemarks_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"inventaire_log\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"prod_tag\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"action\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"qte\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timestamp\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"phone\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phone_num\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fournisseur\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"phone_addr\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"street_number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"apt\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"street_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"city\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"zip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"first_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"last_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"info\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"enhanced_capable\",\"kind\":\"enum\",\"type\":\"phone_addr_enhanced_capable\"},{\"name\":\"code_cauca\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"class_service\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"phone_comwave\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"requestId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phoneNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"reason\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"phone_note\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rate_center\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fournisseur\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"phone_provisioning\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"app\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mac\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"internationnal\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_update\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"phonecall_channel\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timestamp\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"max_tinktell\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"max_outgoing_thinktell\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"max_comwave\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"max_outgoing_comwave\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"max_total\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"phonecall_log_2025\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"caller_id_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"caller_id_number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"destination_number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"start_stamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"answer_stamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"end_stamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"duration\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"billing\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"hangup_cause\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"uuid\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"phonecall_log_2026\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"caller_id_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"caller_id_number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"destination_number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"start_stamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"answer_stamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"end_stamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"duration\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"billing\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"hangup_cause\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"uuid\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"voicemeup\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"duration\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"destination\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"district\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"uuid\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"pbx\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"vm_password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"has_vm\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"vm_email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"keep_msg\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"vm_disk_quota\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"int_code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"language\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"call_911\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"max_calls\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"call_timeout\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"user_context\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country_whitelist\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_origin\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_update\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"update_by\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"pbx_app\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"pbx_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mac\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"app\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_origin\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_update\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"update_by\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"pbx_com\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"failover\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"auth_method\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"int_code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country_whitelist\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"language\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"call_911\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"max_calls\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"user_context\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_origin\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_update\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"update_by\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"pbx_com_wl\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country_whitelist\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"pbx_fax\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"payment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"applied_amt\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"memo\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"reference\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"excedent\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"correction\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"cr\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"uniqsess\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"payment_item\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"payment_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"invoice_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"passwords_manager\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"login\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"pass\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"url\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"category\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"subcategory\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"notes\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"logs\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_last\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"users_granted\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"group_granted\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"created_by\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"keywords\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"passwords_manager_cat\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"passwords_manager_group\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"users\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"notification\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"endpoint\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"authToken\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"publicKey\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"contentEncoding\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"plateforme\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"notification_payload\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"notification_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"payload\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"timestamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"municipalite\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nom\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"administration\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"often_used\",\"kind\":\"scalar\",\"type\":\"Boolean\"}],\"dbName\":null},\"sommaire_porte\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"fibre_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"id_adresse\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"id_subvention\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"adresse_subvention\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ville_subvention\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"latitude\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"longitude\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"contest_adresse\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"new_adresse\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"placemarks_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"state\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name_en\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name_fr\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"abbrev\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"licence\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nom\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"can_manage\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"licence_key\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"licence_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"licence_key\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_expire\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ip\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"ip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"prive\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ip_relais\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"technology\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name_access_point\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mac\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"web_link\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"link_relais\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ip_conso\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"actif\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"cidr\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"last_updated\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"ip_admin\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ip_history\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"ip_pp\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ip_prive\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ip_public\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"ip_id\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ip_static\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"static\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"reverse\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ip_targo\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"cidr\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"invoice\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"process_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"billing_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"refund_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"print_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"total_amt\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"billed_amt\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"due_date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"notes\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"template_message\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"working_order\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"correction\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ppa_charge\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"credit_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"invoice_bk\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"process_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"billing_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"refund_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"print_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"total_amt\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"billed_amt\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"due_date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"notes\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"template_message\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"working_order\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"correction\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ppa_charge\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"credit_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"invoice_call\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"}],\"dbName\":null},\"invoice_item\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"invoice_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"sku\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"quantity\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"product_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unitary_price\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"nosub\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"delivery_name\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"invoice_item_bk\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"invoice_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"sku\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"quantity\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"product_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unitary_price\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"nosub\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"delivery_name\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"invoice_msg_template\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"message\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"invoice_tax\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"invoice_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"tax_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tax_description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tax_rate\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"}],\"dbName\":null},\"invoice_tax_bk\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"invoice_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"tax_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tax_description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tax_rate\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"}],\"dbName\":null},\"accord_paiement\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_accord\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_echeance\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_coupure\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"raison_changement\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"montant\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"method\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ferie\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_create\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"autologin\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"staff\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"statement\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"number\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"reference\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"amt\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"paid_amt\",\"kind\":\"scalar\",\"type\":\"Float\"}],\"dbName\":null},\"intranet_doc\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unread_csv\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"path_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"priority_order\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"update_timestamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"intranet_doc_paths\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"parent_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"priority_order\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"intranet_doc_reply\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"feed_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"update_timestamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"intranet_feed\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unread_csv\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"intranet_feed_reply\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"feed_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"intranet_techniciens\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unread_csv\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"intranet_techniciens_reply\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"feed_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"intranet_techno\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unread_csv\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"intranet_techno_reply\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"feed_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"fibre\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"terrain\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rue\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ville\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"zip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ontid\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"sn\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tech\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"info_connect\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"frame\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"slot\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"port\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"vlan_manage\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"vlan_internet\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"vlan_telephone\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"vlan_tele\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"manage_service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"internet_service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"telephone_service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"tele_service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nb_drop\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"placemarks_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"appartements_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"latitude\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"longitude\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"boitier_pas_install\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"suite\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"distance\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nb_portees\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"fibre_olt\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"tech\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"fibre_service_port\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"last_service_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"fibre_suivi\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"customer_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"first_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"last_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"city\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"zip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"longitude\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"latitude\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"called\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"create_by\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"fibre_tech\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"fibre_videotron\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"download\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"upload\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ethernet\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"interface\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"gantt\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"gantt\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"closed\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"gantt_template\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"gantt\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"project\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_start\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_end\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"manager_name\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"project_cmd\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"project_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"vendeur\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"no_cmd\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"po\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"project_cmd_item\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"cmd_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"qte\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"price\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"usd\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"recu\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"qte_recu\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"date_recu\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"eta\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"project_manager_cat\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"pos\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"color\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"text_color\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"project_manager_checklist\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"task_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ticket_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"poids\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"done\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"project_manager_comment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"task_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unread\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"project_manager_task\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"category_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"pos\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"titre\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"color\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"text_color\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ticket_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_start\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_deadline\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"deadline_watch\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"assign_staff\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"priority\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"done\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"create_by\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_creation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_update\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"service\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_suspended\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_next_invoice\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_last_invoice\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"device_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"payment_recurrence\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"hijack\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"hijack_price\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"hijack_desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"hijack_download_speed\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"hijack_upload_speed\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"hijack_quota_day\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"hijack_quota_night\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_end_contract\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"actif_until\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"forfait_internet\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"radius_user\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"radius_pwd\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"radius_conso\",\"kind\":\"scalar\",\"type\":\"Boolean\"}],\"dbName\":null},\"service_snapshot\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"quota_day\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"quota_night\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"soumission\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"po\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tax\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"materiel\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mensuel\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"text\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"soumission_template\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"materiel\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mensuel\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"staff\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"vpn\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"first_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"last_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ext\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"cell\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"gpin\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rights\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_embauche\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fete\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"supp\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"group_ad\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"dept_list\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"notification\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"darkmode\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"matricule_desjardins\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"compagnie_desjardins\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ldap_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"staff_dispo\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"day_num\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"staff_supp\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nom\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"staff_ids\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tele_carte\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"channels\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tele_channel\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"proprio\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"poste\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"pack_min\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"pack_redevance\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"pack_prix_vendu\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"carte_percentage\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"carte_redevance_min\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"carte_prix_vendu\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"monthly_min\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"has_penetration_rate\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"penetration_actuel\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"is_commercial\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"epgId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"uptele_no\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"uptele_code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"abbr\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"groupe_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ccsa_packageID\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ccsa_desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rapport_bell\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"tele_groupe\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nom\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"small_desc\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tele_network\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"network_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fournisseur\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tele_pack\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"channels\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"actif\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"ccsa_packageID\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ccsa_desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rapport_bell\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bell_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"epgId\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"tele_penetration\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"id_channel\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"percentage\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"prix\",\"kind\":\"scalar\",\"type\":\"Decimal\"}],\"dbName\":null},\"tele_sub_archive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_archive\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"subs\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tele_wiz\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ticket_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nb_stb\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"credit\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"fbase\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"fthem\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tv_mac\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"mac\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ticket\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"ost_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"parent\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"bon_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"subject\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"dept_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"open_by\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"email_from\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"assign_to\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"due_date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"due_time\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_create\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"last_update\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_closed\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"pending_to_open\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"waiting_for\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"lock_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"public\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"priority\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"install_success\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"wizard\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"wizard_fibre\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"important\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"followed_by\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"participant\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"update_timestamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"closed_by\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"ticket_calendar_lock\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_lock\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"dept_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nb_install\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"create_by\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"update_by\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"last_update\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"ticket_calendar_staff_lock\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"ticket_conge\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ticket_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"ticket_dept\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"parent\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"hasChild\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"manager_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"member_only\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"protected\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"default_staff\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"default_follow\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ticket_msg\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"ticket_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"unread_csv\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"public\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"important\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"update_timestamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"ticket_template\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"template\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tmp_vpn\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ad_done\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"tacacs\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"m\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"bon_travail\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"tech1\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"heure_arrive_t1\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"heure_depart_t1\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tech2\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"heure_arrive_t2\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"heure_depart_t2\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"subtotal\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"tps\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"tvq\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"total\",\"kind\":\"scalar\",\"type\":\"Decimal\"}],\"dbName\":null},\"bon_travail_item\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bon_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"qte\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"price\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"checklist_relais\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"site_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"site_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"priority\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"done\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"equipement\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"connecteur\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"grounding\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"surge_lightning\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"switch_poe\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"switch_giga_shield\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"batterie\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"solidity\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"redondance\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"antenne_58_360\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"antenne_24_360\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rspro_maj\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"boite\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"cable\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"staros_ubnt\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"autre\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"conference\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"room_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"time_start\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"time_end\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"host\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"participant\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"conference_room\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"location\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"fournisseur\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nom\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"actif\",\"kind\":\"scalar\",\"type\":\"Boolean\"}],\"dbName\":null},\"notice_gui\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"message\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"is_read\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timestamp\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"promo\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_start\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_end\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"visible_until\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"actif\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"stbs\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"mac\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sn\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"targo\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tech_dispo\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"tech\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"debug\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"autor\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"url\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_last\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"note4autor\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"note4dev\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"carte_temps\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"week\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"year\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"start_am\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"end_am\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"start_pm\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"end_pm\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"start_night\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"end_night\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"relais\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"note_int\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"conge\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"appr\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"appr_dir\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"carte_temps_periode\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"debut\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fin\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"paid\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"periode\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"annee\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"banque_heure_staff\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"week\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"year\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"sunday\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"heure\",\"kind\":\"scalar\",\"type\":\"Float\"}],\"dbName\":null},\"hour_bank\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"remaining_time\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"expiration_date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"recurrence\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"reset_value\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"hour_bank_detail\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"hour_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"used_time\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ticket_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"working_order\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"detail\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"test\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"text\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"c2\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"account_memo_template\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"color\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bcolor\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"border\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"notes\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"notes\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"email\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"client_pwd\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"uid\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"used\",\"kind\":\"scalar\",\"type\":\"Boolean\"}],\"dbName\":null},\"account_profile\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"profile_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"card_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"initial_transaction\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"deposit_slip\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"customer_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"account_suspension\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_start\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_end\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"account\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"customer_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_last\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_expire\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"language_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"currency_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"group_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"misc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"first_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"middle_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"last_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mandataire\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email_autre\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"company\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"contact\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address1\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address2\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"city\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"zip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tel_home\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tel_office\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tel_office_ext\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"cell\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fax\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"invoice_delivery\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"land_owner\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"frais\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"ppa\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"ppa_all_invoice\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ppa_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ppa_code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ppa_branch\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ppa_account\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ppa_amount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"ppa_amount_buffer\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"ppa_all_tmp\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ppa_fixed\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"commercial\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"vip\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"tax_group\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"data_check\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"created_by\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"notes_client\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"keyword\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"terminate_reason\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"terminate_cie\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"terminate_note\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"terminate_date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"call\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"pub\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"portal_client_log\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"mauvais_payeur\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"renew_phone\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"ppa_cc\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"stripe_id\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"account_group\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"group_name\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"account_memo\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"last_updated\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"memo\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"color\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bcolor\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"border\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"compta_comptes\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"category\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"num_compte\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"compta_comptes_soldes\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"num_compte\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"year\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"compta_journal_ecriture\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"num\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"customer_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"full_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mo\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"em\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"compta_journal_ecriture_bk\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"num\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"customer_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"full_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mo\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"em\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"compta_journal_ecriture_detail\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"journal_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"num_compte\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"action\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"compta_journal_ecriture_detail_bk\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"journal_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"num_compte\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"action\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"compta_periode\":{\"fields\":[{\"name\":\"month\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"compta_ppa_file_id\":{\"fields\":[{\"name\":\"last_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"compta_setup\":{\"fields\":[{\"name\":\"setup_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"period_month\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ppa_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"excedent_max\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"month_closed\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"pay_week_closed\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"attachment_ext\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"netadmin_dispo\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"imap_token\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"credit_code\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tax\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rate\",\"kind\":\"scalar\",\"type\":\"Float\"}],\"dbName\":null},\"tax_group\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tax\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"td_payable\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ticket_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"invoice\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_invoice\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fournisseur\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"montant\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"devise\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"methode\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"reference\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_paiement\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"releve\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"conso\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"ip_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"total\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"total_day\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"total_night\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"conso_archive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"ip_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"total\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"total_day\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"total_night\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"conso_avis\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ip_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"avis\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"conso_radius\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"download\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"upload\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"nb_sess\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"conso_radius_daily\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"download_nuit\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"upload_nuit\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"download_jour\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"upload_jour\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"conso_radius_daily2\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"download_nuit\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"upload_nuit\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"download_jour\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"upload_jour\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"conso_radius_hourly\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"download\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"upload\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"conso_radius_monthly\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"nuit\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"jour\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"conso_radius_monthly2\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"nuit\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"jour\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"delivery\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"address1\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address2\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"city\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"zip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"longitude\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"latitude\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"tel_home\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tel_office\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tel_office_ext\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"cell\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fax\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"quota_max_day\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"quota_max_night\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"contact\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expanded\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"placemarks_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"epg_subid\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"delivery_history\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"address1\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address2\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"city\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"zip\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"device\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"category\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"manufacturier\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"model\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sn\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mac\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"manage\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"port\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"protocol\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"manage_cli\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"port_cli\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"protocol_cli\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"pass\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"parent\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"device_archive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"category\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"manufacturier\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"model\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sn\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mac\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"manage\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"port\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"protocol\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"manage_cli\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"port_cli\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"protocol_cli\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"pass\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"parent\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"device_attr\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"device_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"attr\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"value\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"device_link\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"parent\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"child\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"device_template\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nom\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"device_template_attr\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"template_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"attr\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"default_val\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"product\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"sku\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"active\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"price\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"price_recurr_type\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"price_recurr_weekday\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"price_recurr_week\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"price_recurr_schedule\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"download_speed\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"upload_speed\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"night_package\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"quota_day\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"quota_night\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"category\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"uniq_charge\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"commercial\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"portal_hidden\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"inv_keep\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"inv_tag\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"inv_threshold\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inv_qte\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"emplacement\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"list_tech\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"combo_ready\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"fibre_lineprofile\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fibre_serviceprofile\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"product_cat\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"notes\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"num_compte\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"combo_dispo\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"product_format\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product_idx\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"product_fournisseur\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nom_fournisseur\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"prix_us\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"prix_achat\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"prix_livr\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"delais_livr\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"product_profile\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"device_type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"line_profile\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_profile\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"product_speciaux\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"product_zone_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"product_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"price\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"price_install\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"exp_timestamp\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"duree_contrat\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"product_translate\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"language_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description_short\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description_full\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"product_zone\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"zoneNumber\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"product_zone_placemarks\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"product_zone_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"placemarks_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"inventaire_log\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"prod_tag\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"action\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"qte\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timestamp\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"phone\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phone_num\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fournisseur\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"phone_addr\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"street_number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"apt\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"street_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"city\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"zip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"first_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"last_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"info\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"enhanced_capable\",\"kind\":\"enum\",\"type\":\"phone_addr_enhanced_capable\"},{\"name\":\"code_cauca\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"class_service\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"phone_comwave\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"requestId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phoneNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"reason\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"phone_note\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rate_center\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fournisseur\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"phone_provisioning\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"app\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mac\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"internationnal\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_update\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"phonecall_channel\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timestamp\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"max_tinktell\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"max_outgoing_thinktell\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"max_comwave\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"max_outgoing_comwave\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"max_total\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"phonecall_log_2025\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"caller_id_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"caller_id_number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"destination_number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"start_stamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"answer_stamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"end_stamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"duration\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"billing\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"hangup_cause\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"uuid\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"phonecall_log_2026\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"caller_id_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"caller_id_number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"destination_number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"start_stamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"answer_stamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"end_stamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"duration\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"billing\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"hangup_cause\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"uuid\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"voicemeup\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"duration\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"destination\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"district\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"uuid\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"pbx\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"vm_password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"has_vm\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"vm_email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"keep_msg\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"vm_disk_quota\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"int_code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"language\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"call_911\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"max_calls\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"call_timeout\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"user_context\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country_whitelist\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_origin\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_update\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"update_by\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"pbx_app\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"pbx_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mac\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"app\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_origin\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_update\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"update_by\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"pbx_com\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"failover\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"auth_method\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"int_code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country_whitelist\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"language\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"call_911\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"max_calls\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"user_context\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_origin\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_update\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"update_by\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"pbx_com_wl\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country_whitelist\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"pbx_fax\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"payment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"applied_amt\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"memo\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"reference\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"excedent\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"correction\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"cr\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"uniqsess\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"payment_item\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"payment_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"invoice_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"passwords_manager\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"login\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"pass\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"url\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"category\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"subcategory\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"notes\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"logs\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_last\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"users_granted\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"group_granted\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"created_by\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"keywords\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"passwords_manager_cat\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"passwords_manager_group\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"users\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"notification\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"endpoint\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"authToken\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"publicKey\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"contentEncoding\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"plateforme\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"notification_payload\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"notification_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"payload\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"timestamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"municipalite\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nom\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"administration\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"often_used\",\"kind\":\"scalar\",\"type\":\"Boolean\"}],\"dbName\":null},\"sommaire_porte\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"fibre_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"id_adresse\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"id_subvention\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"adresse_subvention\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ville_subvention\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"latitude\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"longitude\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"contest_adresse\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"new_adresse\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"placemarks_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"state\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name_en\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name_fr\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"abbrev\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"licence\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nom\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"can_manage\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"licence_key\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"licence_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"licence_key\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_expire\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ip\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"ip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"prive\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ip_relais\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"technology\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name_access_point\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mac\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"web_link\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"link_relais\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ip_conso\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"actif\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"cidr\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"last_updated\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"ip_admin\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ip_history\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"ip_pp\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ip_prive\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ip_public\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"ip_id\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ip_static\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"static\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"reverse\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ip_targo\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"cidr\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"invoice\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"process_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"billing_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"refund_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"print_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"total_amt\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"billed_amt\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"due_date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"notes\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"template_message\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"working_order\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"correction\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ppa_charge\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"credit_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"invoice_bk\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"process_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"billing_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"refund_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"print_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"total_amt\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"billed_amt\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"due_date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"notes\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"template_message\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"working_order\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"correction\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ppa_charge\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"credit_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"invoice_call\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"}],\"dbName\":null},\"invoice_item\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"invoice_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"sku\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"quantity\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"product_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unitary_price\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"nosub\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"delivery_name\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"invoice_item_bk\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"invoice_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"sku\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"quantity\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"product_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unitary_price\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"nosub\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"delivery_name\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"invoice_msg_template\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"message\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"invoice_tax\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"invoice_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"tax_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tax_description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tax_rate\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"}],\"dbName\":null},\"invoice_tax_bk\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"invoice_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"tax_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tax_description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tax_rate\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"}],\"dbName\":null},\"accord_paiement\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_accord\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_echeance\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_coupure\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"raison_changement\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"montant\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"method\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ferie\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_create\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"autologin\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"staff\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"statement\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"number\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"reference\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"amt\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"paid_amt\",\"kind\":\"scalar\",\"type\":\"Float\"}],\"dbName\":null},\"intranet_doc\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unread_csv\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"path_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"priority_order\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"update_timestamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"intranet_doc_paths\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"parent_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"priority_order\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"intranet_doc_reply\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"feed_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"update_timestamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"intranet_feed\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unread_csv\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"intranet_feed_reply\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"feed_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"intranet_techniciens\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unread_csv\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"intranet_techniciens_reply\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"feed_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"intranet_techno\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unread_csv\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"intranet_techno_reply\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"feed_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"fibre\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"terrain\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rue\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ville\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"zip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ontid\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"sn\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tech\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"info_connect\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"frame\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"slot\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"port\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"vlan_manage\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"vlan_internet\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"vlan_telephone\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"vlan_tele\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"manage_service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"internet_service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"telephone_service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"tele_service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nb_drop\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"placemarks_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"appartements_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"latitude\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"longitude\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"boitier_pas_install\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"suite\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"distance\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nb_portees\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"fibre_olt\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"tech\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"fibre_service_port\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"last_service_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"fibre_suivi\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"customer_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"first_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"last_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"city\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"zip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"longitude\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"latitude\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"called\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"create_by\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"fibre_tech\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"fibre_videotron\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"download\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"upload\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ethernet\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"interface\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"gantt\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"gantt\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"closed\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"gantt_template\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"gantt\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"project\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_start\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_end\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"manager_name\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"project_cmd\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"project_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"vendeur\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"no_cmd\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"po\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"project_cmd_item\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"cmd_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"qte\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"price\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"usd\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"recu\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"qte_recu\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"date_recu\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"eta\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"project_manager_cat\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"pos\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"color\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"text_color\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"project_manager_checklist\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"task_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ticket_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"poids\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"done\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"project_manager_comment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"task_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unread\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"project_manager_task\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"category_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"pos\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"titre\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"color\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"text_color\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ticket_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_start\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_deadline\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"deadline_watch\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"assign_staff\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"priority\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"done\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"create_by\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_creation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_update\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"service\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_suspended\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_next_invoice\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_last_invoice\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"device_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"payment_recurrence\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"hijack\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"hijack_price\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"hijack_desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"hijack_download_speed\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"hijack_upload_speed\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"hijack_quota_day\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"hijack_quota_night\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_end_contract\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"actif_until\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"forfait_internet\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"radius_user\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"radius_pwd\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"radius_conso\",\"kind\":\"scalar\",\"type\":\"Boolean\"}],\"dbName\":null},\"service_snapshot\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"quota_day\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"quota_night\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"soumission\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"po\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tax\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"materiel\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mensuel\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"text\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"soumission_template\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"materiel\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mensuel\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"staff\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"vpn\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"first_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"last_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ext\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"cell\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"gpin\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rights\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_embauche\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fete\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"supp\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"group_ad\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"dept_list\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"notification\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"darkmode\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"matricule_desjardins\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"compagnie_desjardins\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ldap_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"staff_dispo\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"day_num\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"staff_supp\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nom\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"staff_ids\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tele_carte\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"channels\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tele_channel\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"proprio\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"poste\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"pack_min\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"pack_redevance\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"pack_prix_vendu\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"carte_percentage\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"carte_redevance_min\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"carte_prix_vendu\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"monthly_min\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"has_penetration_rate\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"penetration_actuel\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"is_commercial\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"epgId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"uptele_no\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"uptele_code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"abbr\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"groupe_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ccsa_packageID\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ccsa_desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rapport_bell\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"tele_groupe\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nom\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"small_desc\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tele_network\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"network_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fournisseur\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tele_pack\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"channels\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"actif\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"ccsa_packageID\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ccsa_desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rapport_bell\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bell_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"epgId\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"tele_penetration\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"id_channel\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"percentage\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"prix\",\"kind\":\"scalar\",\"type\":\"Decimal\"}],\"dbName\":null},\"tele_sub_archive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_archive\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"subs\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tele_wiz\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ticket_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nb_stb\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"credit\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"fbase\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"fthem\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tv_mac\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"service_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"mac\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ticket\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ost_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"parent\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"delivery_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bon_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"subject\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"dept_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"open_by\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"email_from\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"assign_to\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"due_date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"due_time\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_create\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"last_update\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_closed\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"pending_to_open\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"waiting_for\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"lock_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"public\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"priority\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"install_success\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"wizard\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"wizard_fibre\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"important\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"followed_by\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"participant\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"update_timestamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"closed_by\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"ticket_calendar_lock\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_lock\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"dept_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nb_install\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"create_by\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"update_by\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"last_update\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"ticket_calendar_staff_lock\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"ticket_conge\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ticket_id\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"ticket_dept\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"parent\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"hasChild\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"manager_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"member_only\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"protected\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"default_staff\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"default_follow\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ticket_msg\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ticket_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"msg\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"unread_csv\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"public\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"important\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"update_timestamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"ticket_template\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"template\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tmp_vpn\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ad_done\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"tacacs\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"m\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"bon_travail\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"tech1\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"heure_arrive_t1\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"heure_depart_t1\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tech2\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"heure_arrive_t2\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"heure_depart_t2\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"subtotal\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"tps\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"tvq\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"total\",\"kind\":\"scalar\",\"type\":\"Decimal\"}],\"dbName\":null},\"bon_travail_item\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bon_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"qte\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"price\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"checklist_relais\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"site_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"site_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"priority\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"done\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"equipement\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"connecteur\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"grounding\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"surge_lightning\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"switch_poe\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"switch_giga_shield\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"batterie\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"solidity\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"redondance\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"antenne_58_360\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"antenne_24_360\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rspro_maj\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"boite\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"cable\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"staros_ubnt\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"autre\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"conference\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"room_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"time_start\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"time_end\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"host\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"participant\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"conference_room\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"location\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"fournisseur\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"nom\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"actif\",\"kind\":\"scalar\",\"type\":\"Boolean\"}],\"dbName\":null},\"notice_gui\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"message\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"is_read\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timestamp\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"promo\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_start\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_end\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"visible_until\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"actif\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"stbs\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"mac\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sn\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"targo\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"tech_dispo\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"tech\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"debug\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"autor\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"url\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date_last\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"note4autor\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"note4dev\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"carte_temps\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"week\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"year\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"start_am\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"end_am\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"start_pm\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"end_pm\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"start_night\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"end_night\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"relais\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"note_int\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"conge\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"appr\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"appr_dir\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"carte_temps_periode\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"debut\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fin\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"paid\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"periode\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"annee\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"banque_heure_staff\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"week\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"year\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"sunday\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"heure\",\"kind\":\"scalar\",\"type\":\"Float\"}],\"dbName\":null},\"hour_bank\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"remaining_time\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"expiration_date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"recurrence\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"reset_value\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"hour_bank_detail\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"hour_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"staff_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_orig\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"used_time\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ticket_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"working_order\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"detail\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"test\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"text\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"c2\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"account_memo_template\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"color\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bcolor\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"border\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"notes\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"notes\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"email\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"client_pwd\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"uid\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"used\",\"kind\":\"scalar\",\"type\":\"Boolean\"}],\"dbName\":null},\"account_profile\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"profile_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"card_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"initial_transaction\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"deposit_slip\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"customer_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"desc\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"BigInt\"}],\"dbName\":null},\"account_suspension\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"account_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date_start\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"date_end\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"note\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}") async function decodeBase64AsWasm(wasmBase64: string): Promise { const { Buffer } = await import('node:buffer') diff --git a/prisma/mariadb/generated/prisma/client/mariadb/internal/prismaNamespace.ts b/prisma/mariadb/generated/prisma/client/mariadb/internal/prismaNamespace.ts index 5ed3501..2742291 100644 --- a/prisma/mariadb/generated/prisma/client/mariadb/internal/prismaNamespace.ts +++ b/prisma/mariadb/generated/prisma/client/mariadb/internal/prismaNamespace.ts @@ -14713,9 +14713,9 @@ export type account_suspensionOrderByRelevanceFieldEnum = (typeof account_suspen /** - * Reference to a field of type 'BigInt' + * Reference to a field of type 'Int' */ -export type BigIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'BigInt'> +export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> @@ -14727,9 +14727,9 @@ export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, /** - * Reference to a field of type 'Int' + * Reference to a field of type 'BigInt' */ -export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> +export type BigIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'BigInt'> diff --git a/prisma/mariadb/generated/prisma/client/mariadb/models/account.ts b/prisma/mariadb/generated/prisma/client/mariadb/models/account.ts index 4680032..9968f87 100644 --- a/prisma/mariadb/generated/prisma/client/mariadb/models/account.ts +++ b/prisma/mariadb/generated/prisma/client/mariadb/models/account.ts @@ -46,7 +46,7 @@ export type AccountAvgAggregateOutputType = { } export type AccountSumAggregateOutputType = { - id: bigint | null + id: number | null date_orig: bigint | null date_last: bigint | null date_expire: bigint | null @@ -65,7 +65,7 @@ export type AccountSumAggregateOutputType = { } export type AccountMinAggregateOutputType = { - id: bigint | null + id: number | null customer_id: string | null date_orig: bigint | null date_last: bigint | null @@ -131,7 +131,7 @@ export type AccountMinAggregateOutputType = { } export type AccountMaxAggregateOutputType = { - id: bigint | null + id: number | null customer_id: string | null date_orig: bigint | null date_last: bigint | null @@ -588,7 +588,7 @@ export type accountGroupByArgs | bigint | number + id?: Prisma.IntFilter<"account"> | number customer_id?: Prisma.StringNullableFilter<"account"> | string | null date_orig?: Prisma.BigIntNullableFilter<"account"> | bigint | number | null date_last?: Prisma.BigIntNullableFilter<"account"> | bigint | number | null @@ -810,7 +810,7 @@ export type accountOrderByWithRelationInput = { } export type accountWhereUniqueInput = Prisma.AtLeast<{ - id?: bigint | number + id?: number AND?: Prisma.accountWhereInput | Prisma.accountWhereInput[] OR?: Prisma.accountWhereInput[] NOT?: Prisma.accountWhereInput | Prisma.accountWhereInput[] @@ -953,7 +953,7 @@ export type accountScalarWhereWithAggregatesInput = { AND?: Prisma.accountScalarWhereWithAggregatesInput | Prisma.accountScalarWhereWithAggregatesInput[] OR?: Prisma.accountScalarWhereWithAggregatesInput[] NOT?: Prisma.accountScalarWhereWithAggregatesInput | Prisma.accountScalarWhereWithAggregatesInput[] - id?: Prisma.BigIntWithAggregatesFilter<"account"> | bigint | number + id?: Prisma.IntWithAggregatesFilter<"account"> | number customer_id?: Prisma.StringNullableWithAggregatesFilter<"account"> | string | null date_orig?: Prisma.BigIntNullableWithAggregatesFilter<"account"> | bigint | number | null date_last?: Prisma.BigIntNullableWithAggregatesFilter<"account"> | bigint | number | null @@ -1019,7 +1019,6 @@ export type accountScalarWhereWithAggregatesInput = { } export type accountCreateInput = { - id?: bigint | number customer_id?: string | null date_orig?: bigint | number | null date_last?: bigint | number | null @@ -1085,7 +1084,7 @@ export type accountCreateInput = { } export type accountUncheckedCreateInput = { - id?: bigint | number + id?: number customer_id?: string | null date_orig?: bigint | number | null date_last?: bigint | number | null @@ -1151,7 +1150,6 @@ export type accountUncheckedCreateInput = { } export type accountUpdateInput = { - id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null date_last?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null @@ -1217,7 +1215,7 @@ export type accountUpdateInput = { } export type accountUncheckedUpdateInput = { - id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number + id?: Prisma.IntFieldUpdateOperationsInput | number customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null date_last?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null @@ -1283,7 +1281,7 @@ export type accountUncheckedUpdateInput = { } export type accountCreateManyInput = { - id?: bigint | number + id?: number customer_id?: string | null date_orig?: bigint | number | null date_last?: bigint | number | null @@ -1349,7 +1347,6 @@ export type accountCreateManyInput = { } export type accountUpdateManyMutationInput = { - id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null date_last?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null @@ -1415,7 +1412,7 @@ export type accountUpdateManyMutationInput = { } export type accountUncheckedUpdateManyInput = { - id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number + id?: Prisma.IntFieldUpdateOperationsInput | number customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null date_last?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null @@ -1722,14 +1719,6 @@ export type accountSumOrderByAggregateInput = { ppa_cc?: Prisma.SortOrder } -export type BigIntFieldUpdateOperationsInput = { - set?: bigint | number - increment?: bigint | number - decrement?: bigint | number - multiply?: bigint | number - divide?: bigint | number -} - export type NullableStringFieldUpdateOperationsInput = { set?: string | null } @@ -1924,7 +1913,7 @@ export type $accountPayload + readonly id: Prisma.FieldRef<"account", 'Int'> readonly customer_id: Prisma.FieldRef<"account", 'String'> readonly date_orig: Prisma.FieldRef<"account", 'BigInt'> readonly date_last: Prisma.FieldRef<"account", 'BigInt'> diff --git a/prisma/mariadb/generated/prisma/client/mariadb/models/account_memo.ts b/prisma/mariadb/generated/prisma/client/mariadb/models/account_memo.ts index 2638552..21640d5 100644 --- a/prisma/mariadb/generated/prisma/client/mariadb/models/account_memo.ts +++ b/prisma/mariadb/generated/prisma/client/mariadb/models/account_memo.ts @@ -468,6 +468,14 @@ export type account_memoSumOrderByAggregateInput = { account_id?: Prisma.SortOrder } +export type BigIntFieldUpdateOperationsInput = { + set?: bigint | number + increment?: bigint | number + decrement?: bigint | number + multiply?: bigint | number + divide?: bigint | number +} + export type account_memoSelect = runtime.Types.Extensions.GetSelect<{ diff --git a/prisma/mariadb/generated/prisma/client/mariadb/models/compta_ppa_file_id.ts b/prisma/mariadb/generated/prisma/client/mariadb/models/compta_ppa_file_id.ts index 3d09db2..8d8baac 100644 --- a/prisma/mariadb/generated/prisma/client/mariadb/models/compta_ppa_file_id.ts +++ b/prisma/mariadb/generated/prisma/client/mariadb/models/compta_ppa_file_id.ts @@ -14,7 +14,7 @@ import type * as Prisma from "../internal/prismaNamespace" /** * Model compta_ppa_file_id - * This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments + * */ export type compta_ppa_file_idModel = runtime.Types.Result.DefaultSelection diff --git a/prisma/mariadb/generated/prisma/client/mariadb/models/delivery.ts b/prisma/mariadb/generated/prisma/client/mariadb/models/delivery.ts index 26342ce..e01b185 100644 --- a/prisma/mariadb/generated/prisma/client/mariadb/models/delivery.ts +++ b/prisma/mariadb/generated/prisma/client/mariadb/models/delivery.ts @@ -40,8 +40,8 @@ export type DeliveryAvgAggregateOutputType = { } export type DeliverySumAggregateOutputType = { - id: bigint | null - account_id: bigint | null + id: number | null + account_id: number | null date_orig: bigint | null longitude: runtime.Decimal | null latitude: runtime.Decimal | null @@ -53,8 +53,8 @@ export type DeliverySumAggregateOutputType = { } export type DeliveryMinAggregateOutputType = { - id: bigint | null - account_id: bigint | null + id: number | null + account_id: number | null name: string | null comment: string | null date_orig: bigint | null @@ -80,8 +80,8 @@ export type DeliveryMinAggregateOutputType = { } export type DeliveryMaxAggregateOutputType = { - id: bigint | null - account_id: bigint | null + id: number | null + account_id: number | null name: string | null comment: string | null date_orig: bigint | null @@ -330,8 +330,8 @@ export type deliveryGroupByArgs | bigint | number - account_id?: Prisma.BigIntNullableFilter<"delivery"> | bigint | number | null + id?: Prisma.IntFilter<"delivery"> | number + account_id?: Prisma.IntNullableFilter<"delivery"> | number | null name?: Prisma.StringFilter<"delivery"> | string comment?: Prisma.StringFilter<"delivery"> | string date_orig?: Prisma.BigIntNullableFilter<"delivery"> | bigint | number | null @@ -435,11 +435,11 @@ export type deliveryOrderByWithRelationInput = { } export type deliveryWhereUniqueInput = Prisma.AtLeast<{ - id?: bigint | number + id?: number AND?: Prisma.deliveryWhereInput | Prisma.deliveryWhereInput[] OR?: Prisma.deliveryWhereInput[] NOT?: Prisma.deliveryWhereInput | Prisma.deliveryWhereInput[] - account_id?: Prisma.BigIntNullableFilter<"delivery"> | bigint | number | null + account_id?: Prisma.IntNullableFilter<"delivery"> | number | null name?: Prisma.StringFilter<"delivery"> | string comment?: Prisma.StringFilter<"delivery"> | string date_orig?: Prisma.BigIntNullableFilter<"delivery"> | bigint | number | null @@ -500,8 +500,8 @@ export type deliveryScalarWhereWithAggregatesInput = { AND?: Prisma.deliveryScalarWhereWithAggregatesInput | Prisma.deliveryScalarWhereWithAggregatesInput[] OR?: Prisma.deliveryScalarWhereWithAggregatesInput[] NOT?: Prisma.deliveryScalarWhereWithAggregatesInput | Prisma.deliveryScalarWhereWithAggregatesInput[] - id?: Prisma.BigIntWithAggregatesFilter<"delivery"> | bigint | number - account_id?: Prisma.BigIntNullableWithAggregatesFilter<"delivery"> | bigint | number | null + id?: Prisma.IntWithAggregatesFilter<"delivery"> | number + account_id?: Prisma.IntNullableWithAggregatesFilter<"delivery"> | number | null name?: Prisma.StringWithAggregatesFilter<"delivery"> | string comment?: Prisma.StringWithAggregatesFilter<"delivery"> | string date_orig?: Prisma.BigIntNullableWithAggregatesFilter<"delivery"> | bigint | number | null @@ -527,8 +527,7 @@ export type deliveryScalarWhereWithAggregatesInput = { } export type deliveryCreateInput = { - id?: bigint | number - account_id?: bigint | number | null + account_id?: number | null name: string comment: string date_orig?: bigint | number | null @@ -554,8 +553,8 @@ export type deliveryCreateInput = { } export type deliveryUncheckedCreateInput = { - id?: bigint | number - account_id?: bigint | number | null + id?: number + account_id?: number | null name: string comment: string date_orig?: bigint | number | null @@ -581,8 +580,7 @@ export type deliveryUncheckedCreateInput = { } export type deliveryUpdateInput = { - id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number - account_id?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null + account_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null name?: Prisma.StringFieldUpdateOperationsInput | string comment?: Prisma.StringFieldUpdateOperationsInput | string date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null @@ -608,8 +606,8 @@ export type deliveryUpdateInput = { } export type deliveryUncheckedUpdateInput = { - id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number - account_id?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null + id?: Prisma.IntFieldUpdateOperationsInput | number + account_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null name?: Prisma.StringFieldUpdateOperationsInput | string comment?: Prisma.StringFieldUpdateOperationsInput | string date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null @@ -635,8 +633,8 @@ export type deliveryUncheckedUpdateInput = { } export type deliveryCreateManyInput = { - id?: bigint | number - account_id?: bigint | number | null + id?: number + account_id?: number | null name: string comment: string date_orig?: bigint | number | null @@ -662,8 +660,7 @@ export type deliveryCreateManyInput = { } export type deliveryUpdateManyMutationInput = { - id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number - account_id?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null + account_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null name?: Prisma.StringFieldUpdateOperationsInput | string comment?: Prisma.StringFieldUpdateOperationsInput | string date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null @@ -689,8 +686,8 @@ export type deliveryUpdateManyMutationInput = { } export type deliveryUncheckedUpdateManyInput = { - id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number - account_id?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null + id?: Prisma.IntFieldUpdateOperationsInput | number + account_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null name?: Prisma.StringFieldUpdateOperationsInput | string comment?: Prisma.StringFieldUpdateOperationsInput | string date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null @@ -892,8 +889,8 @@ export type $deliveryPayload - readonly account_id: Prisma.FieldRef<"delivery", 'BigInt'> + readonly id: Prisma.FieldRef<"delivery", 'Int'> + readonly account_id: Prisma.FieldRef<"delivery", 'Int'> readonly name: Prisma.FieldRef<"delivery", 'String'> readonly comment: Prisma.FieldRef<"delivery", 'String'> readonly date_orig: Prisma.FieldRef<"delivery", 'BigInt'> diff --git a/prisma/mariadb/generated/prisma/client/mariadb/models/ticket.ts b/prisma/mariadb/generated/prisma/client/mariadb/models/ticket.ts index 9ef8a9c..33c365a 100644 --- a/prisma/mariadb/generated/prisma/client/mariadb/models/ticket.ts +++ b/prisma/mariadb/generated/prisma/client/mariadb/models/ticket.ts @@ -48,11 +48,11 @@ export type TicketAvgAggregateOutputType = { } export type TicketSumAggregateOutputType = { - id: bigint | null + id: number | null ost_id: number | null parent: bigint | null - account_id: bigint | null - delivery_id: bigint | null + account_id: number | null + delivery_id: number | null bon_id: number | null dept_id: number | null open_by: number | null @@ -69,11 +69,11 @@ export type TicketSumAggregateOutputType = { } export type TicketMinAggregateOutputType = { - id: bigint | null + id: number | null ost_id: number | null parent: bigint | null - account_id: bigint | null - delivery_id: bigint | null + account_id: number | null + delivery_id: number | null bon_id: number | null subject: string | null dept_id: number | null @@ -102,11 +102,11 @@ export type TicketMinAggregateOutputType = { } export type TicketMaxAggregateOutputType = { - id: bigint | null + id: number | null ost_id: number | null parent: bigint | null - account_id: bigint | null - delivery_id: bigint | null + account_id: number | null + delivery_id: number | null bon_id: number | null subject: string | null dept_id: number | null @@ -398,11 +398,11 @@ export type ticketGroupByArgs | bigint | number + id?: Prisma.IntFilter<"ticket"> | number ost_id?: Prisma.IntNullableFilter<"ticket"> | number | null parent?: Prisma.BigIntFilter<"ticket"> | bigint | number - account_id?: Prisma.BigIntNullableFilter<"ticket"> | bigint | number | null - delivery_id?: Prisma.BigIntFilter<"ticket"> | bigint | number + account_id?: Prisma.IntNullableFilter<"ticket"> | number | null + delivery_id?: Prisma.IntFilter<"ticket"> | number bon_id?: Prisma.IntNullableFilter<"ticket"> | number | null subject?: Prisma.StringNullableFilter<"ticket"> | string | null dept_id?: Prisma.IntNullableFilter<"ticket"> | number | null @@ -521,14 +521,14 @@ export type ticketOrderByWithRelationInput = { } export type ticketWhereUniqueInput = Prisma.AtLeast<{ - id?: bigint | number + id?: number AND?: Prisma.ticketWhereInput | Prisma.ticketWhereInput[] OR?: Prisma.ticketWhereInput[] NOT?: Prisma.ticketWhereInput | Prisma.ticketWhereInput[] ost_id?: Prisma.IntNullableFilter<"ticket"> | number | null parent?: Prisma.BigIntFilter<"ticket"> | bigint | number - account_id?: Prisma.BigIntNullableFilter<"ticket"> | bigint | number | null - delivery_id?: Prisma.BigIntFilter<"ticket"> | bigint | number + account_id?: Prisma.IntNullableFilter<"ticket"> | number | null + delivery_id?: Prisma.IntFilter<"ticket"> | number bon_id?: Prisma.IntNullableFilter<"ticket"> | number | null subject?: Prisma.StringNullableFilter<"ticket"> | string | null dept_id?: Prisma.IntNullableFilter<"ticket"> | number | null @@ -598,11 +598,11 @@ export type ticketScalarWhereWithAggregatesInput = { AND?: Prisma.ticketScalarWhereWithAggregatesInput | Prisma.ticketScalarWhereWithAggregatesInput[] OR?: Prisma.ticketScalarWhereWithAggregatesInput[] NOT?: Prisma.ticketScalarWhereWithAggregatesInput | Prisma.ticketScalarWhereWithAggregatesInput[] - id?: Prisma.BigIntWithAggregatesFilter<"ticket"> | bigint | number + id?: Prisma.IntWithAggregatesFilter<"ticket"> | number ost_id?: Prisma.IntNullableWithAggregatesFilter<"ticket"> | number | null parent?: Prisma.BigIntWithAggregatesFilter<"ticket"> | bigint | number - account_id?: Prisma.BigIntNullableWithAggregatesFilter<"ticket"> | bigint | number | null - delivery_id?: Prisma.BigIntWithAggregatesFilter<"ticket"> | bigint | number + account_id?: Prisma.IntNullableWithAggregatesFilter<"ticket"> | number | null + delivery_id?: Prisma.IntWithAggregatesFilter<"ticket"> | number bon_id?: Prisma.IntNullableWithAggregatesFilter<"ticket"> | number | null subject?: Prisma.StringNullableWithAggregatesFilter<"ticket"> | string | null dept_id?: Prisma.IntNullableWithAggregatesFilter<"ticket"> | number | null @@ -631,11 +631,10 @@ export type ticketScalarWhereWithAggregatesInput = { } export type ticketCreateInput = { - id?: bigint | number ost_id?: number | null parent?: bigint | number - account_id?: bigint | number | null - delivery_id?: bigint | number + account_id?: number | null + delivery_id?: number bon_id?: number | null subject?: string | null dept_id?: number | null @@ -664,11 +663,11 @@ export type ticketCreateInput = { } export type ticketUncheckedCreateInput = { - id?: bigint | number + id?: number ost_id?: number | null parent?: bigint | number - account_id?: bigint | number | null - delivery_id?: bigint | number + account_id?: number | null + delivery_id?: number bon_id?: number | null subject?: string | null dept_id?: number | null @@ -697,11 +696,10 @@ export type ticketUncheckedCreateInput = { } export type ticketUpdateInput = { - id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number ost_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null parent?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number - account_id?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null - delivery_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number + account_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + delivery_id?: Prisma.IntFieldUpdateOperationsInput | number bon_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null subject?: Prisma.NullableStringFieldUpdateOperationsInput | string | null dept_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null @@ -730,11 +728,11 @@ export type ticketUpdateInput = { } export type ticketUncheckedUpdateInput = { - id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number + id?: Prisma.IntFieldUpdateOperationsInput | number ost_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null parent?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number - account_id?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null - delivery_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number + account_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + delivery_id?: Prisma.IntFieldUpdateOperationsInput | number bon_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null subject?: Prisma.NullableStringFieldUpdateOperationsInput | string | null dept_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null @@ -763,11 +761,11 @@ export type ticketUncheckedUpdateInput = { } export type ticketCreateManyInput = { - id?: bigint | number + id?: number ost_id?: number | null parent?: bigint | number - account_id?: bigint | number | null - delivery_id?: bigint | number + account_id?: number | null + delivery_id?: number bon_id?: number | null subject?: string | null dept_id?: number | null @@ -796,11 +794,10 @@ export type ticketCreateManyInput = { } export type ticketUpdateManyMutationInput = { - id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number ost_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null parent?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number - account_id?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null - delivery_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number + account_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + delivery_id?: Prisma.IntFieldUpdateOperationsInput | number bon_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null subject?: Prisma.NullableStringFieldUpdateOperationsInput | string | null dept_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null @@ -829,11 +826,11 @@ export type ticketUpdateManyMutationInput = { } export type ticketUncheckedUpdateManyInput = { - id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number + id?: Prisma.IntFieldUpdateOperationsInput | number ost_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null parent?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number - account_id?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null - delivery_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number + account_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + delivery_id?: Prisma.IntFieldUpdateOperationsInput | number bon_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null subject?: Prisma.NullableStringFieldUpdateOperationsInput | string | null dept_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null @@ -1088,11 +1085,11 @@ export type $ticketPayload + readonly id: Prisma.FieldRef<"ticket", 'Int'> readonly ost_id: Prisma.FieldRef<"ticket", 'Int'> readonly parent: Prisma.FieldRef<"ticket", 'BigInt'> - readonly account_id: Prisma.FieldRef<"ticket", 'BigInt'> - readonly delivery_id: Prisma.FieldRef<"ticket", 'BigInt'> + readonly account_id: Prisma.FieldRef<"ticket", 'Int'> + readonly delivery_id: Prisma.FieldRef<"ticket", 'Int'> readonly bon_id: Prisma.FieldRef<"ticket", 'Int'> readonly subject: Prisma.FieldRef<"ticket", 'String'> readonly dept_id: Prisma.FieldRef<"ticket", 'Int'> diff --git a/prisma/mariadb/generated/prisma/client/mariadb/models/ticket_msg.ts b/prisma/mariadb/generated/prisma/client/mariadb/models/ticket_msg.ts index 7d41e73..fcf8f56 100644 --- a/prisma/mariadb/generated/prisma/client/mariadb/models/ticket_msg.ts +++ b/prisma/mariadb/generated/prisma/client/mariadb/models/ticket_msg.ts @@ -35,17 +35,17 @@ export type Ticket_msgAvgAggregateOutputType = { } export type Ticket_msgSumAggregateOutputType = { - id: bigint | null - ticket_id: bigint | null - staff_id: bigint | null + id: number | null + ticket_id: number | null + staff_id: number | null date_orig: bigint | null important: number | null } export type Ticket_msgMinAggregateOutputType = { - id: bigint | null - ticket_id: bigint | null - staff_id: bigint | null + id: number | null + ticket_id: number | null + staff_id: number | null msg: string | null date_orig: bigint | null unread_csv: string | null @@ -55,9 +55,9 @@ export type Ticket_msgMinAggregateOutputType = { } export type Ticket_msgMaxAggregateOutputType = { - id: bigint | null - ticket_id: bigint | null - staff_id: bigint | null + id: number | null + ticket_id: number | null + staff_id: number | null msg: string | null date_orig: bigint | null unread_csv: string | null @@ -220,9 +220,9 @@ export type ticket_msgGroupByArgs | bigint | number - ticket_id?: Prisma.BigIntFilter<"ticket_msg"> | bigint | number - staff_id?: Prisma.BigIntFilter<"ticket_msg"> | bigint | number + id?: Prisma.IntFilter<"ticket_msg"> | number + ticket_id?: Prisma.IntFilter<"ticket_msg"> | number + staff_id?: Prisma.IntFilter<"ticket_msg"> | number msg?: Prisma.StringNullableFilter<"ticket_msg"> | string | null date_orig?: Prisma.BigIntNullableFilter<"ticket_msg"> | bigint | number | null unread_csv?: Prisma.StringFilter<"ticket_msg"> | string @@ -280,12 +280,12 @@ export type ticket_msgOrderByWithRelationInput = { } export type ticket_msgWhereUniqueInput = Prisma.AtLeast<{ - id?: bigint | number + id?: number AND?: Prisma.ticket_msgWhereInput | Prisma.ticket_msgWhereInput[] OR?: Prisma.ticket_msgWhereInput[] NOT?: Prisma.ticket_msgWhereInput | Prisma.ticket_msgWhereInput[] - ticket_id?: Prisma.BigIntFilter<"ticket_msg"> | bigint | number - staff_id?: Prisma.BigIntFilter<"ticket_msg"> | bigint | number + ticket_id?: Prisma.IntFilter<"ticket_msg"> | number + staff_id?: Prisma.IntFilter<"ticket_msg"> | number msg?: Prisma.StringNullableFilter<"ticket_msg"> | string | null date_orig?: Prisma.BigIntNullableFilter<"ticket_msg"> | bigint | number | null unread_csv?: Prisma.StringFilter<"ticket_msg"> | string @@ -315,9 +315,9 @@ export type ticket_msgScalarWhereWithAggregatesInput = { AND?: Prisma.ticket_msgScalarWhereWithAggregatesInput | Prisma.ticket_msgScalarWhereWithAggregatesInput[] OR?: Prisma.ticket_msgScalarWhereWithAggregatesInput[] NOT?: Prisma.ticket_msgScalarWhereWithAggregatesInput | Prisma.ticket_msgScalarWhereWithAggregatesInput[] - id?: Prisma.BigIntWithAggregatesFilter<"ticket_msg"> | bigint | number - ticket_id?: Prisma.BigIntWithAggregatesFilter<"ticket_msg"> | bigint | number - staff_id?: Prisma.BigIntWithAggregatesFilter<"ticket_msg"> | bigint | number + id?: Prisma.IntWithAggregatesFilter<"ticket_msg"> | number + ticket_id?: Prisma.IntWithAggregatesFilter<"ticket_msg"> | number + staff_id?: Prisma.IntWithAggregatesFilter<"ticket_msg"> | number msg?: Prisma.StringNullableWithAggregatesFilter<"ticket_msg"> | string | null date_orig?: Prisma.BigIntNullableWithAggregatesFilter<"ticket_msg"> | bigint | number | null unread_csv?: Prisma.StringWithAggregatesFilter<"ticket_msg"> | string @@ -327,9 +327,8 @@ export type ticket_msgScalarWhereWithAggregatesInput = { } export type ticket_msgCreateInput = { - id?: bigint | number - ticket_id: bigint | number - staff_id?: bigint | number + ticket_id: number + staff_id?: number msg?: string | null date_orig?: bigint | number | null unread_csv: string @@ -339,9 +338,9 @@ export type ticket_msgCreateInput = { } export type ticket_msgUncheckedCreateInput = { - id?: bigint | number - ticket_id: bigint | number - staff_id?: bigint | number + id?: number + ticket_id: number + staff_id?: number msg?: string | null date_orig?: bigint | number | null unread_csv: string @@ -351,9 +350,8 @@ export type ticket_msgUncheckedCreateInput = { } export type ticket_msgUpdateInput = { - id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number - ticket_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number - staff_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number + ticket_id?: Prisma.IntFieldUpdateOperationsInput | number + staff_id?: Prisma.IntFieldUpdateOperationsInput | number msg?: Prisma.NullableStringFieldUpdateOperationsInput | string | null date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null unread_csv?: Prisma.StringFieldUpdateOperationsInput | string @@ -363,9 +361,9 @@ export type ticket_msgUpdateInput = { } export type ticket_msgUncheckedUpdateInput = { - id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number - ticket_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number - staff_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number + id?: Prisma.IntFieldUpdateOperationsInput | number + ticket_id?: Prisma.IntFieldUpdateOperationsInput | number + staff_id?: Prisma.IntFieldUpdateOperationsInput | number msg?: Prisma.NullableStringFieldUpdateOperationsInput | string | null date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null unread_csv?: Prisma.StringFieldUpdateOperationsInput | string @@ -375,9 +373,9 @@ export type ticket_msgUncheckedUpdateInput = { } export type ticket_msgCreateManyInput = { - id?: bigint | number - ticket_id: bigint | number - staff_id?: bigint | number + id?: number + ticket_id: number + staff_id?: number msg?: string | null date_orig?: bigint | number | null unread_csv: string @@ -387,9 +385,8 @@ export type ticket_msgCreateManyInput = { } export type ticket_msgUpdateManyMutationInput = { - id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number - ticket_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number - staff_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number + ticket_id?: Prisma.IntFieldUpdateOperationsInput | number + staff_id?: Prisma.IntFieldUpdateOperationsInput | number msg?: Prisma.NullableStringFieldUpdateOperationsInput | string | null date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null unread_csv?: Prisma.StringFieldUpdateOperationsInput | string @@ -399,9 +396,9 @@ export type ticket_msgUpdateManyMutationInput = { } export type ticket_msgUncheckedUpdateManyInput = { - id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number - ticket_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number - staff_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number + id?: Prisma.IntFieldUpdateOperationsInput | number + ticket_id?: Prisma.IntFieldUpdateOperationsInput | number + staff_id?: Prisma.IntFieldUpdateOperationsInput | number msg?: Prisma.NullableStringFieldUpdateOperationsInput | string | null date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null unread_csv?: Prisma.StringFieldUpdateOperationsInput | string @@ -502,9 +499,9 @@ export type $ticket_msgPayload - readonly ticket_id: Prisma.FieldRef<"ticket_msg", 'BigInt'> - readonly staff_id: Prisma.FieldRef<"ticket_msg", 'BigInt'> + readonly id: Prisma.FieldRef<"ticket_msg", 'Int'> + readonly ticket_id: Prisma.FieldRef<"ticket_msg", 'Int'> + readonly staff_id: Prisma.FieldRef<"ticket_msg", 'Int'> readonly msg: Prisma.FieldRef<"ticket_msg", 'String'> readonly date_orig: Prisma.FieldRef<"ticket_msg", 'BigInt'> readonly unread_csv: Prisma.FieldRef<"ticket_msg", 'String'> diff --git a/prisma/mariadb/schema.prisma b/prisma/mariadb/schema.prisma index 8141569..2614592 100644 --- a/prisma/mariadb/schema.prisma +++ b/prisma/mariadb/schema.prisma @@ -8,7 +8,7 @@ datasource db { } model account { - id BigInt @id @default(autoincrement()) + id Int @id @default(autoincrement()) customer_id String? @db.VarChar(32) //variable string, composition varies a lot, used by customers to identify their account date_orig BigInt? //timestamp date_last BigInt? //timestamp @@ -100,6 +100,7 @@ model account_memo { } +//NOT USED BY THE TICKET MODULE ********************* model compta_comptes { id BigInt @id @default(autoincrement()) category String? @db.VarChar(64) @@ -107,6 +108,7 @@ model compta_comptes { desc String? @db.MediumText } +//NOT USED BY THE TICKET MODULE ********************* model compta_comptes_soldes { id BigInt @id @default(autoincrement()) num_compte Int @@ -116,6 +118,7 @@ model compta_comptes_soldes { type String @db.VarChar(3) } +//NOT USED BY THE TICKET MODULE ********************* model compta_journal_ecriture { id BigInt @id @default(autoincrement()) date_orig BigInt? @@ -132,6 +135,7 @@ model compta_journal_ecriture { @@index([num], map: "num") } +//NOT USED BY THE TICKET MODULE ********************* model compta_journal_ecriture_bk { id BigInt @id @default(autoincrement()) date_orig BigInt? @@ -148,6 +152,7 @@ model compta_journal_ecriture_bk { @@index([num], map: "num") } +//NOT USED BY THE TICKET MODULE ********************* model compta_journal_ecriture_detail { id BigInt @id @default(autoincrement()) journal_id BigInt? @@ -158,6 +163,7 @@ model compta_journal_ecriture_detail { @@index([journal_id], map: "journal_id") } +//NOT USED BY THE TICKET MODULE ********************* model compta_journal_ecriture_detail_bk { id BigInt @id @default(autoincrement()) journal_id BigInt? @@ -172,11 +178,13 @@ model compta_periode { month Int @id @default(7) } -/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments + +//NOT USED BY THE TICKET MODULE ********************* model compta_ppa_file_id { last_id Int @id @default(1) } +//NOT USED BY THE TICKET MODULE ********************* model compta_setup { setup_id Int @id @default(1) period_month Int @default(7) @@ -189,12 +197,14 @@ model compta_setup { imap_token String? @db.Text } +//NOT USED BY THE TICKET MODULE ********************* model credit_code { id Int @id @default(autoincrement()) code String @db.VarChar(16) desc String @db.VarChar(256) } +//NOT USED BY THE TICKET MODULE ********************* model tax { id Int @id @default(autoincrement()) name String? @db.VarChar(128) @@ -202,6 +212,7 @@ model tax { rate Float? } +//NOT USED BY THE TICKET MODULE ********************* model tax_group { id Int @id @default(autoincrement()) name String? @db.VarChar(128) @@ -209,6 +220,7 @@ model tax_group { tax String? @db.VarChar(128) } +//NOT USED BY THE TICKET MODULE ********************* model td_payable { id Int @id @default(autoincrement()) @db.UnsignedInt ticket_id Int @default(0) @db.UnsignedInt @@ -225,6 +237,7 @@ model td_payable { @@index([ticket_id], map: "ticket_id") } +//NOT USED BY THE TICKET MODULE ********************* model conso { id BigInt @id @default(autoincrement()) ip_id String? @db.VarChar(16) @@ -236,6 +249,7 @@ model conso { @@index([ip_id], map: "ip_id") } +//NOT USED BY THE TICKET MODULE ********************* model conso_archive { id BigInt @id @default(autoincrement()) ip_id String? @db.VarChar(16) @@ -247,6 +261,7 @@ model conso_archive { @@index([ip_id], map: "ip_id") } +//NOT USED BY THE TICKET MODULE ********************* model conso_avis { id Int @id @default(autoincrement()) @db.UnsignedInt date BigInt @@ -257,6 +272,7 @@ model conso_avis { avis String @db.VarChar(32) } +//NOT USED BY THE TICKET MODULE ********************* model conso_radius { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt username String @db.VarChar(32) @@ -269,6 +285,7 @@ model conso_radius { @@index([username], map: "username") } +//NOT USED BY THE TICKET MODULE ********************* model conso_radius_daily { id Int @id @default(autoincrement()) @db.UnsignedInt username String @db.VarChar(32) @@ -282,6 +299,7 @@ model conso_radius_daily { @@index([username], map: "username") } +//NOT USED BY THE TICKET MODULE ********************* model conso_radius_daily2 { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt username String @db.VarChar(32) @@ -295,6 +313,7 @@ model conso_radius_daily2 { @@index([username], map: "username") } +//NOT USED BY THE TICKET MODULE ********************* model conso_radius_hourly { id Int @id @default(autoincrement()) @db.UnsignedInt username String @db.VarChar(32) @@ -306,6 +325,7 @@ model conso_radius_hourly { @@index([username], map: "username") } +//NOT USED BY THE TICKET MODULE ********************* model conso_radius_monthly { id Int @id @default(autoincrement()) @db.UnsignedInt date String @db.VarChar(32) @@ -317,6 +337,7 @@ model conso_radius_monthly { @@index([username], map: "username") } +//NOT USED BY THE TICKET MODULE ********************* model conso_radius_monthly2 { id Int @id @default(autoincrement()) @db.UnsignedInt date String @db.VarChar(32) @@ -330,8 +351,8 @@ model conso_radius_monthly2 { model delivery { - id BigInt @id @default(autoincrement()) - account_id BigInt? + id Int @id @default(autoincrement()) + account_id Int? name String @db.VarChar(32) comment String @db.VarChar(512) date_orig BigInt? @@ -359,6 +380,7 @@ model delivery { @@index([placemarks_id], map: "placemarks_id") } + model delivery_history { id Int @id @default(autoincrement()) @db.UnsignedInt account_id Int @db.UnsignedInt @@ -1628,11 +1650,11 @@ model tv_mac { } model ticket { - id BigInt @id @default(autoincrement()) @db.UnsignedBigInt + id Int @id @default(autoincrement()) ost_id Int? @db.UnsignedInt parent BigInt @default(0) - account_id BigInt? - delivery_id BigInt @default(0) + account_id Int? + delivery_id Int @default(0) bon_id Int? @db.UnsignedInt subject String? @db.VarChar(256) dept_id Int? @@ -1707,9 +1729,9 @@ model ticket_dept { } model ticket_msg { - id BigInt @id @default(autoincrement()) @db.UnsignedBigInt - ticket_id BigInt - staff_id BigInt @default(0) + id Int @id @default(autoincrement()) + ticket_id Int + staff_id Int @default(0) msg String? @db.MediumText date_orig BigInt? unread_csv String @db.MediumText diff --git a/src/app.controller.ts b/src/app.controller.ts index 0aa298e..2bd8f1e 100644 --- a/src/app.controller.ts +++ b/src/app.controller.ts @@ -1,4 +1,4 @@ -import { Controller, Get } from '@nestjs/common'; +import { Controller } from '@nestjs/common'; @Controller() export class AppController { } diff --git a/src/app.module.ts b/src/app.module.ts index f75b786..f9e5b34 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -1,7 +1,6 @@ import { BadRequestException, Module, ValidationPipe } from '@nestjs/common'; import { AppController } from './app.controller'; import { AppService } from './app.service'; -import { NotificationsModule } from './shared/notifications/notifications.module'; import { PrismaPostgresModule } from '../prisma/postgres/prisma-postgres.module'; import { ScheduleModule } from '@nestjs/schedule'; import { ConfigModule } from '@nestjs/config'; @@ -14,23 +13,24 @@ import { IdentityAndAccountModule } from 'src/identity-and-account/identity-and- import { ChatbotModule } from 'src/chatbot/chatbot.module'; import { PrismaMariadbModule } from 'prisma/mariadb/prisma-mariadb.module'; import { PrismaLegacyModule } from 'prisma/prisma-legacy/prisma-legacy.module'; -import { AccountModule } from 'src/customer-support/accounts/account.module'; +import { CustomerSupportModule } from 'src/customer-support/customer-support.module'; @Module({ imports: [ - AccountModule, AuthenticationModule, ConfigModule.forRoot({ isGlobal: true }), ScheduleModule.forRoot(), //cronjobs - NotificationsModule, PrismaPostgresModule, PrismaMariadbModule, PrismaLegacyModule, TimeAndAttendanceModule, IdentityAndAccountModule, ChatbotModule, + CustomerSupportModule, + ], + controllers: [ + AppController ], - controllers: [AppController], providers: [ AppService, { diff --git a/src/chatbot/chatbot.controller.ts b/src/chatbot/chatbot.controller.ts index 378a7b0..c6b4a2a 100644 --- a/src/chatbot/chatbot.controller.ts +++ b/src/chatbot/chatbot.controller.ts @@ -8,26 +8,29 @@ import { Modules as ModulesEnum } from "prisma/postgres/generated/prisma/client/ @Controller('chatbot') export class ChatbotController { - constructor(private readonly chatbotService: ChatbotService) {} + constructor(private readonly chatbotService: ChatbotService) { } - @Post('') - @ModuleAccessAllowed(ModulesEnum.chatbot) - async testConnection(@Body() body: UserMessageDto, @Access('email') email: string): Promise { - return await this.chatbotService.pingExternalApi(body, email); - } + @Post('') + @ModuleAccessAllowed(ModulesEnum.chatbot) + async testConnection( + @Body() body: UserMessageDto, + @Access('email') email: string, + ): Promise { + return await this.chatbotService.pingExternalApi(body, email); + } - // @Post('context') - // @ModuleAccessAllowed(ModulesEnum.chatbot) - // async sendContext(@Body() body: PageContextDto): Promise { - // const sendPageContext = await this.chatbotService.sendPageContext(body); - // return sendPageContext; - // } + // @Post('context') + // @ModuleAccessAllowed(ModulesEnum.chatbot) + // async sendContext(@Body() body: PageContextDto): Promise { + // const sendPageContext = await this.chatbotService.sendPageContext(body); + // return sendPageContext; + // } - // Will have to modify later on to accomodate newer versions of User Auth/User type Structure - // @Post('user') - // @ModuleAccessAllowed(ModulesEnum.chatbot) - // async sendUserCredentials(@Access('email') email: string,): Promise { - // const sendUserContext = await this.chatbotService.sendUserContext(email); - // return sendUserContext; - // } + // Will have to modify later on to accomodate newer versions of User Auth/User type Structure + // @Post('user') + // @ModuleAccessAllowed(ModulesEnum.chatbot) + // async sendUserCredentials(@Access('email') email: string,): Promise { + // const sendUserContext = await this.chatbotService.sendUserContext(email); + // return sendUserContext; + // } } diff --git a/src/chatbot/chatbot.module.ts b/src/chatbot/chatbot.module.ts index 13db2e3..4011c65 100644 --- a/src/chatbot/chatbot.module.ts +++ b/src/chatbot/chatbot.module.ts @@ -13,4 +13,4 @@ import { ChatbotService } from 'src/chatbot/chatbot.service'; providers: [ChatbotService], exports: [], }) -export class ChatbotModule {} +export class ChatbotModule { } diff --git a/src/chatbot/chatbot.service.ts b/src/chatbot/chatbot.service.ts index 4f3a6f0..abee33c 100644 --- a/src/chatbot/chatbot.service.ts +++ b/src/chatbot/chatbot.service.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { UserMessageDto } from 'src/chatbot/dtos/user-message.dto'; import { HttpService } from '@nestjs/axios'; import { firstValueFrom } from 'rxjs'; import { Message } from 'src/chatbot/dtos/dialog-message.dto'; +import { ChatbotResponseDto, UserMessageDto } from 'src/chatbot/dtos/user-message.dto'; @Injectable() export class ChatbotService { @@ -19,7 +19,7 @@ export class ChatbotService { sessionId: this.sessionId, pageContext: body.pageContext ?? undefined } - )); + ))as ChatbotResponseDto; if (!response.data) return { @@ -46,34 +46,4 @@ export class ChatbotService { } } } - - // async sendPageContext(body: PageContextDto, email: string) { - // const { data } = await firstValueFrom( - // this.httpService.post( - // 'https://n8nai.targo.ca/webhook/chatty-Mcbot', - // { features: body, userId: email, userInput: '' }, - // ), - // ); - // return data; - // } - - // Will have to modify later on to accomodate newer versions of User Auth/User type Structure - // async sendUserContext(user_email: string) { - // if (!this.sessionId) { - // this.sessionId = 'SessionId = ' + user_email; - // } - - // const response = await firstValueFrom( - // this.httpService.post( - // 'https://n8nai.targo.ca/webhook/chatty-Mcbot', - // { - // userId: this.sessionId, - // userInput: '', - // features: '', - // }, - // { headers: { 'Content-Tyoe': 'application/json' } }, - // ), - // ); - // return response.data; - // } } diff --git a/src/chatbot/dtos/dialog-message.dto.ts b/src/chatbot/dtos/dialog-message.dto.ts index 0ba70e8..8f34fe6 100644 --- a/src/chatbot/dtos/dialog-message.dto.ts +++ b/src/chatbot/dtos/dialog-message.dto.ts @@ -1,9 +1,6 @@ import { IsBoolean, IsString } from 'class-validator'; export class Message { - @IsString() - text!: string; - - @IsBoolean() - sent!: boolean; + @IsString() text: string; + @IsBoolean() sent: boolean; } diff --git a/src/chatbot/dtos/page-context.dto.ts b/src/chatbot/dtos/page-context.dto.ts index aeee68f..953e477 100644 --- a/src/chatbot/dtos/page-context.dto.ts +++ b/src/chatbot/dtos/page-context.dto.ts @@ -1,15 +1,8 @@ -import { IsArray, IsString } from 'class-validator'; +import { IsArray, IsOptional, IsString } from 'class-validator'; export class PageContextDto { - @IsString() - name: string; - - @IsString() - description: string; - - @IsArray() - features: string[]; - - @IsString() - path?: string; + @IsString() name: string; + @IsString() description: string; + @IsArray() features: string[]; + @IsString() @IsOptional() path?: string; } diff --git a/src/chatbot/dtos/user-message.dto.ts b/src/chatbot/dtos/user-message.dto.ts index 39cb1c6..67a46f7 100644 --- a/src/chatbot/dtos/user-message.dto.ts +++ b/src/chatbot/dtos/user-message.dto.ts @@ -1,11 +1,18 @@ -import { Transform, Type } from 'class-transformer'; +import { Type } from 'class-transformer'; import { IsNotEmpty, IsOptional, IsString } from 'class-validator'; import { PageContextDto } from './page-context.dto'; export class UserMessageDto { - @IsString() - @IsNotEmpty() - @Transform(({ value }) => value.trim()) - userInput!: string; - @IsOptional() @Type(() => PageContextDto) pageContext?: PageContextDto | undefined; + @IsString() + @IsNotEmpty() + @IsString() userInput: string; + @IsOptional() @Type(() => PageContextDto) pageContext?: PageContextDto | undefined; } + +export class ChatbotResponseDto { + @Type(() => ChatbotOutput) data: ChatbotOutput[]; +} + +export class ChatbotOutput { + @IsString() output: string; +} \ No newline at end of file diff --git a/src/common/decorators/module-access.decorators.ts b/src/common/decorators/module-access.decorators.ts index b5cc71d..30219a6 100644 --- a/src/common/decorators/module-access.decorators.ts +++ b/src/common/decorators/module-access.decorators.ts @@ -1,9 +1,14 @@ import { createParamDecorator, ExecutionContext } from "@nestjs/common"; +import { UserDto } from "src/identity-and-account/users-management/user.dto"; -export const Access = createParamDecorator( - (data:string, ctx: ExecutionContext) => { - const request = ctx.switchToHttp().getRequest(); - const user = request.user; +export interface AuthenticatedRequest extends Request { + user: UserDto; +} + +export const Access = createParamDecorator( + (data, ctx: ExecutionContext) => { + const request = ctx.switchToHttp().getRequest(); + const user: UserDto = request.user; return data ? user?.[data] : user; }, ); \ No newline at end of file diff --git a/src/common/guards/modules.guard.ts b/src/common/guards/modules.guard.ts index 3471f8d..b3d99b0 100644 --- a/src/common/guards/modules.guard.ts +++ b/src/common/guards/modules.guard.ts @@ -7,13 +7,7 @@ import { import { Reflector } from '@nestjs/core'; import { MODULES_KEY } from '../decorators/modules-guard.decorators'; import { Modules } from "prisma/postgres/generated/prisma/client/postgres/client"; - - - -interface RequestWithUser extends Request { - // TODO: Create an actual user model based on OAuth signin - user: any; -} +import { AuthenticatedRequest } from 'src/common/decorators/module-access.decorators'; @Injectable() export class ModulesGuard implements CanActivate { @@ -27,18 +21,18 @@ export class ModulesGuard implements CanActivate { if (!requiredModules || requiredModules.length === 0) { return true; } - const request = ctx.switchToHttp().getRequest(); + const request = ctx.switchToHttp().getRequest(); const user = request.user; if (!user) { return false; } for (const module of requiredModules) { - if (!user.user_module_access.includes(module)) { - throw new ForbiddenException( - `This account does not have required access to: ${module}. current user modules: ${user.user_module_access} , required modules: ${requiredModules}`, - ); - } + if (!user.user_module_access.includes(module)) { + throw new ForbiddenException( + `This account does not have required access to: ${module}. current user modules: ${user.user_module_access.toString()} , required modules: ${requiredModules.toString()}`, + ); + } } return true; } diff --git a/src/common/mappers/bank-type-id.mapper.ts b/src/common/mappers/bank-type-id.mapper.ts index 9601a2e..bc1dd8a 100644 --- a/src/common/mappers/bank-type-id.mapper.ts +++ b/src/common/mappers/bank-type-id.mapper.ts @@ -1,7 +1,7 @@ import { Injectable } from "@nestjs/common"; import { Prisma, PrismaClient } from "prisma/postgres/generated/prisma/client/postgres/client"; -import { Result } from "src/common/errors/result-error.factory"; import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service"; +import { Result } from "src/common/errors/result-error.factory"; type Tx = Prisma.TransactionClient | PrismaClient; @@ -25,7 +25,9 @@ export class BankCodesResolver { }; //finds only id by type - readonly findBankCodeIDByType = async (type: string, client?: Tx + readonly findBankCodeIDByType = async ( + type: string, + client?: Tx ): Promise> => { const db = (client ?? this.prisma) as PrismaClient; const bank_code = await db.bankCodes.findFirst({ @@ -37,7 +39,9 @@ export class BankCodesResolver { return { success: true, data: bank_code.id }; } - readonly findTypeByBankCodeId = async (bank_code_id: number, client?: Tx + readonly findTypeByBankCodeId = async ( + bank_code_id: number, + client?: Tx ): Promise> => { const db = (client ?? this.prisma) as PrismaClient; const bank_code = await db.bankCodes.findFirst({ diff --git a/src/common/mappers/email-id.mapper.ts b/src/common/mappers/email-id.mapper.ts index 7628d84..cbd5a55 100644 --- a/src/common/mappers/email-id.mapper.ts +++ b/src/common/mappers/email-id.mapper.ts @@ -1,8 +1,8 @@ -import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service"; import { Injectable } from "@nestjs/common"; -import { Result } from "src/common/errors/result-error.factory"; +import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service"; import { Prisma, PrismaClient } from "prisma/postgres/generated/prisma/client/postgres/client"; +import { Result } from "src/common/errors/result-error.factory"; type Tx = Prisma.TransactionClient | PrismaClient; @@ -12,7 +12,9 @@ export class EmailToIdResolver { constructor(private readonly prisma: PrismaPostgresService) { } // find employee_id using email - readonly findIdByEmail = async (email: string, client?: Tx + readonly findIdByEmail = async ( + email: string, + client?: Tx ): Promise> => { const db = (client ?? this.prisma) as PrismaClient; const employee = await db.employees.findFirst({ @@ -24,7 +26,9 @@ export class EmailToIdResolver { } // find user_id using email - readonly resolveUserIdWithEmail = async (email: string, client?: Tx + readonly resolveUserIdWithEmail = async ( + email: string, + client?: Tx ): Promise> => { const db = (client ?? this.prisma) as PrismaClient; const user = await db.users.findFirst({ diff --git a/src/common/mappers/full-name.mapper.ts b/src/common/mappers/full-name.mapper.ts index ba8df89..cc55b41 100644 --- a/src/common/mappers/full-name.mapper.ts +++ b/src/common/mappers/full-name.mapper.ts @@ -1,7 +1,7 @@ import { Injectable } from "@nestjs/common"; -import { Result } from "src/common/errors/result-error.factory"; import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service"; import { Prisma, PrismaClient } from "prisma/postgres/generated/prisma/client/postgres/client"; +import { Result } from "src/common/errors/result-error.factory"; type Tx = Prisma.TransactionClient | PrismaClient; @@ -9,7 +9,10 @@ type Tx = Prisma.TransactionClient | PrismaClient; export class FullNameResolver { constructor(private readonly prisma: PrismaPostgresService) { } - readonly resolveFullName = async (employee_id: number, client?: Tx): Promise> => { + readonly resolveFullName = async ( + employee_id: number, + client?: Tx + ): Promise> => { const db = (client ?? this.prisma) as PrismaClient; const employee = await db.employees.findUnique({ where: { id: employee_id }, diff --git a/src/common/mappers/shifts-id.mapper.ts b/src/common/mappers/shifts-id.mapper.ts index d8c5a04..1537cdc 100644 --- a/src/common/mappers/shifts-id.mapper.ts +++ b/src/common/mappers/shifts-id.mapper.ts @@ -19,7 +19,9 @@ interface ShiftKey { export class ShiftIdResolver { constructor(private readonly prisma: PrismaPostgresService) { } - readonly findShiftIdByData = async (key: ShiftKey, client?: Tx + readonly findShiftIdByData = async ( + key: ShiftKey, + client?: Tx ): Promise> => { const db = (client ?? this.prisma) as PrismaClient; const shift = await db.shifts.findFirst({ diff --git a/src/common/mappers/timesheet.mapper.ts b/src/common/mappers/timesheet.mapper.ts index ba44d4a..31e8bfc 100644 --- a/src/common/mappers/timesheet.mapper.ts +++ b/src/common/mappers/timesheet.mapper.ts @@ -1,8 +1,8 @@ import { Injectable } from "@nestjs/common"; -import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service"; import { EmailToIdResolver } from "./email-id.mapper"; -import { Result } from "src/common/errors/result-error.factory"; import { weekStartSunday } from "src/common/utils/date-utils"; +import { Result } from "src/common/errors/result-error.factory"; +import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service"; import { PrismaClient } from "prisma/postgres/generated/prisma/client/postgres/internal/class"; import { Prisma } from "prisma/postgres/generated/prisma/client/postgres/client"; @@ -16,7 +16,11 @@ export class EmployeeTimesheetResolver { private readonly emailResolver: EmailToIdResolver, ) { } - readonly findTimesheetIdByEmail = async (email: string, date: Date, client?: Tx): Promise> => { + readonly findTimesheetIdByEmail = async ( + email: string, + date: Date, + client?: Tx + ): Promise> => { const db = (client ?? this.prisma) as PrismaClient; const employee_id = await this.emailResolver.findIdByEmail(email); if (!employee_id.success) return { success: false, error: employee_id.error } diff --git a/src/common/shared/base-approval.service.ts b/src/common/shared/base-approval.service.ts index 212a4c3..4e25e2c 100644 --- a/src/common/shared/base-approval.service.ts +++ b/src/common/shared/base-approval.service.ts @@ -20,7 +20,10 @@ export abstract class BaseApprovalService { protected abstract delegateFor(tx: TransactionClient): UpdatableDelegate; //standard update Aproval - async updateApproval(id: number, is_approved: boolean): Promise { + async updateApproval( + id: number, + is_approved: boolean + ): Promise { try { return await this.delegate.update({ where: { id }, @@ -34,7 +37,11 @@ export abstract class BaseApprovalService { } } - async updateApprovalWithTransaction(tx: TransactionClient, id: number, is_approved: boolean): Promise { + async updateApprovalWithTransaction( + tx: TransactionClient, + id: number, + is_approved: boolean + ): Promise { try { return await this.delegateFor(tx).update({ where: { id }, diff --git a/src/common/shared/build-prisma-where.ts b/src/common/shared/build-prisma-where.ts deleted file mode 100644 index 1b8f8fc..0000000 --- a/src/common/shared/build-prisma-where.ts +++ /dev/null @@ -1,21 +0,0 @@ -//Prisma 'where' clause for DTO filters -export function buildPrismaWhere>(dto: T): Record { - const where: Record = {}; - - for (const [key,value] of Object.entries(dto)) { - if (value === undefined || value === null) continue; - - if (key.endsWith('_contains')) { - const field = key.slice(0, - '_contains'.length); - where[field] = { constains: value }; - } else if (key === 'start_date' || key === 'end_date') { - where.date = where.date || {}; - const op = key === 'start_date' ? 'gte' : 'lte'; - where.date[op] = new Date(value); - } else { - where[key] = value; - } - } - - return where; -} \ No newline at end of file diff --git a/src/common/utils/date-utils.ts b/src/common/utils/date-utils.ts index de2addb..ae9d1ce 100644 --- a/src/common/utils/date-utils.ts +++ b/src/common/utils/date-utils.ts @@ -155,4 +155,12 @@ export const addHourstoDateString = (start_time: string, hours: number): string const hh = String(end.getUTCHours()).padStart(2, '0'); const mm = String(end.getUTCMinutes()).padStart(2, '0'); return `${hh}:${mm}:00`; +} + +export const timestampToStringDate = (timestamp: number): string => { + const date = new Date(timestamp); + const dd = date.getDate().toString().padStart(2, '0'); + const mm = (date.getMonth() + 1).toString().padStart(2, '0'); + const yyyy = date.getFullYear(); + return `${dd}-${mm}-${yyyy}`; } \ No newline at end of file diff --git a/src/customer-support/account-testing.http b/src/customer-support/account-testing.http deleted file mode 100644 index 7ada5af..0000000 --- a/src/customer-support/account-testing.http +++ /dev/null @@ -1,6 +0,0 @@ -# GET http://localhost:3000/accounts - -# GET http://localhost:3000/accounts/6912 - - -GET http://localhost:3000/accounts/account/6912 \ No newline at end of file diff --git a/src/customer-support/accounts/account.controller.ts b/src/customer-support/accounts/account.controller.ts deleted file mode 100644 index 8fc97ee..0000000 --- a/src/customer-support/accounts/account.controller.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Controller, Get, Param } from "@nestjs/common"; -import { AccountMemoService } from "src/customer-support/accounts/services/account-memo.service"; -import { AccountService } from "src/customer-support/accounts/services/account.service"; - - -@Controller('accounts') -export class AccountController { - constructor( - private readonly accountService: AccountService, - private readonly memoService: AccountMemoService, - ) { } - - @Get() - findAllAccounts() { - return this.accountService.findAllAccounts(); - } - - @Get('account/:id') - findAccountById(@Param('accountId') accountId: number) { - return this.accountService.findAccountById(accountId); - } - - @Get(':id') - findMemosByAccountId(@Param('accountId') accountId: number) { - return this.memoService.findMemosByAccountId(accountId); - } - -} \ No newline at end of file diff --git a/src/customer-support/accounts/account.dto.ts b/src/customer-support/accounts/account.dto.ts deleted file mode 100644 index d5bba5e..0000000 --- a/src/customer-support/accounts/account.dto.ts +++ /dev/null @@ -1,37 +0,0 @@ -export class Account { - id: number; - customerId?: string; - language: string; - username?: string; - password?: string; - groupId: number; - status?: number; - firstName?: string; - lastName?: 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; - email?: string[]; - company?: string; - contact: string; - address?: string[]; //string of country, city, state, zip, road, number, apt concat. - telHome?: string; - telOffice?: string; - telOffice_ext?: string; - cell?: string; - fax?: string; - landOwner: boolean; - commercial: boolean; - vip: boolean; - notes_client?: string; - terminateReason?: string; - terminateCie?: string; - terminateNote?: string; - terminateDate?: string; - mauvaisPayeur: boolean; -}; - -export class AccountMemo { - last_updated: number; - staff_id: number; - memo?: string; -}; diff --git a/src/customer-support/accounts/account.module.ts b/src/customer-support/accounts/account.module.ts deleted file mode 100644 index 1dd3e7b..0000000 --- a/src/customer-support/accounts/account.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from "@nestjs/common"; -import { PrismaMariaDbService } from "prisma/mariadb/prisma-mariadb.service"; -import { AccountController } from "src/customer-support/accounts/account.controller"; -import { AccountMemoService } from "src/customer-support/accounts/services/account-memo.service"; -import { AccountService } from "src/customer-support/accounts/services/account.service"; - - -@Module({ - controllers: [ AccountController ], - providers: [ AccountService, PrismaMariaDbService, AccountMemoService ], -}) export class AccountModule { }; \ No newline at end of file diff --git a/src/customer-support/accounts/services/account-create.service.ts b/src/customer-support/accounts/services/account-create.service.ts deleted file mode 100644 index 75db581..0000000 --- a/src/customer-support/accounts/services/account-create.service.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Injectable } from "@nestjs/common"; - -@Injectable() -export class AccountCreateService { - -} \ No newline at end of file diff --git a/src/customer-support/accounts/services/account-memo-update.service.ts b/src/customer-support/accounts/services/account-memo-update.service.ts deleted file mode 100644 index eae8577..0000000 --- a/src/customer-support/accounts/services/account-memo-update.service.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Injectable } from "@nestjs/common"; - -@Injectable() -export class AccountMemoUpdateService { - -} \ No newline at end of file diff --git a/src/customer-support/accounts/services/account-memo.service.ts b/src/customer-support/accounts/services/account-memo.service.ts deleted file mode 100644 index b247408..0000000 --- a/src/customer-support/accounts/services/account-memo.service.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Injectable } from "@nestjs/common"; -import { PrismaMariaDbService } from "prisma/mariadb/prisma-mariadb.service"; -import { Result } from "src/common/errors/result-error.factory"; -import { AccountMemo } from "src/customer-support/accounts/account.dto"; - -@Injectable() -export class AccountMemoService { - constructor(private readonly prismaMariaDb: PrismaMariaDbService) { } - - findMemosByAccountId = async (accountId: number): Promise> => { - const listOfMemos: AccountMemo[] = []; - - const rawListOfMemos = await this.prismaMariaDb.account_memo.findMany({ - where: { id: accountId }, - select: { last_updated: true, staff_id: true, memo: true }, - }); - if (!rawListOfMemos) return { success: false, error: 'MEMOS_NOT_FOUND' }; - - for (const memo of rawListOfMemos) { - listOfMemos.push({ - last_updated: Number(memo.last_updated), - staff_id: Number(memo.staff_id), - memo: memo.memo ? memo.memo : '', - }); - } - return { success: true, data: listOfMemos } - } - -} \ No newline at end of file diff --git a/src/customer-support/accounts/services/account-update.service.ts b/src/customer-support/accounts/services/account-update.service.ts deleted file mode 100644 index 6db2e15..0000000 --- a/src/customer-support/accounts/services/account-update.service.ts +++ /dev/null @@ -1,56 +0,0 @@ -// import { Injectable } from "@nestjs/common"; -// import { PrismaMariaDbService } from "prisma/mariadb/prisma-mariadb.service"; -// import { Result } from "src/common/errors/result-error.factory"; -// import { Account } from "src/customer-support/accounts/account.dto"; - -// @Injectable() -// export class AccountUpdateService { -// constructor(private readonly prisma: PrismaMariaDbService) { } - -// async updateAccount(account: Account): Promise> { - -// const oldAccountInfos = await this.prisma.account.findUnique({ -// where: { id: account.id }, -// }); -// if (!oldAccountInfos) return { success: false, error: 'ACCOUNT_NOT_FOUND' }; - -// await this.prisma.account.update({ -// where: { id: oldAccountInfos.id }, -// data: { -// customer_id: account.customerId, -// language_id: account.language, -// username: account.username, -// password: account.password, -// group_id: account.groupId, -// status: account.status, -// first_name: account.firstName, -// last_name: account.lastName, -// mandataire: account.mandataire, -// title: account.title, -// email: account.email, -// company: account.company, -// contact: account.contact, -// address1: account.address, -// address2: account.address, -// tel_home: account.telHome, -// tel_office: account.telOffice, -// tel_office_ext: account.telOffice_ext, -// cell: account.cell, -// fax: account.fax, -// land_owner: account.landOwner, -// commercial: account.commercial, -// vip: account.vip, -// notes_client: account.notes_client, -// terminate_reason: account.terminateReason, -// terminate_cie: account.terminateCie, -// terminate_date: account.terminateDate, -// terminate_note: account.terminateNote, -// mauvais_payeur: account.mauvaisPayeur, -// }, -// }); - - - - -// } -// } \ No newline at end of file diff --git a/src/customer-support/accounts/services/account.service.ts b/src/customer-support/accounts/services/account.service.ts deleted file mode 100644 index 6019d26..0000000 --- a/src/customer-support/accounts/services/account.service.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { Injectable } from "@nestjs/common"; -import { PrismaMariaDbService } from "prisma/mariadb/prisma-mariadb.service"; -import { Result } from "src/common/errors/result-error.factory"; -import { Account } from "src/customer-support/accounts/account.dto"; - - -@Injectable() -export class AccountService { - constructor(private readonly prismaMariaDb: PrismaMariaDbService) { } - - findAllAccounts = async (): Promise> => { - const listOfAccounts: Account[] = []; - - const rawListOfAccounts = await this.prismaMariaDb.account.findMany({}); - if (!rawListOfAccounts) return { success: false, error: 'ACCOUNTS_NOT_FOUND' } - try { - - for (const account of rawListOfAccounts) { - const emailList: string[] = [ - account.email ? account.email : '', - account.email_autre ? account.email_autre : '', - ]; - - const addressList: string[] = [ - account.address1 ? account.address1 : '', - account.address2 ? account.address2 : '', - account.city ? account.city : '', - account.state ? account.state : '', - account.zip ? account.zip : '', - account.country_id.toString(), - ]; - - listOfAccounts.push({ - id: Number(account.id), - customerId: account.customer_id ? account.customer_id : '', - language: account.language_id, - username: account.username ? account.username : '', - password: account.password ? account.password : '', - groupId: account.group_id ? account.group_id : 0, - status: account.status ? account.status : 0, - firstName: account.first_name ? account.first_name : '', - lastName: account.last_name ? account.last_name : '', - mandataire: account.mandataire ? account.mandataire : '', - title: account.title ? account.title : '', - email: emailList, - company: account.company ? account.company : '', - contact: account.contact, - address: addressList, - telHome: account.tel_home ? account.tel_home : '', - telOffice: account.tel_office ? account.tel_office : '', - telOffice_ext: account.tel_office_ext ? account.tel_office_ext : '', - cell: account.cell ? account.cell : '', - fax: account.fax ? account.fax : '', - landOwner: account.land_owner, - commercial: account.commercial, - vip: account.vip, - notes_client: account.notes_client ? account.notes_client : '', - terminateReason: account.terminate_reason ? account.terminate_reason : '', - terminateCie: account.terminate_cie ? account.terminate_cie : '', - terminateNote: account.terminate_note ? account.terminate_note : '', - terminateDate: account.terminate_date ? account.terminate_date : '', - mauvaisPayeur: account.mauvais_payeur, - }); - } - console.log(listOfAccounts); - return { success: true, data: listOfAccounts }; - - } catch (error) { - return { success: false, error: error + " \n An error occured during retrieving the list of accounts" } - } - } - - findAccountById = async (accountId: number): Promise> => { - - const rawAccount = await this.prismaMariaDb.account.findUnique({ - where: { id: accountId } - }); - if (!rawAccount) return { success: false, error: 'ACCOUNT_NOT_FOUND' } - - const emailList: string[] = [ - rawAccount.email ? rawAccount.email : '', - rawAccount.email_autre ? rawAccount.email_autre : '', - ]; - - const addressList: string[] = [ - rawAccount.address1 ? rawAccount.address1 : '', - rawAccount.address2 ? rawAccount.address2 : '', - rawAccount.city ? rawAccount.city : '', - rawAccount.state ? rawAccount.state : '', - rawAccount.zip ? rawAccount.zip : '', - rawAccount.country_id.toString(), - ]; - - const account: Account = { - id: Number(rawAccount.id), - customerId: rawAccount.customer_id ? rawAccount.customer_id : '', - language: rawAccount.language_id, - username: rawAccount.username ? rawAccount.username : '', - password: rawAccount.password ? rawAccount.password : '', - groupId: rawAccount.group_id ? rawAccount.group_id : 0, - status: rawAccount.status ? rawAccount.status : 0, - firstName: rawAccount.first_name ? rawAccount.first_name : '', - lastName: rawAccount.last_name ? rawAccount.last_name : '', - mandataire: rawAccount.mandataire ? rawAccount.mandataire : '', - title: rawAccount.title ? rawAccount.title : '', - email: emailList, - company: rawAccount.company ? rawAccount.company : '', - contact: rawAccount.contact, - address: addressList, - telHome: rawAccount.tel_home ? rawAccount.tel_home : '', - telOffice: rawAccount.tel_office ? rawAccount.tel_office : '', - telOffice_ext: rawAccount.tel_office_ext ? rawAccount.tel_office_ext : '', - cell: rawAccount.cell ? rawAccount.cell : '', - fax: rawAccount.fax ? rawAccount.fax : '', - landOwner: rawAccount.land_owner, - commercial: rawAccount.commercial, - vip: rawAccount.vip, - notes_client: rawAccount.notes_client ? rawAccount.notes_client : '', - terminateReason: rawAccount.terminate_reason ? rawAccount.terminate_reason : '', - terminateCie: rawAccount.terminate_cie ? rawAccount.terminate_cie : '', - terminateNote: rawAccount.terminate_note ? rawAccount.terminate_note : '', - terminateDate: rawAccount.terminate_date ? rawAccount.terminate_date : '', - mauvaisPayeur: rawAccount.mauvais_payeur, - } - - return { success: true, data: account }; - } -} diff --git a/src/customer-support/customer-support.module.ts b/src/customer-support/customer-support.module.ts index 930aee1..ca8da4c 100644 --- a/src/customer-support/customer-support.module.ts +++ b/src/customer-support/customer-support.module.ts @@ -1,8 +1,13 @@ import { Module } from "@nestjs/common"; +import { TicketController } from "src/customer-support/tickets/ticket.controller"; +import { TicketService } from "src/customer-support/tickets/ticket.service"; @Module({ - imports: [], - controllers: [], - providers: [], - exports: [], -}) export class CustomerSupportModule {} \ No newline at end of file + controllers: [ + TicketController + ], + providers: [ + TicketService + ], + +}) export class CustomerSupportModule { } \ No newline at end of file diff --git a/src/customer-support/deliveries/delivery.controller.ts b/src/customer-support/deliveries/delivery.controller.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/deliveries/delivery.dto.ts b/src/customer-support/deliveries/delivery.dto.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/deliveries/delivery.module.ts b/src/customer-support/deliveries/delivery.module.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/deliveries/delivery.service.ts b/src/customer-support/deliveries/delivery.service.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/devices/device.controller.ts b/src/customer-support/devices/device.controller.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/devices/device.dto.ts b/src/customer-support/devices/device.dto.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/devices/device.module.ts b/src/customer-support/devices/device.module.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/devices/device.service.ts b/src/customer-support/devices/device.service.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/fibre/fibre.controller.ts b/src/customer-support/fibre/fibre.controller.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/fibre/fibre.dto.ts b/src/customer-support/fibre/fibre.dto.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/fibre/fibre.module.ts b/src/customer-support/fibre/fibre.module.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/fibre/fibre.service.ts b/src/customer-support/fibre/fibre.service.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/http-test-files/ticket.test.http b/src/customer-support/http-test-files/ticket.test.http new file mode 100644 index 0000000..cc409ac --- /dev/null +++ b/src/customer-support/http-test-files/ticket.test.http @@ -0,0 +1 @@ +GET http://localhost:3000/tickets/OPEN?sortOrder=last_update&sortTypes=DESC&offset=0&limit=10&email=gilles@targointernet.com \ No newline at end of file diff --git a/src/customer-support/phones/phone.controller.ts b/src/customer-support/phones/phone.controller.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/phones/phone.dto.ts b/src/customer-support/phones/phone.dto.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/phones/phone.module.ts b/src/customer-support/phones/phone.module.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/phones/phone.service.ts b/src/customer-support/phones/phone.service.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/product/product.controller.ts b/src/customer-support/product/product.controller.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/product/product.dto.ts b/src/customer-support/product/product.dto.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/product/product.module.ts b/src/customer-support/product/product.module.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/product/product.service.ts b/src/customer-support/product/product.service.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/staff/staff.controller.ts b/src/customer-support/staff/staff.controller.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/staff/staff.dto.ts b/src/customer-support/staff/staff.dto.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/staff/staff.module.ts b/src/customer-support/staff/staff.module.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/staff/staff.service.ts b/src/customer-support/staff/staff.service.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/television/television.controller.ts b/src/customer-support/television/television.controller.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/television/television.dto.ts b/src/customer-support/television/television.dto.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/television/television.module.ts b/src/customer-support/television/television.module.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/television/television.service.ts b/src/customer-support/television/television.service.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/tickets/dtos/ticket-list.dto.ts b/src/customer-support/tickets/dtos/ticket-list.dto.ts new file mode 100644 index 0000000..3ee8451 --- /dev/null +++ b/src/customer-support/tickets/dtos/ticket-list.dto.ts @@ -0,0 +1,14 @@ +import { IsInt, IsOptional, IsString } from "class-validator"; + +export class TicketList { + @IsInt() id: number; + @IsString() status: string; + @IsString() @IsOptional() assignTo: string; + @IsString() deliveryAddress: string; + @IsString() subject: string; + @IsString() department: string; + @IsInt() @IsOptional() parentTicketId: number; + @IsString() dueDate: string; + @IsString() updatedAt: string; + @IsString() @IsOptional() completedAt: string; +} \ No newline at end of file diff --git a/src/customer-support/tickets/dtos/ticket.dto.ts b/src/customer-support/tickets/dtos/ticket.dto.ts new file mode 100644 index 0000000..26a013c --- /dev/null +++ b/src/customer-support/tickets/dtos/ticket.dto.ts @@ -0,0 +1,69 @@ +import { Type } from "class-transformer"; +import { IsBoolean, IsInt, IsOptional, IsString } from "class-validator"; + +export class DeliveryAddress { + @IsString() address: string; + @IsString() department: string; + @IsString() shortDescription: string; + @IsString() description: string; +} + +export class TicketHistory { + @Type(() => Ticket) ticket: Ticket[]; +} + +export class Message { + @IsString() attachment: string; + @IsString() comment: string; + @IsString() createdBy: string; + @IsString() createdAt: string; +} + +export class Service { + @IsString() serviceType: string; + @IsString() shortDescription: string; + @Type(() => Number) price: number; + @IsBoolean() status: boolean; +} + +export class Device { + @IsString() name: string; + @IsString() model: string; + @IsString() category: string; + @IsString() sku: string; + @IsString() sn: string; + @IsString() gponSn: string; + @IsString() @IsOptional() mac?: string; + @IsString() @IsOptional() wifiPass?: string; + @IsString() @IsOptional() tag?: string; + @IsString() room: string; + @Type(() => Number) price: number; + @IsString() @IsOptional() speed?: string; + @IsString() description: string; +} + +export class Contact { + @IsString() FirstName: string; + @IsString() LastName: string; + @IsString() @IsOptional() telHome?: string; + @IsString() @IsOptional() telOffice?: string; + @IsString() @IsOptional() telOfficeExt?: string; + @IsString() @IsOptional() cell?: string; + @IsString() @IsOptional() fax?: string; + @IsString() email: string; +} + +export class Ticket { + @IsInt() id: number; + @IsString() createdAt: string; + @Type(() => DeliveryAddress) deliveryAddress: DeliveryAddress; + @Type(() => Message) message: Message[]; + @Type(() => Service) service: Service[]; + @Type(() => Device) device: Device[]; + @Type(() => Contact) contact: Contact[]; + @Type(() => TicketHistory) TicketHistory: TicketHistory; +} + + +export const sortOrders: string[] = ['id', 'status', 'assign_to', 'address1', 'subject', 'dept_id', 'parent', 'due_date', 'last_update', 'date_closed']; +export const sortTypes: string[] = ['ASC', 'DESC']; \ No newline at end of file diff --git a/src/customer-support/tickets/ticket.controller.ts b/src/customer-support/tickets/ticket.controller.ts index e69de29..ec24471 100644 --- a/src/customer-support/tickets/ticket.controller.ts +++ b/src/customer-support/tickets/ticket.controller.ts @@ -0,0 +1,34 @@ +import { Controller, Get, Param, ParseIntPipe, Query } from "@nestjs/common"; +import { Access } from "src/common/decorators/module-access.decorators"; +import { Result } from "src/common/errors/result-error.factory"; +import { TicketList } from "src/customer-support/tickets/dtos/ticket-list.dto"; +import { TicketService } from "src/customer-support/tickets/ticket.service"; + +@Controller('tickets') +export class TicketController { + + constructor(private readonly getService: TicketService) { } + + @Get(':status') + async findTicketByFilters( + @Access('email') email: string, + @Param('status') status: string, + @Query('sortOrder') sortOrder: string, + @Query('sortType') sortType: 'DESC' | 'ASC', + @Query('email') filterEmail?: string, + @Query('offset', ParseIntPipe) offset?: number, + @Query('limit', ParseIntPipe) limit?: number, + ): Promise> { + const statusFilters = status.split(','); + const queryEmail = filterEmail ?? email; + + return await this.getService.getListOfAllTicketByFilters( + statusFilters, + offset, + limit, + sortOrder, + sortType, + queryEmail, + ); + } +} \ No newline at end of file diff --git a/src/customer-support/tickets/ticket.dto.ts b/src/customer-support/tickets/ticket.dto.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/customer-support/tickets/ticket.module.ts b/src/customer-support/tickets/ticket.module.ts index e69de29..805680b 100644 --- a/src/customer-support/tickets/ticket.module.ts +++ b/src/customer-support/tickets/ticket.module.ts @@ -0,0 +1,13 @@ +import { Module } from "@nestjs/common"; +import { TicketController } from "src/customer-support/tickets/ticket.controller"; +import { TicketService } from "src/customer-support/tickets/ticket.service"; + +@Module({ + imports: [ + TicketService + ], + providers: [ + TicketController + ] +}) +export class TicketModule { } \ No newline at end of file diff --git a/src/customer-support/tickets/ticket.service.ts b/src/customer-support/tickets/ticket.service.ts index e69de29..f9dd5c4 100644 --- a/src/customer-support/tickets/ticket.service.ts +++ b/src/customer-support/tickets/ticket.service.ts @@ -0,0 +1,62 @@ +import { Injectable } from "@nestjs/common"; +import { Result } from "src/common/errors/result-error.factory"; +import { PrismaMariaDbService } from "prisma/mariadb/prisma-mariadb.service"; +import { TicketList } from "src/customer-support/tickets/dtos/ticket-list.dto"; +import { sortOrders, sortTypes } from "src/customer-support/tickets/dtos/ticket.dto"; +import { Prisma } from "prisma/mariadb/generated/prisma/client/mariadb/client"; + +@Injectable() +export class TicketService { + constructor(private readonly prisma: PrismaMariaDbService) { } + + getListOfAllTicketByFilters = async ( + status: string[], + offset: number = 0, + limit: number = 25, + sortOrder: string = 'last_update', + sortType: 'DESC' | 'ASC' = 'DESC', + email?: string + ): Promise> => { + + try { + const staff = await this.prisma.staff.findFirst({ + where: { email }, + }); + if (!staff) return { success: false, error: 'EMPLOYEE_NOT_FOUND' } + if (!sortOrders.includes(sortOrder) || !sortTypes.includes(sortType)) return { success: false, error: 'INVALID_FILTER' } + + const statusList = Prisma.join(status); + + const rawticketList = await this.prisma.$queryRaw( + Prisma.sql` + SELECT + t.id AS id, + t.status AS status, + CONCAT(s.first_name,' ',s.last_name) AS assignTo, + a.address1 AS deliveryAddress, + t.subject AS subject, + d.name AS department, + t.parent AS parentTicketId, + DATE_FORMAT(FROM_UNIXTIME(t.due_date / 1000), '%d/%m/%y') AS dueDate, + DATE_FORMAT(FROM_UNIXTIME(t.last_update / 1000), '%d/%m/%y') AS updatedAt, + CASE + WHEN t.date_closed IS NOT NULL + THEN DATE_FORMAT(FROM_UNIXTIME(t.date_closed / 1000), '%d/%m/%y') + ELSE NULL + END AS completedAt + FROM staff s + LEFT JOIN ticket t ON t.assign_to = s.id + LEFT JOIN account a ON t.account_id = a.id + LEFT JOIN ticket_dept d ON t.dept_id = d.id + WHERE s.email = ${email} + AND t.status IN (${statusList}) + ORDER BY ${Prisma.raw(sortOrder)} ${Prisma.raw(sortType)} + LIMIT ${limit} OFFSET ${offset}; + `); + + return { success: true, data: rawticketList } + } catch (error) { + return { success: false, error: 'TICKET_LIST_NOT_FOUND, ' + error }; + } + } +} \ No newline at end of file diff --git a/src/identity-and-account/authentication/auth.module.ts b/src/identity-and-account/authentication/auth.module.ts index ce27768..e70b417 100644 --- a/src/identity-and-account/authentication/auth.module.ts +++ b/src/identity-and-account/authentication/auth.module.ts @@ -9,17 +9,23 @@ import { UsersService } from 'src/identity-and-account/users-management/services @Module({ - imports: [ PassportModule.register({ - session: true, - defaultStrategy: 'openidconnect' - }), UsersModule, ], - providers: [ - AuthentikAuthService, - AuthentikStrategy, + imports: [ + PassportModule.register({ + session: true, + defaultStrategy: 'openidconnect' + }), UsersModule, + ], + providers: [ + AuthentikAuthService, + AuthentikStrategy, ExpressSessionSerializer, UsersService, ], - exports: [ AuthentikAuthService ], - controllers: [AuthController], + exports: [ + AuthentikAuthService + ], + controllers: [ + AuthController + ], }) -export class AuthenticationModule {} +export class AuthenticationModule { } diff --git a/src/identity-and-account/authentication/controllers/auth.controller.ts b/src/identity-and-account/authentication/controllers/auth.controller.ts index 7abcba6..59966fc 100644 --- a/src/identity-and-account/authentication/controllers/auth.controller.ts +++ b/src/identity-and-account/authentication/controllers/auth.controller.ts @@ -16,7 +16,7 @@ export class AuthController { @Get('callback') @UseGuards(OIDCLoginGuard) - loginCallback(@Req() req: Request, @Res() res: Response) { + loginCallback(@Req() _req: Request, @Res() res: Response) { res.redirect(process.env.REDIRECT_URL_DEV!); } diff --git a/src/identity-and-account/authentication/guards/authentik-auth.guard.ts b/src/identity-and-account/authentication/guards/authentik-auth.guard.ts index ff4f44d..6a71ce6 100644 --- a/src/identity-and-account/authentication/guards/authentik-auth.guard.ts +++ b/src/identity-and-account/authentication/guards/authentik-auth.guard.ts @@ -1,11 +1,12 @@ import { ExecutionContext, Injectable } from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; +import { Request } from 'express'; @Injectable() export class OIDCLoginGuard extends AuthGuard('openidconnect') { async canActivate(context: ExecutionContext) { const result = (await super.canActivate(context)) as boolean; - const request = context.switchToHttp().getRequest(); + const request = context.switchToHttp().getRequest(); await super.logIn(request); return result; } diff --git a/src/identity-and-account/authentication/serializers/express-session.serializer.ts b/src/identity-and-account/authentication/serializers/express-session.serializer.ts index c3d87c0..4c0a6d7 100644 --- a/src/identity-and-account/authentication/serializers/express-session.serializer.ts +++ b/src/identity-and-account/authentication/serializers/express-session.serializer.ts @@ -9,7 +9,7 @@ export class ExpressSessionSerializer extends PassportSerializer { } done(null, user); } - deserializeUser(payload: any, done: (err: any, payload: string) => void): any { + deserializeUser(payload: any, done: (err: any, payload: any) => void): any { if (!payload){ done(new UnauthorizedException('Deserialize user error'), payload); } diff --git a/src/identity-and-account/authentication/services/authentik-auth.service.ts b/src/identity-and-account/authentication/services/authentik-auth.service.ts index 974a1eb..d450031 100644 --- a/src/identity-and-account/authentication/services/authentik-auth.service.ts +++ b/src/identity-and-account/authentication/services/authentik-auth.service.ts @@ -1,12 +1,13 @@ import { Injectable } from '@nestjs/common'; import { UsersService } from 'src/identity-and-account/users-management/services/users.service'; +import { UserDto } from 'src/identity-and-account/users-management/user.dto'; @Injectable() export class AuthentikAuthService { constructor(private usersService: UsersService) {} - async validateUser(user_email: string): Promise { + async validateUser(user_email: string): Promise> { const user = await this.usersService.findOneByEmail(user_email); return user; diff --git a/src/identity-and-account/authentication/strategies/authentik.strategy.ts b/src/identity-and-account/authentication/strategies/authentik.strategy.ts index 6f9c5b0..47ca526 100644 --- a/src/identity-and-account/authentication/strategies/authentik.strategy.ts +++ b/src/identity-and-account/authentication/strategies/authentik.strategy.ts @@ -39,9 +39,9 @@ export class AuthentikStrategy extends PassportStrategy(OIDCStrategy, 'openidcon async validate( _issuer: string, - profile: Profile, + _profile: Profile, _context: any, - _idToken: string, + idToken: string, _accessToken: string, _refreshToken: string, _params: any, @@ -50,9 +50,9 @@ export class AuthentikStrategy extends PassportStrategy(OIDCStrategy, 'openidcon try { - const components = _idToken.split('.'); + const components = idToken.split('.'); const payload = Buffer.from(components[1], "base64").toString('utf-8'); - const claims = JSON.parse(payload); + const claims = JSON.parse(payload) as AuthentikPayload; if (!claims.email) return cb(new Error('Missing email in OIDC profile'), false); diff --git a/src/identity-and-account/employees/employees.controller.ts b/src/identity-and-account/employees/employees.controller.ts index 42dbd2a..c673ff9 100644 --- a/src/identity-and-account/employees/employees.controller.ts +++ b/src/identity-and-account/employees/employees.controller.ts @@ -18,13 +18,17 @@ export class EmployeesController { @Get('personal-profile') @ModuleAccessAllowed(ModulesEnum.personal_profile) - async findOwnProfile(@Access('email') email: string): Promise, string>> { + async findOwnProfile( + @Access('email') email: string + ): Promise, string>> { return await this.getService.findOwnProfile(email); } @Get('profile') @ModuleAccessAllowed(ModulesEnum.personal_profile) - async findProfile(@Access('email') email: string, @Query('employee_email') employee_email?: string, + async findProfile( + @Access('email') email: string, + @Query('employee_email') employee_email?: string, ): Promise, string>> { return await this.getService.findOneDetailedProfile(email, employee_email); } @@ -37,13 +41,17 @@ export class EmployeesController { @Post('create') @ModuleAccessAllowed(ModulesEnum.employee_management) - async createEmployee(@Body() dto: EmployeeDetailedUpsertDto): Promise> { + async createEmployee( + @Body() dto: EmployeeDetailedUpsertDto + ): Promise> { return await this.createService.createEmployee(dto); } @Patch('update') @ModuleAccessAllowed(ModulesEnum.employee_management) - async updateEmployee(@Body() dto:EmployeeDetailedUpsertDto){ + async updateEmployee( + @Body() dto:EmployeeDetailedUpsertDto + ){ return await this.updateService.updateEmployee(dto); } } diff --git a/src/identity-and-account/employees/employees.module.ts b/src/identity-and-account/employees/employees.module.ts index 235f62a..3962d13 100644 --- a/src/identity-and-account/employees/employees.module.ts +++ b/src/identity-and-account/employees/employees.module.ts @@ -7,8 +7,9 @@ import { EmployeesUpdateService } from 'src/identity-and-account/employees/servi import { EmployeesCreateService } from 'src/identity-and-account/employees/services/employees-create.service'; @Module({ - imports: [], - controllers: [EmployeesController], + controllers: [ + EmployeesController + ], providers: [ EmployeesGetService, EmployeesUpdateService, @@ -16,6 +17,8 @@ import { EmployeesCreateService } from 'src/identity-and-account/employees/servi AccessGetService, EmailToIdResolver ], - exports: [EmployeesGetService], + exports: [ + EmployeesGetService + ], }) export class EmployeesModule { } diff --git a/src/identity-and-account/help/help-page.controller.ts b/src/identity-and-account/help/help-page.controller.ts index b189468..596ad26 100644 --- a/src/identity-and-account/help/help-page.controller.ts +++ b/src/identity-and-account/help/help-page.controller.ts @@ -10,7 +10,9 @@ export class HomePageController { @Get('help') @ModuleAccessAllowed(ModulesEnum.dashboard) - async getIntroductionHelper(@Access('email') email: string) { + async getIntroductionHelper( + @Access('email') email: string + ) { return await this.homePageService.buildHomePageHelpMessage(email); } } \ No newline at end of file diff --git a/src/identity-and-account/help/help-page.module.ts b/src/identity-and-account/help/help-page.module.ts index b1d91e5..02d62bb 100644 --- a/src/identity-and-account/help/help-page.module.ts +++ b/src/identity-and-account/help/help-page.module.ts @@ -4,8 +4,15 @@ import { HomePageController } from "src/identity-and-account/help/help-page.cont import { HomePageService } from "src/identity-and-account/help/help-page.service"; @Module({ - controllers: [HomePageController], - providers: [HomePageService, EmailToIdResolver], - exports: [HomePageService], + controllers: [ + HomePageController + ], + providers: [ + HomePageService, + EmailToIdResolver + ], + exports: [ + HomePageService + ], }) export class HomePageModule { }; \ No newline at end of file diff --git a/src/identity-and-account/help/help-page.service.ts b/src/identity-and-account/help/help-page.service.ts index 085c16d..014724d 100644 --- a/src/identity-and-account/help/help-page.service.ts +++ b/src/identity-and-account/help/help-page.service.ts @@ -10,7 +10,9 @@ export class HomePageService { private readonly emailresolver: EmailToIdResolver, ) { } - buildHomePageHelpMessage = async (email: string): Promise> => { + buildHomePageHelpMessage = async ( + email: string + ): Promise> => { const user_id = await this.emailresolver.resolveUserIdWithEmail(email); if (!user_id.success) return { success: false, error: 'INVALID_EMAIL' }; diff --git a/src/identity-and-account/preferences/preferences.controller.ts b/src/identity-and-account/preferences/preferences.controller.ts index 6c6a814..ffc1292 100644 --- a/src/identity-and-account/preferences/preferences.controller.ts +++ b/src/identity-and-account/preferences/preferences.controller.ts @@ -12,14 +12,19 @@ export class PreferencesController { @Patch('update') @ModuleAccessAllowed(ModulesEnum.personal_profile) - async updatePreferences(@Access('email') email: string, @Body() payload: PreferencesDto + async updatePreferences( + @Access('email') email: string, + @Body() payload: PreferencesDto ): Promise> { return this.service.updatePreferences(email, payload); } @Get() @ModuleAccessAllowed(ModulesEnum.personal_profile) - async findPreferences(@Access('email') email: string, @Query() employee_email?: string) { + async findPreferences( + @Access('email') email: string, + @Query() employee_email?: string + ) { return this.service.findPreferences(email, employee_email); } diff --git a/src/identity-and-account/preferences/preferences.module.ts b/src/identity-and-account/preferences/preferences.module.ts index 51e9117..9a8b6b7 100644 --- a/src/identity-and-account/preferences/preferences.module.ts +++ b/src/identity-and-account/preferences/preferences.module.ts @@ -4,9 +4,16 @@ import { PreferencesService } from "./preferences.service"; import { Module } from "@nestjs/common"; @Module({ - controllers: [ PreferencesController ], - providers: [ PreferencesService, EmailToIdResolver ], - exports: [ PreferencesService ], + controllers: [ + PreferencesController + ], + providers: [ + PreferencesService, + EmailToIdResolver + ], + exports: [ + PreferencesService + ], }) export class PreferencesModule {} \ No newline at end of file diff --git a/src/identity-and-account/preferences/preferences.service.ts b/src/identity-and-account/preferences/preferences.service.ts index ab188df..87cd37a 100644 --- a/src/identity-and-account/preferences/preferences.service.ts +++ b/src/identity-and-account/preferences/preferences.service.ts @@ -11,7 +11,10 @@ export class PreferencesService { private readonly emailResolver: EmailToIdResolver, ) { } - async findPreferences(email: string, employee_email?: string): Promise> { + async findPreferences( + email: string, + employee_email?: string + ): Promise> { const account_email = employee_email ?? email; const user_id = await this.emailResolver.resolveUserIdWithEmail(account_email); if (!user_id.success) return { success: false, error: 'EMPLOYEE_NOT_FOUND' }; @@ -42,7 +45,10 @@ export class PreferencesService { return { success: true, data: preferences }; } - async updatePreferences(email: string, dto: PreferencesDto): Promise> { + async updatePreferences( + email: string, + dto: PreferencesDto + ): Promise> { const user_id = await this.emailResolver.resolveUserIdWithEmail(email); if (!user_id.success) return { success: false, error: user_id.error } diff --git a/src/identity-and-account/user-module-access/module-acces.dto.ts b/src/identity-and-account/user-module-access/module-acces.dto.ts index 5e1e6be..a97b4ea 100644 --- a/src/identity-and-account/user-module-access/module-acces.dto.ts +++ b/src/identity-and-account/user-module-access/module-acces.dto.ts @@ -1,10 +1,10 @@ import { IsBoolean } from "class-validator"; export class ModuleAccess { - @IsBoolean() timesheets!: boolean; - @IsBoolean() timesheets_approval!: boolean; - @IsBoolean() employee_list!: boolean; - @IsBoolean() employee_management!: boolean; - @IsBoolean() personal_profile!: boolean; - @IsBoolean() dashboard!: boolean; + @IsBoolean() timesheets: boolean; + @IsBoolean() timesheets_approval: boolean; + @IsBoolean() employee_list: boolean; + @IsBoolean() employee_management: boolean; + @IsBoolean() personal_profile: boolean; + @IsBoolean() dashboard: boolean; } \ No newline at end of file diff --git a/src/identity-and-account/user-module-access/module-access.controller.ts b/src/identity-and-account/user-module-access/module-access.controller.ts index 55cd656..fa4fd95 100644 --- a/src/identity-and-account/user-module-access/module-access.controller.ts +++ b/src/identity-and-account/user-module-access/module-access.controller.ts @@ -1,4 +1,4 @@ -import { Body, Controller, Get, Patch, Query, Req } from "@nestjs/common"; +import { Body, Controller, Get, Patch, Query } from "@nestjs/common"; import { Access } from "src/common/decorators/module-access.decorators"; import { Result } from "src/common/errors/result-error.factory"; import { ModuleAccess } from "src/identity-and-account/user-module-access/module-acces.dto"; @@ -16,7 +16,9 @@ export class ModuleAccessController { @Get() @ModuleAccessAllowed(ModulesEnum.employee_management) - async findAccess(@Access('email') email: string, @Query('employee_email') employee_email?: string + async findAccess( + @Access('email') email: string, + @Query('employee_email') employee_email?: string ): Promise> { await this.getService.findModuleAccess(email, employee_email); return { success: true, data: true }; @@ -24,7 +26,10 @@ export class ModuleAccessController { @Patch('update') @ModuleAccessAllowed(ModulesEnum.employee_management) - async updateAccess(@Access('email') email: string, @Body() dto: ModuleAccess, @Query('employee_email') employee_email?: string + async updateAccess( + @Access('email') email: string, + @Body() dto: ModuleAccess, + @Query('employee_email') employee_email?: string ): Promise> { await this.updateService.updateModuleAccess(email, dto, employee_email); return { success: true, data: true }; diff --git a/src/identity-and-account/user-module-access/module-access.module.ts b/src/identity-and-account/user-module-access/module-access.module.ts index 47711e8..d3e6332 100644 --- a/src/identity-and-account/user-module-access/module-access.module.ts +++ b/src/identity-and-account/user-module-access/module-access.module.ts @@ -5,8 +5,16 @@ import { AccessGetService } from "src/identity-and-account/user-module-access/se import { EmailToIdResolver } from "src/common/mappers/email-id.mapper"; @Module({ - controllers: [ModuleAccessController], - providers: [AccessUpdateService, AccessGetService, EmailToIdResolver], - exports: [AccessGetService], + controllers: [ + ModuleAccessController + ], + providers: [ + AccessUpdateService, + AccessGetService, + EmailToIdResolver + ], + exports: [ + AccessGetService + ], }) export class ModuleAccessModule { } \ No newline at end of file diff --git a/src/identity-and-account/user-module-access/services/module-access-get.service.ts b/src/identity-and-account/user-module-access/services/module-access-get.service.ts index b7dcdf9..2195683 100644 --- a/src/identity-and-account/user-module-access/services/module-access-get.service.ts +++ b/src/identity-and-account/user-module-access/services/module-access-get.service.ts @@ -12,7 +12,10 @@ export class AccessGetService { private readonly emailResolver: EmailToIdResolver, ) { } - async findModuleAccess(email: string, employee_email?: string): Promise> { + async findModuleAccess( + email: string, + employee_email?: string + ): Promise> { const account_email = employee_email ?? email; const user_id = await this.emailResolver.resolveUserIdWithEmail(account_email); if (!user_id.success) return { success: false, error: 'EMPLOYEE_NOT_FOUND' }; diff --git a/src/identity-and-account/user-module-access/services/module-access-update.service.ts b/src/identity-and-account/user-module-access/services/module-access-update.service.ts index 9219623..bde6893 100644 --- a/src/identity-and-account/user-module-access/services/module-access-update.service.ts +++ b/src/identity-and-account/user-module-access/services/module-access-update.service.ts @@ -11,7 +11,11 @@ export class AccessUpdateService { private readonly emailResolver: EmailToIdResolver, ) { } - async updateModuleAccess(email: string, dto: ModuleAccess, employee_email?: string): Promise> { + async updateModuleAccess( + email: string, + dto: ModuleAccess, + employee_email?: string + ): Promise> { const account_email = employee_email ?? email; const user_id = await this.emailResolver.resolveUserIdWithEmail(account_email); if (!user_id.success) return { success: false, error: 'EMPLOYEE_NOT_FOUND' }; @@ -52,7 +56,10 @@ export class AccessUpdateService { return { success: true, data: updated_access }; } - async revokeModuleAccess(email: string, employee_email?: string): Promise> { + async revokeModuleAccess( + email: string, + employee_email?: string + ): Promise> { const account_email = employee_email ?? email; const user_id = await this.emailResolver.resolveUserIdWithEmail(account_email); if (!user_id.success) return { success: false, error: 'EMPLOYEE_NOT_FOUND' }; diff --git a/src/identity-and-account/users-management/services/abstract-user.service.ts b/src/identity-and-account/users-management/services/abstract-user.service.ts index 565490f..07a88b3 100644 --- a/src/identity-and-account/users-management/services/abstract-user.service.ts +++ b/src/identity-and-account/users-management/services/abstract-user.service.ts @@ -7,7 +7,9 @@ import { PrismaPostgresService } from 'prisma/postgres/prisma-postgres.service'; export abstract class AbstractUserService { constructor(protected readonly prisma: PrismaPostgresService) { } - async findOneByEmail(email: string): Promise> { + async findOneByEmail( + email: string + ): Promise> { const user = await this.prisma.users.findUnique({ where: { email }, include: { diff --git a/src/identity-and-account/users-management/user.dto.ts b/src/identity-and-account/users-management/user.dto.ts index 11663ae..83a3f6a 100644 --- a/src/identity-and-account/users-management/user.dto.ts +++ b/src/identity-and-account/users-management/user.dto.ts @@ -6,5 +6,5 @@ export class UserDto { @IsString() last_name: string; @IsEmail() email: string; @IsEnum(Roles) role: string; - @IsArray() @IsEnum(Modules, { each: true }) user_module_access!: Modules[]; + @IsArray() @IsEnum(Modules, { each: true }) user_module_access: Modules[]; } \ No newline at end of file diff --git a/src/identity-and-account/users-management/users.module.ts b/src/identity-and-account/users-management/users.module.ts index 4feec0f..120aafc 100644 --- a/src/identity-and-account/users-management/users.module.ts +++ b/src/identity-and-account/users-management/users.module.ts @@ -3,8 +3,14 @@ import { UsersService } from './services/users.service'; import { PrismaPostgresModule } from 'prisma/postgres/prisma-postgres.module'; @Module({ - imports: [PrismaPostgresModule], - providers: [UsersService], - exports: [UsersService], + imports: [ + PrismaPostgresModule + ], + providers: [ + UsersService + ], + exports: [ + UsersService + ], }) export class UsersModule {} diff --git a/src/main.ts b/src/main.ts index d434bcb..e151a3a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,8 +1,3 @@ -import 'reflect-metadata'; -import * as nodeCrypto from 'crypto'; -if (!(globalThis as any).crypto) { - (globalThis as any).crypto = nodeCrypto; -} import { NestFactory, Reflector } from '@nestjs/core'; import { AppModule } from './app.module'; import { ModulesGuard } from './common/guards/modules.guard'; @@ -14,13 +9,14 @@ import { PrismaPostgresService } from 'prisma/postgres/prisma-postgres.service'; const SESSION_TOKEN_DURATION_MINUTES = 180 async function bootstrap() { + BigInt.prototype['toJSON'] = function () { return Number(this) }; const app = await NestFactory.create(AppModule); const prisma_postgres = app.get(PrismaPostgresService); const reflector = app.get(Reflector); app.useGlobalGuards( - new ModulesGuard(reflector), //deny-by-default and Module-based Access Control + new ModulesGuard(reflector), ); // Authentication and session @@ -45,19 +41,11 @@ async function bootstrap() { // Enable CORS app.enableCors({ - origin: ['http://10.100.251.2:9011', 'http://10.5.14.111:9012', 'http://10.100.251.2:9013', 'http://localhost:9000', 'https://app.targo.ca', 'https://portail.targo.ca','https://staging.app.targo.ca'], + origin: ['http://10.100.251.2:9011', 'http://10.5.14.111:9012', 'http://10.100.251.2:9013', 'http://localhost:9000', 'https://app.targo.ca', 'https://portail.targo.ca', 'https://staging.app.targo.ca'], credentials: true, }); await app.listen(process.env.PORT ?? 3000); - - // migration function calls - // await initializePaidTimeOff(); - // await initializePreferences(); - // await extractOldTimesheets(); - // await extractOldShifts(); - // await extractOldExpenses(); - // await initSupervisor(); } bootstrap(); diff --git a/src/shared/archival/archival.module.ts b/src/shared/archival/archival.module.ts deleted file mode 100644 index e48e908..0000000 --- a/src/shared/archival/archival.module.ts +++ /dev/null @@ -1,34 +0,0 @@ -// import { Module } from "@nestjs/common"; -// import { ScheduleModule } from "@nestjs/schedule"; -// import { TimesheetsModule } from "../timesheets/timesheets.module"; -// import { ExpensesModule } from "../expenses/expenses.module"; -// import { ShiftsModule } from "../shifts/shifts.module"; -// import { LeaveRequestsModule } from "../leave-requests/leave-requests.module"; -// import { ArchivalService } from "./services/archival.service"; -// import { EmployeesArchiveController } from "./controllers/employees-archive.controller"; -// import { ExpensesArchiveController } from "./controllers/expenses-archive.controller"; -// import { LeaveRequestsArchiveController } from "./controllers/leave-requests-archive.controller"; -// import { ShiftsArchiveController } from "./controllers/shifts-archive.controller"; -// import { TimesheetsArchiveController } from "./controllers/timesheets-archive.controller"; -// import { EmployeesModule } from "../employees/employees.module"; - -// @Module({ -// imports: [ -// EmployeesModule, -// ScheduleModule, -// TimesheetsModule, -// ExpensesModule, -// ShiftsModule, -// LeaveRequestsModule, -// ], -// providers: [ArchivalService], -// controllers: [ -// EmployeesArchiveController, -// ExpensesArchiveController, -// LeaveRequestsArchiveController, -// ShiftsArchiveController, -// TimesheetsArchiveController, -// ], -// }) - -// export class ArchivalModule {} \ No newline at end of file diff --git a/src/shared/archival/archival.service.ts b/src/shared/archival/archival.service.ts deleted file mode 100644 index ebec1e5..0000000 --- a/src/shared/archival/archival.service.ts +++ /dev/null @@ -1,38 +0,0 @@ -// import { TimesheetArchiveService } from "src/time-and-attendance/modules/time-tracker/timesheets/services/timesheet-archive.service"; -// import { ExpensesArchivalService } from "src/time-and-attendance/modules/expenses/services/expenses-archival.service"; -// import { ShiftsArchivalService } from "src/time-and-attendance/modules/time-tracker/shifts/services/shifts-archival.service"; -// import { Injectable, Logger } from "@nestjs/common"; -// import { Cron } from "@nestjs/schedule"; - -// @Injectable() -// export class ArchivalService { -// private readonly logger = new Logger(ArchivalService.name); - -// constructor( -// private readonly timesheetsService: TimesheetArchiveService, -// private readonly expensesService: ExpensesArchivalService, -// private readonly shiftsService: ShiftsArchivalService, -// ) {} - -// @Cron('0 0 3 * * 1', {timeZone:'America/Toronto'}) // chaque premier lundi du mois à 03h00 -// async handleMonthlyArchival() { -// const today = new Date(); -// const dayOfMonth = today.getDate(); - -// if (dayOfMonth > 7) { -// this.logger.warn('Archive {awaiting 1st monday of the month for archivation process}') -// return; -// } - -// this.logger.log('monthly archivation in process'); -// try { -// await this.timesheetsService.archiveOld(); -// await this.expensesService.archiveOld(); -// await this.shiftsService.archiveOld(); -// // await this.leaveRequestsService.archiveExpired(); -// this.logger.log('archivation process done'); -// } catch (err) { -// this.logger.error('an error occured during archivation process ', err); -// } -// } -// } \ No newline at end of file diff --git a/src/shared/archival/controllers/employees-archive.controller.ts b/src/shared/archival/controllers/employees-archive.controller.ts deleted file mode 100644 index 0dc991e..0000000 --- a/src/shared/archival/controllers/employees-archive.controller.ts +++ /dev/null @@ -1,32 +0,0 @@ -// import { Controller, Get, NotFoundException, Param, ParseIntPipe, UseGuards } from "@nestjs/common"; -// import { ApiOperation, ApiResponse, ApiTags } from "@nestjs/swagger"; -// import { RolesAllowed } from "src/common/decorators/roles.decorators"; -// import { EmployeesArchivalService } from "src/modules/employees/services/employees-archival.service"; - -// @ApiTags('Employee Archives') -// // @UseGuards() -// @Controller('archives/employees') -// export class EmployeesArchiveController { -// constructor(private readonly employeesArchiveService: EmployeesArchivalService) {} - -// @Get() -// //@RolesAllowed(RoleEnum.ADMIN, RoleEnum.HR, RoleEnum.SUPERVISOR) -// @ApiOperation({ summary: 'List of archived employees'}) -// @ApiResponse({ status: 200, description: 'List of archived employees', isArray: true }) -// async findAllArchived(): Promise { -// return this.employeesArchiveService.findAllArchived(); -// } - -// @Get() -// //@RolesAllowed(RoleEnum.ADMIN, RoleEnum.HR,RoleEnum.SUPERVISOR) -// @ApiOperation({ summary: 'Fetch employee in archives with its Id'}) -// @ApiResponse({ status: 200, description: 'Archived employee found'}) -// async findOneArchived(@Param('id', ParseIntPipe) id: number ): Promise { -// try{ -// return await this.employeesArchiveService.findOneArchived(id); -// }catch { -// throw new NotFoundException(`Archived employee #${id} not found`); -// } -// } - -// } \ No newline at end of file diff --git a/src/shared/archival/controllers/expenses-archive.controller.ts b/src/shared/archival/controllers/expenses-archive.controller.ts deleted file mode 100644 index 5cd23d1..0000000 --- a/src/shared/archival/controllers/expenses-archive.controller.ts +++ /dev/null @@ -1,31 +0,0 @@ -// import { UseGuards, Controller, Get, Param, ParseIntPipe, NotFoundException } from "@nestjs/common"; -// import { ApiTags, ApiOperation, ApiResponse } from "@nestjs/swagger"; -// import { RolesAllowed } from "src/common/decorators/roles.decorators"; -// import { ExpensesArchivalService } from "src/time-and-attendance/modules/expenses/services/expenses-archival.service"; - -// @ApiTags('Expense Archives') -// // @UseGuards() -// @Controller('archives/expenses') -// export class ExpensesArchiveController { -// constructor(private readonly expensesService: ExpensesArchivalService) {} - -// @Get() -// //@RolesAllowed(RoleEnum.ADMIN, RoleEnum.HR, RoleEnum.SUPERVISOR) -// @ApiOperation({ summary: 'List of archived expenses'}) -// @ApiResponse({ status: 200, description: 'List of archived expenses', isArray: true }) -// async findAllArchived(): Promise { -// return this.expensesService.findAllArchived(); -// } - -// @Get() -// //@RolesAllowed(RoleEnum.ADMIN, RoleEnum.HR, RoleEnum.SUPERVISOR) -// @ApiOperation({ summary: 'Fetch expense in archives with its Id'}) -// @ApiResponse({ status: 200, description: 'Archived expense found'}) -// async findOneArchived(@Param('id', ParseIntPipe) id: number ): Promise { -// try{ -// return await this.expensesService.findOneArchived(id); -// }catch { -// throw new NotFoundException(`Archived expense #${id} not found`); -// } -// } -// } \ No newline at end of file diff --git a/src/shared/archival/controllers/leave-requests-archive.controller.ts b/src/shared/archival/controllers/leave-requests-archive.controller.ts deleted file mode 100644 index ec1b046..0000000 --- a/src/shared/archival/controllers/leave-requests-archive.controller.ts +++ /dev/null @@ -1,7 +0,0 @@ -// import { Controller } from '@nestjs/common'; -// import { ApiTags } from '@nestjs/swagger'; - -// @ApiTags('LeaveRequests Archives') -// // @UseGuards() -// @Controller('archives/leaveRequests') -// export class LeaveRequestsArchiveController {} \ No newline at end of file diff --git a/src/shared/archival/controllers/shifts-archive.controller.ts b/src/shared/archival/controllers/shifts-archive.controller.ts deleted file mode 100644 index 942b65a..0000000 --- a/src/shared/archival/controllers/shifts-archive.controller.ts +++ /dev/null @@ -1,31 +0,0 @@ -// import { Get, Param, ParseIntPipe, NotFoundException, Controller, UseGuards } from "@nestjs/common"; -// import { ApiOperation, ApiResponse, ApiTags } from "@nestjs/swagger"; -// import { RolesAllowed } from "src/common/decorators/roles.decorators"; -// import { ShiftsArchivalService } from "src/time-and-attendance/modules/time-tracker/shifts/services/shifts-archival.service"; - -// @ApiTags('Shift Archives') -// // @UseGuards() -// @Controller('archives/shifts') -// export class ShiftsArchiveController { -// constructor(private readonly shiftsService: ShiftsArchivalService) {} - -// @Get() -// //@RolesAllowed(RoleEnum.ADMIN, RoleEnum.HR, RoleEnum.SUPERVISOR) -// @ApiOperation({ summary: 'List of archived shifts'}) -// @ApiResponse({ status: 200, description: 'List of archived shifts', isArray: true }) -// async findAllArchived(): Promise { -// return this.shiftsService.findAllArchived(); -// } - -// @Get() -// //@RolesAllowed(RoleEnum.ADMIN, RoleEnum.HR,RoleEnum.SUPERVISOR) -// @ApiOperation({ summary: 'Fetch shift in archives with its Id'}) -// @ApiResponse({ status: 200, description: 'Archived shift found'}) -// async findOneArchived(@Param('id', ParseIntPipe) id: number ): Promise { -// try{ -// return await this.shiftsService.findOneArchived(id); -// }catch { -// throw new NotFoundException(`Archived shift #${id} not found`); -// } -// } -// } \ No newline at end of file diff --git a/src/shared/archival/controllers/timesheets-archive.controller.ts b/src/shared/archival/controllers/timesheets-archive.controller.ts deleted file mode 100644 index 456cc11..0000000 --- a/src/shared/archival/controllers/timesheets-archive.controller.ts +++ /dev/null @@ -1,32 +0,0 @@ -// import { Controller, Get, NotFoundException, Param, ParseIntPipe, UseGuards } from "@nestjs/common"; -// import { ApiOperation, ApiResponse, ApiTags } from "@nestjs/swagger"; -// import { RolesAllowed } from "src/common/decorators/roles.decorators"; -// import { TimesheetArchiveService } from "src/time-and-attendance/modules/time-tracker/timesheets/services/timesheet-archive.service"; - -// @ApiTags('Timesheet Archives') -// // @UseGuards() -// @Controller('archives/timesheets') -// export class TimesheetsArchiveController { -// constructor(private readonly timesheetsService: TimesheetArchiveService) {} - -// @Get() -// //@RolesAllowed(RoleEnum.ADMIN, RoleEnum.HR, RoleEnum.SUPERVISOR) -// @ApiOperation({ summary: 'List of archived timesheets'}) -// @ApiResponse({ status: 200, description: 'List of archived timesheets', isArray: true }) -// async findAllArchived(): Promise { -// return this.timesheetsService.findAllArchived(); -// } - -// @Get() -// //@RolesAllowed(RoleEnum.ADMIN, RoleEnum.HR, RoleEnum.SUPERVISOR) -// @ApiOperation({ summary: 'Fetch timesheet in archives with its Id'}) -// @ApiResponse({ status: 200, description: 'Archived timesheet found'}) -// async findOneArchived(@Param('id', ParseIntPipe) id: number ): Promise { -// try{ -// return await this.timesheetsService.findOneArchived(id); -// }catch { -// throw new NotFoundException(`Archived timesheet #${id} not found`); -// } -// } - -// } \ No newline at end of file diff --git a/src/shared/notifications/notification.constants.ts b/src/shared/notifications/notification.constants.ts deleted file mode 100644 index 49115e7..0000000 --- a/src/shared/notifications/notification.constants.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const NOTIF_TYPES = { - SHIFT_OVERTIME_DAILY: 'shift.overtime.daily', - -} as const; \ No newline at end of file diff --git a/src/shared/notifications/notification.types.ts b/src/shared/notifications/notification.types.ts deleted file mode 100644 index 871d8ec..0000000 --- a/src/shared/notifications/notification.types.ts +++ /dev/null @@ -1,9 +0,0 @@ -export type NotificationCard = { - type: string; - message: string; - severity?: 'info'|'warn'|'error'; - icon?: string; - link?: string; - meta?: Record - ts: string; //new Date().toISOString() -}; diff --git a/src/shared/notifications/notifications.controller.ts b/src/shared/notifications/notifications.controller.ts deleted file mode 100644 index 9a01808..0000000 --- a/src/shared/notifications/notifications.controller.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Controller, Get, Req, Sse, - MessageEvent as NestMessageEvent } from "@nestjs/common"; -import { Observable } from "rxjs"; -import { map } from 'rxjs/operators'; -import { NotificationsService } from "src/shared/notifications/notifications.service"; - -@Controller('notifications') -export class NotificationsController { - constructor(private readonly notificationsService: NotificationsService) {} - - @Get('summary') - async summary(@Req() req) { - return this.notificationsService.summary(String(req.user.id)); - } - - @Sse('stream') - stream(@Req() req): Observable { - const userId = String(req.user.id); - return this.notificationsService.stream(userId).pipe(map((data): NestMessageEvent => ({ data }))) - } -} \ No newline at end of file diff --git a/src/shared/notifications/notifications.module.ts b/src/shared/notifications/notifications.module.ts deleted file mode 100644 index 01b5de7..0000000 --- a/src/shared/notifications/notifications.module.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Module } from "@nestjs/common"; -import { NotificationsService } from "./notifications.service"; -import { NotificationsController } from "src/shared/notifications/notifications.controller"; -@Module({ - providers: [NotificationsService], - controllers: [NotificationsController], - exports: [NotificationsService], -}) -export class NotificationsModule {} \ No newline at end of file diff --git a/src/shared/notifications/notifications.service.ts b/src/shared/notifications/notifications.service.ts deleted file mode 100644 index f45cf34..0000000 --- a/src/shared/notifications/notifications.service.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { Injectable, Logger } from "@nestjs/common"; -import { Subject } from "rxjs"; -import { NotificationCard } from "./notification.types"; - -@Injectable() -export class NotificationsService { - private readonly logger = new Logger(NotificationsService.name); - - //Server-Sent Events FLUX and a buffer per user - private streams = new Map>(); - private buffers = new Map(); - private readonly BUFFER_MAX = Number(process.env.NOTIF_BUFFER_MAX ?? 50); - - private getOrCreateStream(user_id: string): Subject { - let stream = this.streams.get(user_id); - if (!stream){ - stream = new Subject(); - this.streams.set(user_id, stream); - } - return stream; - } - private getOrCreateBuffer(user_id: string){ - let buffer = this.buffers.get(user_id); - if(!buffer) { - buffer = []; - this.buffers.set(user_id, buffer); - } - return buffer; - } - - //in-app pushes and keep a small history - notify(user_id: string, card: NotificationCard) { - const buffer = this.getOrCreateBuffer(user_id); - buffer.unshift(card); - if (buffer.length > this.BUFFER_MAX) { - buffer.length = this.BUFFER_MAX; - } - this.getOrCreateStream(user_id).next(card); - this.logger.debug(`Notification in-app => user: ${user_id} (${card.type})`); - } - - //SSE flux for current user - stream(user_id: string) { - return this.getOrCreateStream(user_id).asObservable(); - } - - //return a summary of notifications kept in memory - async summary(user_id: string): Promise { - return this.getOrCreateBuffer(user_id); - } - - //clear buffers from memory - clear(user_id: string) { - this.buffers.set(user_id, []); - } - - onModuleDestroy() { - for (const stream of this.streams.values()) stream.complete(); - this.streams.clear(); - this.buffers.clear(); - } -} \ No newline at end of file diff --git a/src/time-and-attendance/bank-codes/bank-codes.controller.ts b/src/time-and-attendance/bank-codes/bank-codes.controller.ts index 45fa27a..db184c5 100644 --- a/src/time-and-attendance/bank-codes/bank-codes.controller.ts +++ b/src/time-and-attendance/bank-codes/bank-codes.controller.ts @@ -8,12 +8,10 @@ import { BankCodesService } from "src/time-and-attendance/bank-codes/bank-codes. @ModuleAccessAllowed(ModulesEnum.employee_management) export class BankCodesControllers { constructor(private readonly bankCodesService: BankCodesService) { } - //_____________________________________________________________________________________________ - // Deprecated or unused methods - //_____________________________________________________________________________________________ @Post() - create(@Body() dto: Prisma.BankCodesCreateInput + create( + @Body() dto: Prisma.BankCodesCreateInput ): Promise> { return this.bankCodesService.create(dto); } @@ -24,7 +22,9 @@ export class BankCodesControllers { } @Patch(':id') - update(@Param('id', ParseIntPipe) id: number, @Body() dto: Prisma.BankCodesUpdateInput + update( + @Param('id', ParseIntPipe) id: number, + @Body() dto: Prisma.BankCodesUpdateInput ): Promise> { return this.bankCodesService.update(id, dto) } diff --git a/src/time-and-attendance/bank-codes/bank-codes.dto.ts b/src/time-and-attendance/bank-codes/bank-codes.dto.ts new file mode 100644 index 0000000..1c8c3ea --- /dev/null +++ b/src/time-and-attendance/bank-codes/bank-codes.dto.ts @@ -0,0 +1,3 @@ +export class BankCodeDto { + type:string; +} \ No newline at end of file diff --git a/src/time-and-attendance/bank-codes/bank-codes.module.ts b/src/time-and-attendance/bank-codes/bank-codes.module.ts index dfacff5..5971780 100644 --- a/src/time-and-attendance/bank-codes/bank-codes.module.ts +++ b/src/time-and-attendance/bank-codes/bank-codes.module.ts @@ -4,8 +4,13 @@ import { BankCodesControllers } from "src/time-and-attendance/bank-codes/bank-co import { BankCodesService } from "src/time-and-attendance/bank-codes/bank-codes.service"; @Module({ - controllers: [BankCodesControllers], - providers: [BankCodesService, PrismaPostgresService], + controllers: [ + BankCodesControllers + ], + providers: [ + BankCodesService, + PrismaPostgresService + ], }) export class BankCodesModule {} \ No newline at end of file diff --git a/src/time-and-attendance/bank-codes/bank-codes.service.ts b/src/time-and-attendance/bank-codes/bank-codes.service.ts index 65f6e5d..f0555d0 100644 --- a/src/time-and-attendance/bank-codes/bank-codes.service.ts +++ b/src/time-and-attendance/bank-codes/bank-codes.service.ts @@ -7,7 +7,9 @@ import { Result } from "src/common/errors/result-error.factory"; export class BankCodesService { constructor(private readonly prisma: PrismaPostgresService) { } - async create(dto: Prisma.BankCodesCreateInput): Promise> { + async create( + dto: Prisma.BankCodesCreateInput + ): Promise> { try { await this.prisma.bankCodes.create({ data: { @@ -27,7 +29,10 @@ export class BankCodesService { return this.prisma.bankCodes.findMany(); } - async update(id: number, dto: Prisma.BankCodesUpdateInput): Promise> { + async update( + id: number, + dto: Prisma.BankCodesUpdateInput + ): Promise> { try { await this.prisma.bankCodes.update({ where: { id }, @@ -44,7 +49,9 @@ export class BankCodesService { } } - async delete(id: number): Promise> { + async delete( + id: number + ): Promise> { try { await this.prisma.bankCodes.delete({ where: { id }, diff --git a/src/time-and-attendance/domains/business-logics.module.ts b/src/time-and-attendance/domains/business-logics.module.ts index f0b9b56..7682556 100644 --- a/src/time-and-attendance/domains/business-logics.module.ts +++ b/src/time-and-attendance/domains/business-logics.module.ts @@ -9,7 +9,6 @@ import { Module } from "@nestjs/common"; @Module({ - imports:[], providers: [ HolidayService, MileageService, diff --git a/src/time-and-attendance/domains/services/banking-hours.service.ts b/src/time-and-attendance/domains/services/banking-hours.service.ts index e7f360d..f7c0b8a 100644 --- a/src/time-and-attendance/domains/services/banking-hours.service.ts +++ b/src/time-and-attendance/domains/services/banking-hours.service.ts @@ -8,7 +8,11 @@ export class BankedHoursService { constructor(private readonly prisma: PrismaPostgresService) { } //manage shifts with bank_code.type BANKING - manageBankingHours = async (employee_id: number, asked_hours: number, type: string): Promise> => { + manageBankingHours = async ( + employee_id: number, + asked_hours: number, + type: string + ): Promise> => { if (asked_hours <= 0) return { success: false, error: 'INVALID_BANKING_HOURS' }; try { @@ -50,8 +54,6 @@ export class BankedHoursService { } else if (type === 'WITHDRAW_BANKED') { if (asked_hours > banked_hours) { return { success: true, data: banked_hours } as Result; - } else { - } await tx.paidTimeOff.update({ where: { employee_id: employee.id }, @@ -69,7 +71,8 @@ export class BankedHoursService { return result; } catch (error) { - return { success: false, error: 'INVALID_BANKING_SHIFT' }; + console.error(error); + return { success: false, error: 'INVALID_BANKING_SHIFT: ' }; } } } \ No newline at end of file diff --git a/src/time-and-attendance/domains/services/holiday.service.ts b/src/time-and-attendance/domains/services/holiday.service.ts index 40ae1e7..277e268 100644 --- a/src/time-and-attendance/domains/services/holiday.service.ts +++ b/src/time-and-attendance/domains/services/holiday.service.ts @@ -24,7 +24,11 @@ export class HolidayService { * * @returns Average daily hours worked in the past four weeks as a `number`, to a maximum of `8` */ - private async computeHoursPrevious4Weeks(external_payroll_id: number, company_code: number, holiday_date: Date): Promise> { + private async computeHoursPrevious4Weeks( + external_payroll_id: number, + company_code: number, + holiday_date: Date + ): Promise> { try { const valid_codes = ['G1', 'G43', 'G56', 'G104', 'G105', 'G305', 'G700', 'G720']; const holiday_week_start = getWeekStart(holiday_date); @@ -42,7 +46,7 @@ export class HolidayService { }); if (!employee) - return {success: false, error: 'EMPLOYEE_NOT_FOUND'}; + return { success: false, error: 'EMPLOYEE_NOT_FOUND' }; const shifts = await this.prisma.shifts.findMany({ where: { @@ -56,8 +60,8 @@ export class HolidayService { const hours_by_week = new Map(); for (const shift of shifts) { const hours = computeHours(shift.start_time, shift.end_time); - - if (hours <= 0) + + if (hours <= 0) continue; const shift_week_start = getWeekStart(shift.date); @@ -76,11 +80,16 @@ export class HolidayService { const average_daily_hours = capped_total / 20; return { success: true, data: average_daily_hours }; } catch (error) { + console.error(error); return { success: false, error: `an error occureded during holiday calculation` } } } - async calculateHolidayPay(employeePayrollID: number, companyCode: number, holiday_date: Date): Promise> { + async calculateHolidayPay( + employeePayrollID: number, + companyCode: number, + holiday_date: Date + ): Promise> { const average_daily_hours = await this.computeHoursPrevious4Weeks(employeePayrollID, companyCode, holiday_date); if (!average_daily_hours.success) return { success: false, error: average_daily_hours.error }; diff --git a/src/time-and-attendance/domains/services/mileage.service.ts b/src/time-and-attendance/domains/services/mileage.service.ts index b946695..1dcd0b1 100644 --- a/src/time-and-attendance/domains/services/mileage.service.ts +++ b/src/time-and-attendance/domains/services/mileage.service.ts @@ -7,7 +7,10 @@ export class MileageService { constructor(private readonly prisma: PrismaPostgresService) { } - public async calculateReimbursement(amount: number, bank_code_id: number): Promise> { + public async calculateReimbursement( + amount: number, + bank_code_id: number + ): Promise> { if (amount < 0) return { success: false, error: 'The amount must be higher than 0' }; //fetch modifier diff --git a/src/time-and-attendance/domains/services/overtime.service.ts b/src/time-and-attendance/domains/services/overtime.service.ts index d4d9cb6..60f4311 100644 --- a/src/time-and-attendance/domains/services/overtime.service.ts +++ b/src/time-and-attendance/domains/services/overtime.service.ts @@ -27,11 +27,21 @@ type WeekOvertimeSummary = { @Injectable() export class OvertimeService { - private INCLUDED_TYPES = ['EMERGENCY', 'EVENING', 'OVERTIME', 'REGULAR', 'HOLIDAY', 'BANKING'] as const; // included types for weekly overtime calculation - + private INCLUDED_TYPES = [ + 'EMERGENCY', + 'EVENING', + 'OVERTIME', + 'REGULAR', + 'HOLIDAY', + 'BANKING' + ] as const; constructor(private prisma: PrismaPostgresService) { } - async getWeekOvertimeSummary(timesheet_id: number, date: Date, tx?: Tx): Promise> { + async getWeekOvertimeSummary( + timesheet_id: number, + date: Date, + tx?: Tx + ): Promise> { const db = (tx ?? this.prisma) as PrismaClient; const week_start = getWeekStart(date); diff --git a/src/time-and-attendance/domains/services/sick-leave.service.ts b/src/time-and-attendance/domains/services/sick-leave.service.ts index 19684b7..09c9993 100644 --- a/src/time-and-attendance/domains/services/sick-leave.service.ts +++ b/src/time-and-attendance/domains/services/sick-leave.service.ts @@ -8,7 +8,9 @@ import { Result } from "src/common/errors/result-error.factory"; export class SickLeaveService { constructor(private readonly prisma: PrismaPostgresService) { } - async updateSickLeaveHours(employee_id: number): Promise> { + async updateSickLeaveHours( + employee_id: number + ): Promise> { const THIRTY_DAYS = 1000 * 60 * 60 * 24 * 30; const FOURTEEN_DAYS = 1000 * 60 * 60 * 24 * 14; const today = new Date(); @@ -51,7 +53,7 @@ export class SickLeaveService { if (today.getTime() - employee.first_work_day.getTime() >= THIRTY_DAYS && employee.first_work_day.toISOString() === pto_details?.last_updated?.toISOString()) { const updated_pto = await this.addHoursToPTO(3 * 8, employee.id, today); - if (!updated_pto.success) return { success: updated_pto.success, error: updated_pto.error } + if (!updated_pto.success) return { success: updated_pto.success, error: '' + updated_pto.error } } const year_difference = today.getFullYear() - (pto_details!.last_updated?.getFullYear() ?? today.getFullYear()); @@ -69,7 +71,10 @@ export class SickLeaveService { } // create a new PTO row - async createNewPTORow(employee_id: number, today: Date): Promise, string>> { + async createNewPTORow( + employee_id: number, + today: Date + ): Promise, string>> { try { const new_pto_entry = await this.prisma.paidTimeOff.create({ data: { @@ -88,12 +93,16 @@ export class SickLeaveService { return { success: true, data: new_pto_entry }; } catch (error) { - return { success: false, error }; + return { success: false, error: '' + error }; } } // add n number of sick PTO hours to employee PTO - async addHoursToPTO(sick_hours: number, employee_id: number, last_updated: Date) { + async addHoursToPTO( + sick_hours: number, + employee_id: number, + last_updated: Date + ) { try { const update_pto = await this.prisma.paidTimeOff.update({ where: { @@ -107,13 +116,17 @@ export class SickLeaveService { return { success: true, data: update_pto }; } catch (error) { - return { success: false, error }; + console.error(error); + return { success: false, error: ''}; } }; - takeSickLeaveHours = async (employee_id: number, asked_hours: number): Promise> => { + takeSickLeaveHours = async ( + employee_id: number, + asked_hours: number + ): Promise> => { if (asked_hours <= 0) return { success: false, error: 'INVALID_BANKING_HOURS' }; - + try { const result = await this.prisma.$transaction(async (tx) => { const employee = await this.prisma.employees.findUnique({ @@ -147,81 +160,16 @@ export class SickLeaveService { last_updated: new Date(), }, }); - + return { success: true, data: asked_hours } as Result; } }); return result; } catch (error) { + console.error(error); return { success: false, error: 'INVALID_BANKING_SHIFT' }; } } - - - //LEAVE REQUEST FUNCTION - DEPRECATED - // async calculateSickLeavePay( - // employee_id: number, - // reference_date: Date, - // days_requested: number, - // hours_per_day: number, - // modifier: number, - // ): Promise> { - // if (days_requested <= 0 || hours_per_day <= 0 || modifier <= 0) { - // return { success: true, data: 0 }; - // } - - // //sets the year to jan 1st to dec 31st - // const period_start = getYearStart(reference_date); - // const period_end = reference_date; - - // //fetches all shifts of a selected employee - // const shifts = await this.prisma.shifts.findMany({ - // where: { - // timesheet: { employee_id: employee_id }, - // date: { gte: period_start, lte: period_end }, - // }, - // select: { date: true }, - // }); - - // //count the amount of worked days - // const worked_dates = new Set( - // shifts.map((shift) => shift.date.toISOString().slice(0, 10)), - // ); - // const days_worked = worked_dates.size; - - // //less than 30 worked days returns 0 - // if (days_worked < 30) { - // return { success: true, data: 0 }; - // } - - // //default 3 days allowed after 30 worked days - // let acquired_days = 3; - - // //identify the date of the 30th worked day - // const ordered_dates = Array.from(worked_dates).sort(); - // const threshold_date = new Date(ordered_dates[29]); // index 29 is the 30th day - - // //calculate each completed month, starting the 1st of the next month - // const first_bonus_date = new Date( - // threshold_date.getFullYear(), - // threshold_date.getMonth() + 1, - // 1, - // ); - // let months = - // (period_end.getFullYear() - first_bonus_date.getFullYear()) * 12 + - // (period_end.getMonth() - first_bonus_date.getMonth()) + - // 1; - // if (months < 0) months = 0; - // acquired_days += months; - - // //cap of 10 days - // if (acquired_days > 10) acquired_days = 10; - - // const payable_days = Math.min(acquired_days, days_requested); - // const raw_hours = payable_days * hours_per_day * modifier; - // const rounded = roundToQuarterHour(raw_hours); - // return { success: true, data: rounded }; - // } } diff --git a/src/time-and-attendance/domains/services/vacation.service.ts b/src/time-and-attendance/domains/services/vacation.service.ts index bf87b7c..da5f585 100644 --- a/src/time-and-attendance/domains/services/vacation.service.ts +++ b/src/time-and-attendance/domains/services/vacation.service.ts @@ -10,7 +10,6 @@ export class VacationService { private readonly emailResolver: EmailToIdResolver, ) { } - //switch employeeId for email async calculateVacationPay(email: string, start_date: Date, days_requested: number, modifier: number): Promise> { const employee_id = await this.emailResolver.findIdByEmail(email); if (!employee_id.success) return { success: false, error: employee_id.error } @@ -20,7 +19,7 @@ export class VacationService { where: { id: employee_id.data }, select: { first_work_day: true }, }); - if (!employee) return { success: false, error: `Employee #${employee_id} not found` } + if (!employee) return { success: false, error: `Employee #${employee_id.data} not found` } const hire_date = employee.first_work_day; @@ -110,10 +109,8 @@ export class VacationService { }); return result; } catch (error) { + console.error(error); return { success: false, error: 'INVALID_VACATION_SHIFT' } } } - - - } \ No newline at end of file diff --git a/src/time-and-attendance/expenses/expense.controller.ts b/src/time-and-attendance/expenses/expense.controller.ts index ee55592..3cc2ba3 100644 --- a/src/time-and-attendance/expenses/expense.controller.ts +++ b/src/time-and-attendance/expenses/expense.controller.ts @@ -1,4 +1,4 @@ -import { Controller, Post, Param, Body, Patch, Delete, Req, UnauthorizedException, Query } from "@nestjs/common"; +import { Controller, Post, Param, Body, Patch, Delete, UnauthorizedException, Query } from "@nestjs/common"; import { ExpenseDto } from "src/time-and-attendance/expenses/expense-create.dto"; import { Result } from "src/common/errors/result-error.factory"; import { ModuleAccessAllowed } from "src/common/decorators/modules-guard.decorators"; diff --git a/src/time-and-attendance/expenses/expense.utils.ts b/src/time-and-attendance/expenses/expense.utils.ts index 8dad1ae..0765706 100644 --- a/src/time-and-attendance/expenses/expense.utils.ts +++ b/src/time-and-attendance/expenses/expense.utils.ts @@ -3,19 +3,6 @@ import { toDateFromString } from "src/common/utils/date-utils"; import { ExpenseDto } from "src/time-and-attendance/expenses/expense-create.dto"; import { NormalizedExpense } from "src/time-and-attendance/utils/type.utils"; -//makes sure that a string cannot exceed 280 chars -export const truncate280 = (input: string): string => { - return input.length > 280 ? input.slice(0, 280) : input; -} - -//makes sure that the type of data of numeric values is valid -export const parseOptionalNumber = (value: unknown, field: string) => { - if (value == null) return undefined; - const parsed = Number(value); - if (Number.isNaN(parsed)) throw new Error(`Invalid value : ${value} for ${field}`); - return parsed; -}; - //makes sure that comments are the right length the date is of Date type export const normalizeAndParseExpenseDto = async (dto: ExpenseDto): Promise> => { const mileage = parseOptionalNumber(dto.mileage, "mileage"); @@ -37,4 +24,17 @@ export const normalizeAndParseExpenseDto = async (dto: ExpenseDto): Promise { + return input.length > 280 ? input.slice(0, 280) : input; +} + +//makes sure that the type of data of numeric values is valid +export const parseOptionalNumber = (value: unknown, field: string) => { + if (value == null) return undefined; + const parsed = Number(value); + if (Number.isNaN(parsed)) throw new Error(`Invalid value for ${field}`); + return parsed; +}; \ No newline at end of file diff --git a/src/time-and-attendance/expenses/expenses.module.ts b/src/time-and-attendance/expenses/expenses.module.ts index c0206a7..f04e12c 100644 --- a/src/time-and-attendance/expenses/expenses.module.ts +++ b/src/time-and-attendance/expenses/expenses.module.ts @@ -9,7 +9,9 @@ import { ExpenseCreateService } from "src/time-and-attendance/expenses/services/ import { PayPeriodEventService } from "src/time-and-attendance/pay-period/services/pay-period-event.service"; @Module({ - controllers: [ExpenseController], + controllers: [ + ExpenseController + ], providers: [ ExpenseCreateService, ExpenseUpdateService, diff --git a/src/time-and-attendance/expenses/services/expense-create.service.ts b/src/time-and-attendance/expenses/services/expense-create.service.ts index 1a9668b..4da0de3 100644 --- a/src/time-and-attendance/expenses/services/expense-create.service.ts +++ b/src/time-and-attendance/expenses/services/expense-create.service.ts @@ -21,7 +21,11 @@ export class ExpenseCreateService { //_________________________________________________________________ // CREATE //_________________________________________________________________ - async createExpense(dto: ExpenseDto, email: string, employee_email?: string): Promise> { + async createExpense( + dto: ExpenseDto, + email: string, + employee_email?: string + ): Promise> { try { const accountEmail = employee_email ?? email; @@ -77,6 +81,7 @@ export class ExpenseCreateService { return { success: true, data: created }; } catch (error) { + console.error(error); return { success: false, error: 'INVALID_EXPENSE' }; } } diff --git a/src/time-and-attendance/expenses/services/expense-delete.service.ts b/src/time-and-attendance/expenses/services/expense-delete.service.ts index 9662243..4c1a8c1 100644 --- a/src/time-and-attendance/expenses/services/expense-delete.service.ts +++ b/src/time-and-attendance/expenses/services/expense-delete.service.ts @@ -10,12 +10,12 @@ export class ExpenseDeleteService { private readonly prisma: PrismaPostgresService, private readonly payPeriodEventService: PayPeriodEventService, private readonly emailResolver: EmailToIdResolver, - ){} + ) { } - //_________________________________________________________________ - // DELETE - //_________________________________________________________________ - async deleteExpense(expense_id: number, email: string): Promise> { + async deleteExpense( + expense_id: number, + email: string + ): Promise> { // get employee id of employee who made delete request const employee = await this.emailResolver.findIdByEmail(email); @@ -23,7 +23,7 @@ export class ExpenseDeleteService { // confirm ownership of expense to employee who made request const expense = await this.prisma.expenses.findUnique({ - where: { id: expense_id}, + where: { id: expense_id }, select: { timesheet: { select: { @@ -33,7 +33,7 @@ export class ExpenseDeleteService { } }); - if (!expense || expense.timesheet.employee_id !== employee.data) return { success: false, error: 'EXPENSE_NOT_FOUND'}; + if (!expense || expense.timesheet.employee_id !== employee.data) return { success: false, error: 'EXPENSE_NOT_FOUND' }; try { await this.prisma.$transaction(async (tx) => { @@ -56,6 +56,7 @@ export class ExpenseDeleteService { return { success: true, data: expense_id }; } catch (error) { + console.error(error); return { success: false, error: `EXPENSE_NOT_FOUND` }; } } diff --git a/src/time-and-attendance/expenses/services/expense-update.service.ts b/src/time-and-attendance/expenses/services/expense-update.service.ts index 453bd6b..6149e77 100644 --- a/src/time-and-attendance/expenses/services/expense-update.service.ts +++ b/src/time-and-attendance/expenses/services/expense-update.service.ts @@ -17,10 +17,12 @@ export class ExpenseUpdateService { private readonly typeResolver: BankCodesResolver, private readonly payPeriodEventService: PayPeriodEventService, ) { } - //_________________________________________________________________ - // UPDATE - //_________________________________________________________________ - async updateExpense(dto: ExpenseDto, email: string, employee_email?: string): Promise> { + + async updateExpense( + dto: ExpenseDto, + email: string, + employee_email?: string + ): Promise> { try { const account_email = employee_email ?? email; //fetch employee_id using req.user.email @@ -79,6 +81,7 @@ export class ExpenseUpdateService { return { success: true, data: updated }; } catch (error) { + console.error(error); return { success: false, error: 'EXPENSE_NOT_FOUND' }; } } diff --git a/src/time-and-attendance/exports/csv-exports.controller.ts b/src/time-and-attendance/exports/csv-exports.controller.ts index ec9e2f3..6064319 100644 --- a/src/time-and-attendance/exports/csv-exports.controller.ts +++ b/src/time-and-attendance/exports/csv-exports.controller.ts @@ -44,7 +44,7 @@ export class CsvExportController { }, } ); - const csv_buffer = await this.generator.generateCsv(rows); + const csv_buffer = this.generator.generateCsv(rows); response.set({ 'Content-Type': 'text/csv; charset=utf-8', diff --git a/src/time-and-attendance/exports/csv-exports.module.ts b/src/time-and-attendance/exports/csv-exports.module.ts index ad60848..f203b23 100644 --- a/src/time-and-attendance/exports/csv-exports.module.ts +++ b/src/time-and-attendance/exports/csv-exports.module.ts @@ -14,7 +14,9 @@ import { EmailToIdResolver } from "src/common/mappers/email-id.mapper"; HolidayService, EmailToIdResolver, ], - controllers: [CsvExportController], + controllers: [ + CsvExportController + ], }) export class CsvExportModule { } diff --git a/src/time-and-attendance/exports/csv-exports.utils.ts b/src/time-and-attendance/exports/csv-exports.utils.ts index f2a13ef..ea30769 100644 --- a/src/time-and-attendance/exports/csv-exports.utils.ts +++ b/src/time-and-attendance/exports/csv-exports.utils.ts @@ -12,7 +12,7 @@ export const consolidateRowHoursAndAmountByType = (rows: InternalCsvRow[]): Inte for (const row of rows) { if (row.code === VACATION) { - map.set(`${row.code}|${row.shift_date}|${row.timesheet_id}`, row); + map.set(`${row.code}|${row.shift_date.toString()}|${row.timesheet_id}`, row); } else { const key = `${row.code}|${row.timesheet_id}`; if (!map.has(key)) { diff --git a/src/time-and-attendance/exports/services/csv-builder.service.ts b/src/time-and-attendance/exports/services/csv-builder.service.ts index ccc9e17..caf5a1c 100644 --- a/src/time-and-attendance/exports/services/csv-builder.service.ts +++ b/src/time-and-attendance/exports/services/csv-builder.service.ts @@ -4,7 +4,9 @@ import { CsvRow } from "src/time-and-attendance/exports/export-csv-options.dto"; @Injectable() export class CsvGeneratorService { //csv builder and "mise en page" - generateCsv(rows: CsvRow[]): Buffer { + generateCsv( + rows: CsvRow[] + ): Buffer { const body = rows.map(row => { const quantity_hours = (typeof row.quantite_hre === 'number') ? row.quantite_hre.toFixed(2) : ''; const amount = (typeof row.montant === 'number') ? row.montant.toFixed(2) : ''; diff --git a/src/time-and-attendance/exports/services/csv-exports.service.ts b/src/time-and-attendance/exports/services/csv-exports.service.ts index 8857aef..b9abf04 100644 --- a/src/time-and-attendance/exports/services/csv-exports.service.ts +++ b/src/time-and-attendance/exports/services/csv-exports.service.ts @@ -6,7 +6,8 @@ import { applyHolidayRequalifications, applyOvertimeRequalifications, computeWee import { OvertimeService } from "src/time-and-attendance/domains/services/overtime.service"; import { HolidayService } from "src/time-and-attendance/domains/services/holiday.service"; import { select_csv_expense_lines, select_csv_shift_lines } from "src/time-and-attendance/utils/selects.utils"; -import { BillableShiftType } from "src/time-and-attendance/shifts/shift.types"; +import { BillableShiftType } from "src/time-and-attendance/shifts/shift.dto"; + @Injectable() export class CsvExportService { @@ -33,7 +34,11 @@ export class CsvExportService { * @returns The desired filtered data in semi-colon-separated format, grouped and sorted by * employee and by bank codes. */ - async collectTransaction(year: number, period_no: number, filters: Filters): Promise { + async collectTransaction( + year: number, + period_no: number, + filters: Filters + ): Promise { const BILLABLE_SHIFT_TYPES: BillableShiftType[] = []; if (filters.types.shifts) BILLABLE_SHIFT_TYPES.push('REGULAR', 'OVERTIME', 'EMERGENCY', 'EVENING', 'SICK'); @@ -70,10 +75,10 @@ export class CsvExportService { }); const rows: InternalCsvRow[] = exportedShifts.map(shift => { - const employee = shift!.timesheet.employee; - const week = computeWeekNumber(start, shift!.date); - const type_transaction = shift!.bank_code.bank_code.charAt(0); - const code = Number(shift!.bank_code.bank_code.slice(1,)); + const employee = shift.timesheet.employee; + const week = computeWeekNumber(start, shift.date); + const type_transaction = shift.bank_code.bank_code.charAt(0); + const code = Number(shift.bank_code.bank_code.slice(1,)); const isPTO = PTO_SHIFT_CODES.includes(shift.bank_code.bank_code) return { @@ -84,7 +89,7 @@ export class CsvExportService { releve: 0, type_transaction: type_transaction, code: code, - quantite_hre: computeHours(shift!.start_time, shift!.end_time), + quantite_hre: computeHours(shift.start_time, shift.end_time), taux_horaire: '', montant: undefined, semaine_no: week, @@ -93,8 +98,8 @@ export class CsvExportService { departem_no: undefined, sous_departem_no: undefined, date_transaction: formatDate(end), - premier_jour_absence: isPTO ? formatDate(shift!.date) : '', - dernier_jour_absence: isPTO ? formatDate(shift!.date) : '', + premier_jour_absence: isPTO ? formatDate(shift.date) : '', + dernier_jour_absence: isPTO ? formatDate(shift.date) : '', } }); @@ -110,8 +115,8 @@ export class CsvExportService { exportedExpenses.map(expense => { const employee = expense.timesheet.employee; - const type_transaction = expense!.bank_code.bank_code.charAt(0); - const code = Number(expense!.bank_code.bank_code.slice(1,)) + const type_transaction = expense.bank_code.bank_code.charAt(0); + const code = Number(expense.bank_code.bank_code.slice(1,)) const week = computeWeekNumber(start, expense.date); rows.push({ @@ -144,7 +149,7 @@ export class CsvExportService { ); const holiday_rows = await applyHolidayRequalifications(rows, this.holiday_service, HOLIDAY_SHIFT_CODE[0]); - const consolidated_rows = await consolidateRowHoursAndAmountByType(holiday_rows); + const consolidated_rows = consolidateRowHoursAndAmountByType(holiday_rows); //requalifies regular hours into overtime when needed const requalified_rows = await applyOvertimeRequalifications(consolidated_rows, this.overtime_service); diff --git a/src/time-and-attendance/paid-time-off/paid-time-off.module.ts b/src/time-and-attendance/paid-time-off/paid-time-off.module.ts index 704f2b9..2d94716 100644 --- a/src/time-and-attendance/paid-time-off/paid-time-off.module.ts +++ b/src/time-and-attendance/paid-time-off/paid-time-off.module.ts @@ -8,7 +8,9 @@ import { PaidTimeOffController } from "src/time-and-attendance/paid-time-off/pai import { PaidTimeOffBankHoursService } from "src/time-and-attendance/paid-time-off/paid-time-off.service"; @Module({ - controllers: [PaidTimeOffController], + controllers: [ + PaidTimeOffController + ], providers: [ PrismaPostgresService, EmailToIdResolver, diff --git a/src/time-and-attendance/paid-time-off/paid-time-off.service.ts b/src/time-and-attendance/paid-time-off/paid-time-off.service.ts index f3ebaa2..609e908 100644 --- a/src/time-and-attendance/paid-time-off/paid-time-off.service.ts +++ b/src/time-and-attendance/paid-time-off/paid-time-off.service.ts @@ -18,7 +18,9 @@ export class PaidTimeOffBankHoursService { private readonly emailResolver: EmailToIdResolver, ) { } - getPaidTimeOffTotalsWithEmployeeEmail = async (email: string): Promise, string>> => { + getPaidTimeOffTotalsWithEmployeeEmail = async ( + email: string + ): Promise, string>> => { const employee_info = await this.emailResolver.findIdByEmail(email); @@ -112,6 +114,7 @@ export class PaidTimeOffBankHoursService { }); return { success: true, data: true }; } catch (error) { + console.error(error); return { success: false, error: 'PAID_TIME_OFF_NOT_FOUND' }; } }; diff --git a/src/time-and-attendance/pay-period/dtos/bulk-crew-approval.dto.ts b/src/time-and-attendance/pay-period/dtos/bulk-crew-approval.dto.ts index 4ba5527..ed627f5 100644 --- a/src/time-and-attendance/pay-period/dtos/bulk-crew-approval.dto.ts +++ b/src/time-and-attendance/pay-period/dtos/bulk-crew-approval.dto.ts @@ -2,25 +2,13 @@ import { Type } from "class-transformer"; import { IsArray, IsBoolean, IsEmail, IsInt, ValidateNested } from "class-validator"; export class BulkCrewApprovalItemDto { - @IsInt() - pay_year: number; - - @IsInt() - period_no: number; - - @IsEmail() - employee_email!: string; - - @IsBoolean() - approve: boolean; + @IsInt() pay_year: number; + @IsInt() period_no: number; + @IsEmail() employee_email: string; + @IsBoolean() approve: boolean; } export class BulkCrewApprovalDto { - @IsBoolean() - include_subtree: boolean = false; - - @IsArray() - @ValidateNested({each: true}) - @Type(()=> BulkCrewApprovalItemDto) - items: BulkCrewApprovalItemDto[] + @IsBoolean() include_subtree: boolean = false; + @IsArray() @ValidateNested({ each: true }) @Type(() => BulkCrewApprovalItemDto) items: BulkCrewApprovalItemDto[] } \ No newline at end of file diff --git a/src/time-and-attendance/pay-period/dtos/overview-pay-period.dto.ts b/src/time-and-attendance/pay-period/dtos/overview-pay-period.dto.ts index be75a7a..9668857 100644 --- a/src/time-and-attendance/pay-period/dtos/overview-pay-period.dto.ts +++ b/src/time-and-attendance/pay-period/dtos/overview-pay-period.dto.ts @@ -27,7 +27,7 @@ export class EmployeePeriodOverviewDto { holiday_hours: number; vacation_hours: number; }; - weekly_hours: number[]; + weekly_hours: number[]; total_hours: number; expenses: number; mileage: number; diff --git a/src/time-and-attendance/pay-period/pay-periods.controller.ts b/src/time-and-attendance/pay-period/pay-periods.controller.ts index 9b5c092..6f18639 100644 --- a/src/time-and-attendance/pay-period/pay-periods.controller.ts +++ b/src/time-and-attendance/pay-period/pay-periods.controller.ts @@ -26,7 +26,9 @@ export class PayPeriodsController { @Get("date/:date") @ModuleAccessAllowed(ModulesEnum.timesheets) - async findByDate(@Param("date") date: string) { + async findByDate( + @Param("date") date: string + ) { return this.queryService.findByDate(date); } diff --git a/src/time-and-attendance/pay-period/pay-periods.mapper.ts b/src/time-and-attendance/pay-period/pay-periods.mapper.ts index 05aef06..c31e949 100644 --- a/src/time-and-attendance/pay-period/pay-periods.mapper.ts +++ b/src/time-and-attendance/pay-period/pay-periods.mapper.ts @@ -1,9 +1,13 @@ import { PayPeriods } from "prisma/postgres/generated/prisma/client/postgres/client"; import { PayPeriodDto } from "src/time-and-attendance/pay-period/dtos/overview-pay-period.dto"; -const toDateString = (date: Date) => date.toISOString().slice(0, 10); // "YYYY-MM-DD" +const toDateString = ( + date: Date +) => date.toISOString().slice(0, 10); // "YYYY-MM-DD" -export function mapPayPeriodToDto(row: PayPeriods): PayPeriodDto { +export function mapPayPeriodToDto( + row: PayPeriods +): PayPeriodDto { const start = toDateString(row.period_start); const end = toDateString(row.period_end); const pay = toDateString(row.payday); @@ -12,12 +16,13 @@ export function mapPayPeriodToDto(row: PayPeriods): PayPeriodDto { period_start: toDateString(row.period_start), period_end: toDateString(row.period_end), payday:pay, - // pay_year: new Date(pay).getFullYear(), pay_year: row.pay_year, label: `${start}.${end}`, }; } -export function mapMany(rows: PayPeriods[]): PayPeriodDto[] { +export function mapMany( + rows: PayPeriods[] +): PayPeriodDto[] { return rows.map(mapPayPeriodToDto); } diff --git a/src/time-and-attendance/pay-period/pay-periods.module.ts b/src/time-and-attendance/pay-period/pay-periods.module.ts index eaba3ce..0622e27 100644 --- a/src/time-and-attendance/pay-period/pay-periods.module.ts +++ b/src/time-and-attendance/pay-period/pay-periods.module.ts @@ -8,8 +8,12 @@ import { GetOverviewService } from "src/time-and-attendance/pay-period/services/ import { PayPeriodEventService } from "src/time-and-attendance/pay-period/services/pay-period-event.service"; @Module({ - imports:[TimesheetsModule], - controllers: [PayPeriodsController], + imports: [ + TimesheetsModule + ], + controllers: [ + PayPeriodsController + ], providers: [ PayPeriodsQueryService, PayPeriodsCommandService, @@ -17,6 +21,4 @@ import { PayPeriodEventService } from "src/time-and-attendance/pay-period/servic PayPeriodEventService, EmailToIdResolver, ], -}) - -export class PayperiodsModule {} +}) export class PayperiodsModule { } diff --git a/src/time-and-attendance/pay-period/services/pay-periods-build-overview.service.ts b/src/time-and-attendance/pay-period/services/pay-periods-build-overview.service.ts index dfd7f18..4fc43b0 100644 --- a/src/time-and-attendance/pay-period/services/pay-periods-build-overview.service.ts +++ b/src/time-and-attendance/pay-period/services/pay-periods-build-overview.service.ts @@ -11,7 +11,10 @@ export class GetOverviewService { private readonly prisma: PrismaPostgresService, ) { } - async getOverviewByYearPeriod(pay_year: number, period_no: number): Promise> { + async getOverviewByYearPeriod( + pay_year: number, + period_no: number + ): Promise> { const period = computePeriod(pay_year, period_no); const overview = await this.buildOverview({ period_start: period.period_start, @@ -26,7 +29,9 @@ export class GetOverviewService { return { success: true, data: overview.data } } - async buildOverview(overview: Overview): Promise> { + async buildOverview( + overview: Overview + ): Promise> { const employee_overviews = await this.prisma.employees.findMany({ where: { OR: [ @@ -103,7 +108,12 @@ export class GetOverviewService { } } - const ensure = (id: number, first_name: string, last_name: string, email: string) => { + const ensure = ( + id: number, + first_name: string, + last_name: string, + email: string + ) => { if (!by_employee.has(id)) { by_employee.set(id, this.createEmployeeSeeds(email, first_name, last_name)); } diff --git a/src/time-and-attendance/pay-period/services/pay-periods-command.service.ts b/src/time-and-attendance/pay-period/services/pay-periods-command.service.ts index 4e992a6..b929fd6 100644 --- a/src/time-and-attendance/pay-period/services/pay-periods-command.service.ts +++ b/src/time-and-attendance/pay-period/services/pay-periods-command.service.ts @@ -14,7 +14,11 @@ export class PayPeriodsCommandService { ) { } //function to approve pay-periods according to selected crew members - async bulkApproveEmployee(email: string, timesheet_ids: number[], is_approved: boolean): Promise> { + async bulkApproveEmployee( + email: string, + timesheet_ids: number[], + is_approved: boolean + ): Promise> { let shifts: Prisma.BatchPayload; let expenses: Prisma.BatchPayload; @@ -56,7 +60,8 @@ export class PayPeriodsCommandService { is_approved: is_approved, } }) - } catch (_error) { + } catch (error) { + console.error(error); return { success: false, error: 'UNKNOWN_ERROR_VALIDATING' } } diff --git a/src/time-and-attendance/pay-period/services/pay-periods-query.service.ts b/src/time-and-attendance/pay-period/services/pay-periods-query.service.ts index 27dfc8b..6a5810f 100644 --- a/src/time-and-attendance/pay-period/services/pay-periods-query.service.ts +++ b/src/time-and-attendance/pay-period/services/pay-periods-query.service.ts @@ -10,7 +10,10 @@ export class PayPeriodsQueryService { constructor( private readonly prisma: PrismaPostgresService) { } - async findOneByYearPeriod(pay_year: number, period_no: number): Promise> { + async findOneByYearPeriod( + pay_year: number, + period_no: number + ): Promise> { const row = await this.prisma.payPeriods.findFirst({ where: { pay_year, pay_period_no: period_no }, }); @@ -32,7 +35,9 @@ export class PayPeriodsQueryService { } //function to cherry pick a Date to find a period - async findByDate(date: string): Promise> { + async findByDate( + date: string + ): Promise> { const dt = new Date(date); const row = await this.prisma.payPeriods.findFirst({ where: { period_start: { lte: dt }, period_end: { gte: dt } }, diff --git a/src/time-and-attendance/schedule-presets/schedule-presets.controller.ts b/src/time-and-attendance/schedule-presets/schedule-presets.controller.ts index e3c87c2..f4ec581 100644 --- a/src/time-and-attendance/schedule-presets/schedule-presets.controller.ts +++ b/src/time-and-attendance/schedule-presets/schedule-presets.controller.ts @@ -1,11 +1,9 @@ import { Controller, Param, Body, Get, Post, Delete, Patch } from "@nestjs/common"; - import { SchedulePresetsCreateService } from "src/time-and-attendance/schedule-presets/services/schedule-presets-create.service"; import { SchedulePresetUpdateService } from "src/time-and-attendance/schedule-presets/services/schedule-presets-update.service"; import { SchedulePresetDeleteService } from "src/time-and-attendance/schedule-presets/services/schedule-presets-delete.service"; import { SchedulePresetsGetService } from "src/time-and-attendance/schedule-presets/services/schedule-presets-get.service"; import { SchedulePresetsDto } from "src/time-and-attendance/schedule-presets/schedule-presets.dto"; - import { ModuleAccessAllowed } from "src/common/decorators/modules-guard.decorators"; import { Modules as ModulesEnum } from "prisma/postgres/generated/prisma/client/postgres/client"; import { Access } from "src/common/decorators/module-access.decorators"; @@ -29,21 +27,25 @@ export class SchedulePresetsController { @Post('create') @ModuleAccessAllowed(ModulesEnum.employee_management) - async createPreset(@Body() dto: SchedulePresetsDto) { + async createPreset( + @Body() dto: SchedulePresetsDto + ) { return await this.createService.createPreset(dto); } @Patch('update') @ModuleAccessAllowed(ModulesEnum.employee_management) async updatePreset( - @Body() dto: SchedulePresetsDto) { + @Body() dto: SchedulePresetsDto + ) { return await this.updateService.updatePreset(dto); } @Delete('delete/:id') @ModuleAccessAllowed(ModulesEnum.employee_management) async deletePreset( - @Param('id') id: number) { + @Param('id') id: number + ) { return await this.deleteService.deletePreset(id); } diff --git a/src/time-and-attendance/schedule-presets/schedule-presets.dto.ts b/src/time-and-attendance/schedule-presets/schedule-presets.dto.ts index 6650a7f..516a35f 100644 --- a/src/time-and-attendance/schedule-presets/schedule-presets.dto.ts +++ b/src/time-and-attendance/schedule-presets/schedule-presets.dto.ts @@ -1,5 +1,5 @@ import { Weekday } from "prisma/postgres/generated/prisma/client/postgres/client"; -import { ArrayMinSize, IsArray, IsBoolean, IsEnum, IsInt, IsOptional, IsString, Matches} from "class-validator"; +import { ArrayMinSize, IsArray, IsBoolean, IsEnum, IsInt, IsOptional, IsString, Matches } from "class-validator"; import { HH_MM_REGEX } from "src/common/utils/constants.utils"; export class SchedulePresetsDto { @@ -17,12 +17,12 @@ export class SchedulePresetShiftsDto { @IsOptional() @IsBoolean() is_remote?: boolean; } -export const WEEKDAY_MAP: Record = { - SUN: 0, - MON: 1, - TUE: 2, - WED: 3, - THU: 4, - FRI: 5, - SAT: 6, -}; \ No newline at end of file +export const WEEKDAY_MAP: Weekday[] = [ + 'SUN', + 'MON', + 'TUE', + 'WED', + 'THU', + 'FRI', + 'SAT' +] \ No newline at end of file diff --git a/src/time-and-attendance/schedule-presets/schedule-presets.module.ts b/src/time-and-attendance/schedule-presets/schedule-presets.module.ts index 04085d6..f6f2962 100644 --- a/src/time-and-attendance/schedule-presets/schedule-presets.module.ts +++ b/src/time-and-attendance/schedule-presets/schedule-presets.module.ts @@ -18,7 +18,9 @@ import { PayPeriodEventService } from "../pay-period/services/pay-period-event.s @Module({ - controllers: [SchedulePresetsController], + controllers: [ + SchedulePresetsController + ], providers: [ SchedulePresetsGetService, SchedulePresetsCreateService, diff --git a/src/time-and-attendance/schedule-presets/services/schedule-presets-apply.service.ts b/src/time-and-attendance/schedule-presets/services/schedule-presets-apply.service.ts index 73f96f2..0e0b4e5 100644 --- a/src/time-and-attendance/schedule-presets/services/schedule-presets-apply.service.ts +++ b/src/time-and-attendance/schedule-presets/services/schedule-presets-apply.service.ts @@ -1,17 +1,15 @@ import { Injectable } from "@nestjs/common"; import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service"; - import { sevenDaysFrom, toDateFromString, toStringFromDate, toStringFromHHmm } from "src/common/utils/date-utils"; import { BankCodesResolver } from "src/common/mappers/bank-type-id.mapper"; import { EmailToIdResolver } from "src/common/mappers/email-id.mapper"; import { Result } from "src/common/errors/result-error.factory"; - import { ShiftsCreateService } from "src/time-and-attendance/shifts/services/shifts-create.service"; import { timesheet_select } from "src/time-and-attendance/utils/selects.utils"; import { ShiftDto } from "src/time-and-attendance/shifts/shift.dto"; import { WEEKDAY_MAP } from "src/time-and-attendance/schedule-presets/schedule-presets.dto"; import { PayPeriodEventService } from "src/time-and-attendance/pay-period/services/pay-period-event.service"; -import { $Enums, SchedulePresetShifts } from "prisma/postgres/generated/prisma/client/postgres/client"; +import { SchedulePresetShifts } from "prisma/postgres/generated/prisma/client/postgres/client"; @Injectable() @@ -24,7 +22,11 @@ export class SchedulePresetsApplyService { private readonly payPeriodEventService: PayPeriodEventService, ) { } - async applyPresetToTimesheet(email: string, timesheet_id: number, employee_email?: string): Promise> { + async applyPresetToTimesheet( + email: string, + timesheet_id: number, + employee_email?: string + ): Promise> { const user_email = employee_email ?? email; const employee_id = await this.emailResolver.findIdByEmail(user_email); if (!employee_id.success) return { success: false, error: 'EMPLOYEE_NOT_FOUND' }; @@ -63,15 +65,15 @@ export class SchedulePresetsApplyService { if (timesheet.is_approved) return { success: false, error: 'INVALID_TIMESHEET' }; if (timesheet.shift.length > 0) return { success: false, error: 'INVALID_TIMESHEET' }; - const dated_map = await sevenDaysFrom(timesheet.start_date); + const dated_map = sevenDaysFrom(timesheet.start_date); - let created_shifts: ShiftDto[] = []; + const created_shifts: ShiftDto[] = []; for (const preset_shift of default_preset_shifts) { const date = dated_map.find(date => date.getUTCDay() === WEEKDAY_MAP[preset_shift.week_day]) if (!date) return { success: false, error: 'INVALID_PRESET_DATE' }; - const shift = await this.createShiftFromPreset(preset_shift, date!, timesheet.id) + const shift = await this.createShiftFromPreset(preset_shift, date, timesheet.id) if (!shift.success) return { success: false, error: shift.error }; created_shifts.push(shift.data); @@ -99,7 +101,7 @@ export class SchedulePresetsApplyService { const user_email = employee_email ?? email; const employee_id = await this.emailResolver.findIdByEmail(user_email); if (!employee_id.success) return { success: false, error: 'EMPLOYEE_NOT_FOUND' }; - const week_day = Object.keys(WEEKDAY_MAP)[week_day_index]; + const week_day = WEEKDAY_MAP[week_day_index]; const preset_shift = await this.prisma.employees.findFirst({ where: { id: employee_id.data, }, @@ -108,7 +110,7 @@ export class SchedulePresetsApplyService { select: { id: true, shifts: { - where: { week_day: $Enums.Weekday[week_day] }, + where: { week_day }, select: { bank_code_id: true, start_time: true, @@ -146,7 +148,11 @@ export class SchedulePresetsApplyService { return { success: true, data: true }; } - private createShiftFromPreset = async (preset: Partial, date: Date, timesheet_id: number): Promise> => { + private createShiftFromPreset = async ( + preset: Partial, + date: Date, + timesheet_id: number + ): Promise> => { const type = await this.typeResolver.findTypeByBankCodeId(preset.bank_code_id!); if (!type.success) return { success: false, error: 'INVALID_PRESET_SHIFT' }; diff --git a/src/time-and-attendance/schedule-presets/services/schedule-presets-create.service.ts b/src/time-and-attendance/schedule-presets/services/schedule-presets-create.service.ts index 4daf523..2a78222 100644 --- a/src/time-and-attendance/schedule-presets/services/schedule-presets-create.service.ts +++ b/src/time-and-attendance/schedule-presets/services/schedule-presets-create.service.ts @@ -1,9 +1,6 @@ import { Injectable } from "@nestjs/common"; - import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service"; - import { SchedulePresetsDto } from "src/time-and-attendance/schedule-presets/schedule-presets.dto"; - import { overlaps, toDateFromHHmm } from "src/common/utils/date-utils"; import { BankCodesResolver } from "src/common/mappers/bank-type-id.mapper"; import { Result } from "src/common/errors/result-error.factory"; @@ -14,10 +11,10 @@ export class SchedulePresetsCreateService { private readonly prisma: PrismaPostgresService, private readonly typeResolver: BankCodesResolver, ) { } - //_________________________________________________________________ - // CREATE - //_________________________________________________________________ - async createPreset(dto: SchedulePresetsDto): Promise> { + + async createPreset( + dto: SchedulePresetsDto + ): Promise> { try { //validate new unique name const existing = await this.prisma.schedulePresets.findFirst({ @@ -80,6 +77,7 @@ export class SchedulePresetsCreateService { }); return { success: true, data: true } } catch (error) { + console.error(error); return { success: false, error: 'INVALID_SCHEDULE_PRESET' } } } diff --git a/src/time-and-attendance/schedule-presets/services/schedule-presets-delete.service.ts b/src/time-and-attendance/schedule-presets/services/schedule-presets-delete.service.ts index c39dfac..ec3ed2d 100644 --- a/src/time-and-attendance/schedule-presets/services/schedule-presets-delete.service.ts +++ b/src/time-and-attendance/schedule-presets/services/schedule-presets-delete.service.ts @@ -6,24 +6,23 @@ import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service"; export class SchedulePresetDeleteService { constructor(private readonly prisma: PrismaPostgresService) { } - //_________________________________________________________________ - // DELETE - //_________________________________________________________________ - async deletePreset(preset_id: number): Promise> { - + async deletePreset( + preset_id: number + ): Promise> { + const preset = await this.prisma.schedulePresets.findUnique({ where: { id: preset_id }, select: { id: true }, }); if (!preset) return { success: false, error: `SCHEDULE_PRESET_NOT_FOUND` }; - - const updated_employees = await this.prisma.employees.updateMany({ + + await this.prisma.employees.updateMany({ where: { schedule_preset_id: preset_id }, data: { schedule_preset_id: 0, }, }); - + await this.prisma.$transaction(async (tx) => { await tx.schedulePresetShifts.deleteMany({ where: { preset_id: preset_id } }); await tx.schedulePresets.delete({ where: { id: preset_id } }); diff --git a/src/time-and-attendance/schedule-presets/services/schedule-presets-get.service.ts b/src/time-and-attendance/schedule-presets/services/schedule-presets-get.service.ts index 81fce2b..0653c98 100644 --- a/src/time-and-attendance/schedule-presets/services/schedule-presets-get.service.ts +++ b/src/time-and-attendance/schedule-presets/services/schedule-presets-get.service.ts @@ -1,9 +1,6 @@ import { Injectable } from "@nestjs/common"; - import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service"; - import { SchedulePresetsDto, SchedulePresetShiftsDto } from "../schedule-presets.dto"; - import { Result } from "src/common/errors/result-error.factory"; @Injectable() @@ -40,6 +37,7 @@ export class SchedulePresetsGetService { return { success: true, data: response }; } catch (error) { + console.error(error); return { success: false, error: `SCHEDULE_PRESET_NOT_FOUND` }; } } diff --git a/src/time-and-attendance/schedule-presets/services/schedule-presets-update.service.ts b/src/time-and-attendance/schedule-presets/services/schedule-presets-update.service.ts index fa08906..75f9217 100644 --- a/src/time-and-attendance/schedule-presets/services/schedule-presets-update.service.ts +++ b/src/time-and-attendance/schedule-presets/services/schedule-presets-update.service.ts @@ -1,8 +1,6 @@ import { Injectable } from "@nestjs/common"; import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service"; - import { SchedulePresetsDto } from "src/time-and-attendance/schedule-presets/schedule-presets.dto"; - import { overlaps, toDateFromHHmm } from "src/common/utils/date-utils"; import { BankCodesResolver } from "src/common/mappers/bank-type-id.mapper"; import { Result } from "src/common/errors/result-error.factory"; @@ -14,10 +12,9 @@ export class SchedulePresetUpdateService { private readonly typeResolver: BankCodesResolver, ) { } - //_________________________________________________________________ - // UPDATE - //_________________________________________________________________ - async updatePreset(dto: SchedulePresetsDto): Promise> { + async updatePreset( + dto: SchedulePresetsDto + ): Promise> { const existing = await this.prisma.schedulePresets.findFirst({ where: { id: dto.id }, select: { diff --git a/src/time-and-attendance/shifts/services/shifts-create.service.ts b/src/time-and-attendance/shifts/services/shifts-create.service.ts index 958f989..b4c92b1 100644 --- a/src/time-and-attendance/shifts/services/shifts-create.service.ts +++ b/src/time-and-attendance/shifts/services/shifts-create.service.ts @@ -25,10 +25,11 @@ export class ShiftsCreateService { private readonly payPeriodEventService: PayPeriodEventService, ) { } - //_________________________________________________________________ - // CREATE WRAPPER FUNCTION FOR ONE OR MANY INPUT - //_________________________________________________________________ - async createOneOrManyShifts(email: string, shifts: ShiftDto[], is_from_timesheet: boolean = true): Promise> { + async createOneOrManyShifts( + email: string, + shifts: ShiftDto[], + is_from_timesheet: boolean = true + ): Promise> { try { //verify if array is empty or not if (!Array.isArray(shifts) || shifts.length === 0) return { success: false, error: 'NO_DATA_RECEIVED' }; @@ -71,13 +72,16 @@ export class ShiftsCreateService { // returns array of created shifts return { success: true, data: true } } catch (error) { - return { success: false, error } + return { success: false, error: `${error}` } } } //_________________________________________________________________ // CREATE //_________________________________________________________________ - async createShift(employee_id: number, dto: ShiftDto): Promise> { + async createShift( + employee_id: number, + dto: ShiftDto + ): Promise> { try { //transform string format to date and HHmm const normed_shift = await this.normalizeShiftDto(dto); @@ -99,9 +103,9 @@ export class ShiftsCreateService { select: { id: true, date: true, start_time: true, end_time: true }, }); for (const existing of existing_shifts) { - const existing_start = await toDateFromString(existing.start_time); - const existing_end = await toDateFromString(existing.end_time); - const existing_date = await toDateFromString(existing.date); + const existing_start = toDateFromString(existing.start_time); + const existing_end = toDateFromString(existing.end_time); + const existing_date = toDateFromString(existing.date); const has_overlap = overlaps( { start: normed_shift.data.start_time, end: normed_shift.data.end_time, date: normed_shift.data.date }, @@ -183,13 +187,11 @@ export class ShiftsCreateService { } return { success: true, data: shift }; } catch (error) { + console.error(error); return { success: false, error: `INVALID_SHIFT` }; } } - //_________________________________________________________________ - // LOCAL HELPERS - //_________________________________________________________________ //converts all string hours and date to Date and HHmm formats private normalizeShiftDto = async (dto: ShiftDto): Promise> => { const bank_code_id = await this.typeResolver.findBankCodeIDByType(dto.type); @@ -200,6 +202,14 @@ export class ShiftsCreateService { const start_time = toDateFromHHmm(dto.start_time); const end_time = toDateFromHHmm(dto.end_time); - return { success: true, data: { date, start_time, end_time, bank_code_id: bank_code_id.data } }; + return { + success: true, + data: { + date, + start_time, + end_time, + bank_code_id: bank_code_id.data + } + }; } } diff --git a/src/time-and-attendance/shifts/services/shifts-delete.service.ts b/src/time-and-attendance/shifts/services/shifts-delete.service.ts index b1a03db..abe3d4a 100644 --- a/src/time-and-attendance/shifts/services/shifts-delete.service.ts +++ b/src/time-and-attendance/shifts/services/shifts-delete.service.ts @@ -13,13 +13,12 @@ export class ShiftsDeleteService { private readonly emailResolver: EmailToIdResolver, private readonly payPeriodEventService: PayPeriodEventService, ) { } - //_________________________________________________________________ - // DELETE - //_________________________________________________________________ - //finds shifts using shit_ids - //ajust paid-time-off banks - //blocs deletion if approved - async deleteShift(shift_id: number, email: string, is_from_timesheet: boolean = true): Promise> { + + async deleteShift( + shift_id: number, + email: string, + is_from_timesheet: boolean = true + ): Promise> { try { //verify if email is valid or not @@ -39,7 +38,7 @@ export class ShiftsDeleteService { }); if (!shift || shift.timesheet.employee_id !== employee_id.data) - return { success: false, error: 'SHIFT_NOT_FOUND'} + return { success: false, error: 'SHIFT_NOT_FOUND' } // return deletion result return await this.prisma.$transaction(async (tx) => { @@ -80,6 +79,7 @@ export class ShiftsDeleteService { return { success: true, data: shift.id }; }); } catch (error) { + console.error(error); return { success: false, error: `SHIFT_NOT_FOUND` }; } } diff --git a/src/time-and-attendance/shifts/services/shifts-update.service.ts b/src/time-and-attendance/shifts/services/shifts-update.service.ts index 2044a0e..9569b59 100644 --- a/src/time-and-attendance/shifts/services/shifts-update.service.ts +++ b/src/time-and-attendance/shifts/services/shifts-update.service.ts @@ -1,11 +1,9 @@ import { toDateFromString, toStringFromHHmm, toStringFromDate, toDateFromHHmm, overlaps, computeHours } from "src/common/utils/date-utils"; import { Injectable } from "@nestjs/common"; import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service"; - import { EmployeeTimesheetResolver } from "src/common/mappers/timesheet.mapper"; import { BankCodesResolver } from "src/common/mappers/bank-type-id.mapper"; import { Result } from "src/common/errors/result-error.factory"; - import { shift_select } from "src/time-and-attendance/utils/selects.utils"; import { Normalized } from "src/time-and-attendance/utils/type.utils"; import { ShiftDto } from "src/time-and-attendance/shifts/shift.dto"; @@ -25,14 +23,18 @@ export class ShiftsUpdateService { private readonly payPeriodEventService: PayPeriodEventService, ) { } - async updateOneOrManyShifts(shifts: ShiftDto[], email: string, is_from_timesheet: boolean = true): Promise> { + async updateOneOrManyShifts( + shifts: ShiftDto[], + email: string, + is_from_timesheet: boolean = true + ): Promise> { try { //verify if array is empty or not if (!Array.isArray(shifts) || shifts.length === 0) return { success: false, error: 'No data received' }; //check for overlap inside dto objects - const overlap_check = await this.overlapChecker(shifts); - if (!overlap_check.success) return overlap_check; + const overlap_check = this.overlapChecker(shifts); + if (!overlap_check.success) return { success: false, error: `${overlap_check.error}` }; //calls the update functions and await the return of successfull result or not const results = await Promise.allSettled(shifts.map(shift => this.updateShift(shift, email))); @@ -68,12 +70,10 @@ export class ShiftsUpdateService { // returns array of updated shifts return { success: true, data: true } } catch (error) { - return { success: false, error } + return { success: false, error: `${error}` } } } - //_________________________________________________________________ - // UPDATE - //_________________________________________________________________ + async updateShift(dto: ShiftDto, email: string): Promise> { try { const timesheet = await this.timesheetResolver.findTimesheetIdByEmail(email, toDateFromString(dto.date)); @@ -164,6 +164,7 @@ export class ShiftsUpdateService { return { success: true, data: shift }; } catch (error) { + console.error(error); return { success: false, error: `INVALID_SHIFT` }; } } @@ -185,7 +186,7 @@ export class ShiftsUpdateService { }; } - private overlapChecker = async (shifts: ShiftDto[]): Promise> => { + private overlapChecker = (shifts: ShiftDto[]) => { for (let i = 0; i < shifts.length; i++) { for (let j = i + 1; j < shifts.length; j++) { const shift_a = shifts[i]; diff --git a/src/time-and-attendance/shifts/shift.controller.ts b/src/time-and-attendance/shifts/shift.controller.ts index fba290a..bf151b8 100644 --- a/src/time-and-attendance/shifts/shift.controller.ts +++ b/src/time-and-attendance/shifts/shift.controller.ts @@ -1,11 +1,9 @@ import { Body, Controller, Delete, Param, Patch, Post } from "@nestjs/common"; import { Modules as ModulesEnum } from "prisma/postgres/generated/prisma/client/postgres/client"; - import { ShiftDto } from "src/time-and-attendance/shifts/shift.dto"; import { ShiftsCreateService } from "src/time-and-attendance/shifts/services/shifts-create.service"; import { ShiftsUpdateService } from "src/time-and-attendance/shifts/services/shifts-update.service"; import { ShiftsDeleteService } from "src/time-and-attendance/shifts/services/shifts-delete.service"; - import { ModuleAccessAllowed } from "src/common/decorators/modules-guard.decorators"; import { Result } from "src/common/errors/result-error.factory"; import { Access } from "src/common/decorators/module-access.decorators"; @@ -20,37 +18,55 @@ export class ShiftController { @Post('create') @ModuleAccessAllowed(ModulesEnum.timesheets) - createBatch(@Access('email') email: string, @Body() dtos: ShiftDto[]): Promise> { + createBatch( + @Access('email') email: string, + @Body() dtos: ShiftDto[] + ): Promise> { return this.create_service.createOneOrManyShifts(email, dtos); } @Post('create/:email') @ModuleAccessAllowed(ModulesEnum.timesheets_approval) - createBatchByTimesheetsApproval(@Param('email') email: string, @Body() dtos: ShiftDto[]): Promise> { + createBatchByTimesheetsApproval( + @Param('email') email: string, + @Body() dtos: ShiftDto[] + ): Promise> { return this.create_service.createOneOrManyShifts(email, dtos, false); } @Patch('update') @ModuleAccessAllowed(ModulesEnum.timesheets) - updateBatch(@Access('email') email: string, @Body() dtos: ShiftDto[]): Promise> { + updateBatch( + @Access('email') email: string, + @Body() dtos: ShiftDto[] + ): Promise> { return this.update_service.updateOneOrManyShifts(dtos, email); } @Patch('update/:email') @ModuleAccessAllowed(ModulesEnum.timesheets_approval) - updateBatchByTimesheetApproval(@Param('email') email: string, @Body() dtos: ShiftDto[]): Promise> { + updateBatchByTimesheetApproval( + @Param('email') email: string, + @Body() dtos: ShiftDto[] + ): Promise> { return this.update_service.updateOneOrManyShifts(dtos, email, false); } @Delete(':shift_id') @ModuleAccessAllowed(ModulesEnum.timesheets) - remove(@Access('email') email: string, @Param('shift_id') shift_id: number): Promise> { + remove( + @Access('email') email: string, + @Param('shift_id') shift_id: number + ): Promise> { return this.delete_service.deleteShift(shift_id, email); } @Delete(':shift_id/:email') @ModuleAccessAllowed(ModulesEnum.timesheets) - removeByTimesheetApproval(@Param('shift_id') shift_id: number, @Param('email') email: string): Promise> { + removeByTimesheetApproval( + @Param('shift_id') shift_id: number, + @Param('email') email: string + ): Promise> { return this.delete_service.deleteShift(shift_id, email, false); } } diff --git a/src/time-and-attendance/shifts/shift.dto.ts b/src/time-and-attendance/shifts/shift.dto.ts index 7cc9cd7..aac7a25 100644 --- a/src/time-and-attendance/shifts/shift.dto.ts +++ b/src/time-and-attendance/shifts/shift.dto.ts @@ -2,12 +2,14 @@ import { IsBoolean, IsInt, IsOptional, IsString, MaxLength } from "class-validat export class ShiftDto { @IsInt() @IsOptional() id?: number; - @IsInt() timesheet_id!: number; - @IsString() type!: string; - @IsString() date!: string; - @IsString() start_time!: string; - @IsString() end_time!: string; - @IsBoolean() is_approved!: boolean; - @IsBoolean() is_remote!: boolean; + @IsInt() timesheet_id: number; + @IsString() type: string; + @IsString() date: string; + @IsString() start_time: string; + @IsString() end_time: string; + @IsBoolean() is_approved: boolean; + @IsBoolean() is_remote: boolean; @IsOptional() @IsString() @MaxLength(280) comment?: string; -} \ No newline at end of file +} + +export type BillableShiftType = 'REGULAR' | 'EVENING' | 'EMERGENCY' | 'VACATION' | 'HOLIDAY' | 'SICK' | 'OVERTIME'; \ No newline at end of file diff --git a/src/time-and-attendance/shifts/shift.types.ts b/src/time-and-attendance/shifts/shift.types.ts deleted file mode 100644 index 744d6f9..0000000 --- a/src/time-and-attendance/shifts/shift.types.ts +++ /dev/null @@ -1 +0,0 @@ -export type BillableShiftType = 'REGULAR' | 'EVENING' | 'EMERGENCY' | 'VACATION' | 'HOLIDAY' | 'SICK' | 'OVERTIME'; \ No newline at end of file diff --git a/src/time-and-attendance/shifts/shifts.module.ts b/src/time-and-attendance/shifts/shifts.module.ts index 2374c38..7bc3863 100644 --- a/src/time-and-attendance/shifts/shifts.module.ts +++ b/src/time-and-attendance/shifts/shifts.module.ts @@ -1,6 +1,5 @@ import { Module } from '@nestjs/common'; - import { ShiftController } from 'src/time-and-attendance/shifts/shift.controller'; import { ShiftsCreateService } from 'src/time-and-attendance/shifts/services/shifts-create.service'; import { ShiftsDeleteService } from 'src/time-and-attendance/shifts/services/shifts-delete.service'; @@ -12,8 +11,12 @@ import { PaidTimeOffBankHoursService } from 'src/time-and-attendance/paid-time-o import { PayPeriodEventService } from 'src/time-and-attendance/pay-period/services/pay-period-event.service'; @Module({ - imports: [PaidTimeOffModule], - controllers: [ShiftController], + imports: [ + PaidTimeOffModule + ], + controllers: [ + ShiftController + ], providers: [ ShiftsCreateService, ShiftsUpdateService, @@ -21,7 +24,7 @@ import { PayPeriodEventService } from 'src/time-and-attendance/pay-period/servic VacationService, BankedHoursService, PaidTimeOffBankHoursService, - PayPeriodEventService, + PayPeriodEventService, ], exports: [ ShiftsCreateService, diff --git a/src/time-and-attendance/time-and-attendance.module.ts b/src/time-and-attendance/time-and-attendance.module.ts index 1fb589d..84908a4 100644 --- a/src/time-and-attendance/time-and-attendance.module.ts +++ b/src/time-and-attendance/time-and-attendance.module.ts @@ -5,38 +5,31 @@ import { BankedHoursService } from "src/time-and-attendance/domains/services/ban import { PaidTimeOffModule } from "src/time-and-attendance/paid-time-off/paid-time-off.module"; import { PaidTimeOffController } from "src/time-and-attendance/paid-time-off/paid-time-off.controller"; import { PaidTimeOffBankHoursService } from "src/time-and-attendance/paid-time-off/paid-time-off.service"; - import { ExpenseController } from "src/time-and-attendance/expenses/expense.controller"; import { ExpenseCreateService } from "src/time-and-attendance/expenses/services/expense-create.service"; import { ExpenseUpdateService } from "src/time-and-attendance/expenses/services/expense-update.service"; import { ExpenseDeleteService } from "src/time-and-attendance/expenses/services/expense-delete.service"; import { ExpensesModule } from "src/time-and-attendance/expenses/expenses.module"; - import { TimesheetController } from "src/time-and-attendance/timesheets/timesheet.controller"; import { TimesheetApprovalService } from "src/time-and-attendance/timesheets/services/timesheet-approval.service"; import { GetTimesheetsOverviewService } from "src/time-and-attendance/timesheets/services/timesheet-employee-overview.service"; import { TimesheetsModule } from "src/time-and-attendance/timesheets/timesheets.module"; - import { BankCodesResolver } from "src/common/mappers/bank-type-id.mapper"; import { EmailToIdResolver } from "src/common/mappers/email-id.mapper"; import { EmployeeTimesheetResolver } from "src/common/mappers/timesheet.mapper"; - import { PayperiodsModule } from "src/time-and-attendance/pay-period/pay-periods.module"; import { PayPeriodsController } from "src/time-and-attendance/pay-period/pay-periods.controller"; import { GetOverviewService } from "src/time-and-attendance/pay-period/services/pay-periods-build-overview.service"; import { PayPeriodsQueryService } from "src/time-and-attendance/pay-period/services/pay-periods-query.service"; import { PayPeriodsCommandService } from "src/time-and-attendance/pay-period/services/pay-periods-command.service"; - import { CsvExportModule } from "src/time-and-attendance/exports/csv-exports.module"; import { CsvExportService } from "src/time-and-attendance/exports/services/csv-exports.service"; import { CsvGeneratorService } from "src/time-and-attendance/exports/services/csv-builder.service"; import { CsvExportController } from "src/time-and-attendance/exports/csv-exports.controller"; - import { ShiftController } from "src/time-and-attendance/shifts/shift.controller"; import { ShiftsCreateService } from "src/time-and-attendance/shifts/services/shifts-create.service"; import { ShiftsUpdateService } from "src/time-and-attendance/shifts/services/shifts-update.service"; import { ShiftsDeleteService } from "src/time-and-attendance/shifts/services/shifts-delete.service"; - import { SchedulePresetsGetService } from "src/time-and-attendance/schedule-presets/services/schedule-presets-get.service"; import { SchedulePresetsController } from "src/time-and-attendance/schedule-presets/schedule-presets.controller"; import { SchedulePresetsModule } from "src/time-and-attendance/schedule-presets/schedule-presets.module"; @@ -94,5 +87,7 @@ import { PayPeriodEventService } from "./pay-period/services/pay-period-event.se PaidTimeOffBankHoursService, PayPeriodEventService, ], - exports: [TimesheetApprovalService], + exports: [ + TimesheetApprovalService + ], }) export class TimeAndAttendanceModule { }; \ No newline at end of file diff --git a/src/time-and-attendance/timesheets/services/timesheet-approval.service.ts b/src/time-and-attendance/timesheets/services/timesheet-approval.service.ts index 392a616..bc3ba72 100644 --- a/src/time-and-attendance/timesheets/services/timesheet-approval.service.ts +++ b/src/time-and-attendance/timesheets/services/timesheet-approval.service.ts @@ -1,56 +1,62 @@ import { Injectable, NotFoundException } from "@nestjs/common"; -import { Prisma, Timesheets } from "prisma/postgres/generated/prisma/client/postgres/client"; +import { Timesheets } from "prisma/postgres/generated/prisma/client/postgres/client"; import { PrismaPostgresService, TransactionClient } from "prisma/postgres/prisma-postgres.service"; import { BaseApprovalService } from "src/common/shared/base-approval.service"; import { timesheet_select } from "src/time-and-attendance/utils/selects.utils"; - - - - @Injectable() - export class TimesheetApprovalService extends BaseApprovalService{ +@Injectable() +export class TimesheetApprovalService extends BaseApprovalService { constructor( prisma: PrismaPostgresService, - ){super(prisma)} + ) { super(prisma) } - //_____________________________________________________________________________________________ - // APPROVAL AND DELEGATE METHODS - //_____________________________________________________________________________________________ protected get delegate() { return this.prisma.timesheets; } - protected delegateFor(tx: TransactionClient) { + protected delegateFor( + tx: TransactionClient + ) { return tx.timesheets; } - async updateApproval(id: number, is_approved: boolean): Promise { - return this.prisma.$transaction((tx) => + async updateApproval( + id: number, + is_approved: boolean + ): Promise { + return this.prisma.$transaction((tx) => this.updateApprovalWithTransaction(tx, id, is_approved), ); } - async cascadeApprovalWithtx(tx: TransactionClient, timesheet_id: number, is_approved: boolean): Promise { + async cascadeApprovalWithtx( + tx: TransactionClient, + timesheet_id: number, + is_approved: boolean + ): Promise { const timesheet = await this.updateApprovalWithTransaction(tx, timesheet_id, is_approved); await tx.shifts.updateMany({ where: { timesheet_id: timesheet_id }, - data: { is_approved: is_approved }, + data: { is_approved: is_approved }, }); await tx.expenses.updateMany({ where: { timesheet_id: timesheet_id }, - data: { is_approved: is_approved }, + data: { is_approved: is_approved }, }); return timesheet; } - async approveTimesheetById( timesheet_id: number, is_approved: boolean){ + async approveTimesheetById( + timesheet_id: number, + is_approved: boolean + ) { return this.prisma.$transaction(async (tx) => { const timesheet = await tx.timesheets.findUnique({ where: { id: timesheet_id }, select: { id: true }, }); - if(!timesheet) throw new NotFoundException(`Timesheet with id: ${timesheet_id} not found`); - + if (!timesheet) throw new NotFoundException(`Timesheet with id: ${timesheet_id} not found`); + await this.cascadeApprovalWithtx(tx, timesheet_id, is_approved); return tx.timesheets.findUnique({ @@ -59,4 +65,4 @@ import { timesheet_select } from "src/time-and-attendance/utils/selects.utils"; }); }); } - } \ No newline at end of file +} \ No newline at end of file diff --git a/src/time-and-attendance/timesheets/services/timesheet-employee-overview.service.ts b/src/time-and-attendance/timesheets/services/timesheet-employee-overview.service.ts index 716cfe1..1a0b2d0 100644 --- a/src/time-and-attendance/timesheets/services/timesheet-employee-overview.service.ts +++ b/src/time-and-attendance/timesheets/services/timesheet-employee-overview.service.ts @@ -15,10 +15,12 @@ export class GetTimesheetsOverviewService { private readonly emailResolver: EmailToIdResolver, ) { } - //----------------------------------------------------------------------------------- - // GET TIMESHEETS FOR A SELECTED EMPLOYEE - //----------------------------------------------------------------------------------- - async getTimesheetsForEmployeeByPeriod(email: string, pay_year: number, pay_period_no: number, employee_email?: string): Promise> { + async getTimesheetsForEmployeeByPeriod( + email: string, + pay_year: number, + pay_period_no: number, + employee_email?: string + ): Promise> { try { const account_email = employee_email ?? email; @@ -82,11 +84,11 @@ export class GetTimesheetsOverviewService { } } - //----------------------------------------------------------------------------------- - // MAPPERS & HELPERS - //----------------------------------------------------------------------------------- - //fetch timesheet's infos - private async loadTimesheets(employee_id: number, period_start: Date, period_end: Date) { + private async loadTimesheets( + employee_id: number, + period_start: Date, + period_end: Date + ) { return this.prisma.timesheets.findMany({ where: { employee_id, start_date: { gte: period_start, lte: period_end } }, include: { @@ -98,7 +100,10 @@ export class GetTimesheetsOverviewService { }); } - private ensureTimesheet = async (employee_id: number, start_date: Date | string) => { + private ensureTimesheet = async ( + employee_id: number, + start_date: Date | string + ) => { const start = toDateFromString(start_date); let row = await this.prisma.timesheets.findFirst({ diff --git a/src/time-and-attendance/timesheets/timesheet.mapper.ts b/src/time-and-attendance/timesheets/timesheet.mapper.ts index 99d3bfd..ab91fee 100644 --- a/src/time-and-attendance/timesheets/timesheet.mapper.ts +++ b/src/time-and-attendance/timesheets/timesheet.mapper.ts @@ -1,15 +1,18 @@ import { Prisma } from "prisma/postgres/generated/prisma/client/postgres/client"; import { toDateFromString, sevenDaysFrom, toStringFromDate, toHHmmFromDate } from "src/common/utils/date-utils"; +import { BankCodeDto } from "src/time-and-attendance/bank-codes/bank-codes.dto"; import { Timesheet } from "src/time-and-attendance/timesheets/timesheet.dto"; -export const mapOneTimesheet = async (timesheet: Prisma.TimesheetsGetPayload<{ - include: { - employee: { include: { user } }, - shift: { include: { bank_code }, orderBy: { start_time: 'asc' } }, - expense: { include: { bank_code } }, - } -}>): Promise => { +export const mapOneTimesheet = ( + timesheet: Prisma.TimesheetsGetPayload<{ + include: { + employee: { include: { user } }, + shift: { include: { bank_code }, orderBy: { start_time: 'asc' } }, + expense: { include: { bank_code } }, + } + }> +): Timesheet => { //converts string to UTC date format const start = toDateFromString(timesheet.start_date); const day_dates = sevenDaysFrom(start); @@ -23,7 +26,7 @@ export const mapOneTimesheet = async (timesheet: Prisma.TimesheetsGetPayload<{ shifts_by_date.set(date_string, arr); } //map of expenses by days - const expenses_by_date = new Map[]>(); + const expenses_by_date = new Map[]>(); for (const expense of timesheet.expense) { const date_string = toStringFromDate(expense.date); const arr = expenses_by_date.get(date_string) ?? []; @@ -75,11 +78,11 @@ export const mapOneTimesheet = async (timesheet: Prisma.TimesheetsGetPayload<{ const hours = diffOfHours(shift.start_time, shift.end_time); const subgroup = hoursSubGroupFromBankCode(shift.bank_code); const worked_weekly_hours = weekly_hours.regular + weekly_hours.emergency + weekly_hours.banking + weekly_hours.evening + weekly_hours.overtime + weekly_hours.holiday; - + if ((worked_weekly_hours + hours <= 40) && (subgroup === 'regular' || subgroup === 'evening')) { daily_hours['overtime'] += Math.max(daily_hours[subgroup] + hours - 8, 0); weekly_hours['overtime'] += Math.max(daily_hours[subgroup] + hours - 8, 0); - + weekly_hours[subgroup] += Math.min(hours, 8 - daily_hours[subgroup]); daily_hours[subgroup] += Math.min(hours, 8 - daily_hours[subgroup]); } else if (subgroup === 'regular' || subgroup === 'evening') { @@ -150,7 +153,7 @@ const diffOfHours = (a: Date, b: Date): number => { const num = (value: any): number => { return value ? Number(value) : 0 }; // shift's subgroup types -const hoursSubGroupFromBankCode = (bank_code: any): keyof TotalHours => { +const hoursSubGroupFromBankCode = (bank_code: BankCodeDto): keyof TotalHours => { const type = bank_code.type; if (type.includes('EVENING')) return 'evening'; if (type.includes('EMERGENCY')) return 'emergency'; @@ -164,7 +167,7 @@ const hoursSubGroupFromBankCode = (bank_code: any): keyof TotalHours => { } // expense's subgroup types -const expenseSubgroupFromBankCode = (bank_code: any): keyof TotalExpenses => { +const expenseSubgroupFromBankCode = (bank_code: BankCodeDto): keyof TotalExpenses => { const type = bank_code.type; if (type.includes('MILEAGE')) return 'mileage'; if (type.includes('PER_DIEM')) return 'per_diem'; diff --git a/src/time-and-attendance/timesheets/timesheets.module.ts b/src/time-and-attendance/timesheets/timesheets.module.ts index 1654841..3578cde 100644 --- a/src/time-and-attendance/timesheets/timesheets.module.ts +++ b/src/time-and-attendance/timesheets/timesheets.module.ts @@ -6,12 +6,16 @@ import { GetTimesheetsOverviewService } from 'src/time-and-attendance/timesheets import { EmailToIdResolver } from 'src/common/mappers/email-id.mapper'; @Module({ - controllers: [TimesheetController], - providers: [ + controllers: [ + TimesheetController + ], + providers: [ GetTimesheetsOverviewService, EmailToIdResolver, TimesheetApprovalService, ], - exports: [TimesheetApprovalService], + exports: [ + TimesheetApprovalService + ], }) -export class TimesheetsModule {} +export class TimesheetsModule { } diff --git a/src/time-and-attendance/utils/type.utils.ts b/src/time-and-attendance/utils/type.utils.ts index d88ea6f..662f445 100644 --- a/src/time-and-attendance/utils/type.utils.ts +++ b/src/time-and-attendance/utils/type.utils.ts @@ -14,7 +14,6 @@ export type NormalizedExpense = { amount?: number | Prisma.Decimal | null; mileage?: number | Prisma.Decimal | null; attachment?: number; - // bank_code_id: number; }; export type NormalizedLeaveRequest = {