Merge pull request 'dev/matthieu/tickets' (#15) from dev/matthieu/tickets into main
Reviewed-on: Targo/targo_backend#15
This commit is contained in:
commit
9ca773e47b
|
|
@ -1,6 +1,6 @@
|
||||||
// @ts-check
|
// @ts-check
|
||||||
import eslint from '@eslint/js';
|
import eslint from '@eslint/js';
|
||||||
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
// import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
||||||
import globals from 'globals';
|
import globals from 'globals';
|
||||||
import tseslint from 'typescript-eslint';
|
import tseslint from 'typescript-eslint';
|
||||||
|
|
||||||
|
|
@ -10,7 +10,7 @@ export default tseslint.config(
|
||||||
},
|
},
|
||||||
eslint.configs.recommended,
|
eslint.configs.recommended,
|
||||||
...tseslint.configs.recommendedTypeChecked,
|
...tseslint.configs.recommendedTypeChecked,
|
||||||
eslintPluginPrettierRecommended,
|
// eslintPluginPrettierRecommended,
|
||||||
{
|
{
|
||||||
languageOptions: {
|
languageOptions: {
|
||||||
globals: {
|
globals: {
|
||||||
|
|
@ -26,6 +26,7 @@ export default tseslint.config(
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rules: {
|
rules: {
|
||||||
|
"no-unused-vars": "off",
|
||||||
'@typescript-eslint/no-explicit-any': 'off',
|
'@typescript-eslint/no-explicit-any': 'off',
|
||||||
'@typescript-eslint/no-floating-promises': 'warn',
|
'@typescript-eslint/no-floating-promises': 'warn',
|
||||||
'@typescript-eslint/no-unsafe-argument': 'warn'
|
'@typescript-eslint/no-unsafe-argument': 'warn'
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ export type compta_journal_ecriture_detail_bk = Prisma.compta_journal_ecriture_d
|
||||||
export type compta_periode = Prisma.compta_periodeModel
|
export type compta_periode = Prisma.compta_periodeModel
|
||||||
/**
|
/**
|
||||||
* Model compta_ppa_file_id
|
* 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
|
export type compta_ppa_file_id = Prisma.compta_ppa_file_idModel
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ export type compta_journal_ecriture_detail_bk = Prisma.compta_journal_ecriture_d
|
||||||
export type compta_periode = Prisma.compta_periodeModel
|
export type compta_periode = Prisma.compta_periodeModel
|
||||||
/**
|
/**
|
||||||
* Model compta_ppa_file_id
|
* 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
|
export type compta_ppa_file_id = Prisma.compta_ppa_file_idModel
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -14,15 +14,15 @@ import * as $Enums from "./enums"
|
||||||
import type * as Prisma from "./internal/prismaNamespace"
|
import type * as Prisma from "./internal/prismaNamespace"
|
||||||
|
|
||||||
|
|
||||||
export type BigIntFilter<$PrismaModel = never> = {
|
export type IntFilter<$PrismaModel = never> = {
|
||||||
equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
in?: bigint[] | number[]
|
in?: number[]
|
||||||
notIn?: bigint[] | number[]
|
notIn?: number[]
|
||||||
lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
not?: Prisma.NestedBigIntFilter<$PrismaModel> | bigint | number
|
not?: Prisma.NestedIntFilter<$PrismaModel> | number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StringNullableFilter<$PrismaModel = never> = {
|
export type StringNullableFilter<$PrismaModel = never> = {
|
||||||
|
|
@ -66,17 +66,6 @@ export type StringFilter<$PrismaModel = never> = {
|
||||||
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
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> = {
|
export type IntNullableFilter<$PrismaModel = never> = {
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||||
in?: number[] | null
|
in?: number[] | null
|
||||||
|
|
@ -120,20 +109,20 @@ export type SortOrderInput = {
|
||||||
nulls?: Prisma.NullsOrder
|
nulls?: Prisma.NullsOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BigIntWithAggregatesFilter<$PrismaModel = never> = {
|
export type IntWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
in?: bigint[] | number[]
|
in?: number[]
|
||||||
notIn?: bigint[] | number[]
|
notIn?: number[]
|
||||||
lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
not?: Prisma.NestedBigIntWithAggregatesFilter<$PrismaModel> | bigint | number
|
not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
||||||
_sum?: Prisma.NestedBigIntFilter<$PrismaModel>
|
_sum?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedBigIntFilter<$PrismaModel>
|
_min?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_max?: Prisma.NestedBigIntFilter<$PrismaModel>
|
_max?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
export type StringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
|
@ -188,22 +177,6 @@ export type StringWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
_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> = {
|
export type IntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||||
in?: number[] | null
|
in?: number[] | null
|
||||||
|
|
@ -260,6 +233,33 @@ export type FloatWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
_max?: Prisma.NestedFloatFilter<$PrismaModel>
|
_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> = {
|
export type FloatNullableFilter<$PrismaModel = never> = {
|
||||||
equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> | null
|
equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> | null
|
||||||
in?: number[] | null
|
in?: number[] | null
|
||||||
|
|
@ -369,15 +369,15 @@ export type DecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
_max?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
_max?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedBigIntFilter<$PrismaModel = never> = {
|
export type NestedIntFilter<$PrismaModel = never> = {
|
||||||
equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
in?: bigint[] | number[]
|
in?: number[]
|
||||||
notIn?: bigint[] | number[]
|
notIn?: number[]
|
||||||
lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
not?: Prisma.NestedBigIntFilter<$PrismaModel> | bigint | number
|
not?: Prisma.NestedIntFilter<$PrismaModel> | number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedStringNullableFilter<$PrismaModel = never> = {
|
export type NestedStringNullableFilter<$PrismaModel = never> = {
|
||||||
|
|
@ -421,17 +421,6 @@ export type NestedStringFilter<$PrismaModel = never> = {
|
||||||
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
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> = {
|
export type NestedIntNullableFilter<$PrismaModel = never> = {
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||||
in?: number[] | null
|
in?: number[] | null
|
||||||
|
|
@ -470,20 +459,20 @@ export type NestedFloatFilter<$PrismaModel = never> = {
|
||||||
not?: Prisma.NestedFloatFilter<$PrismaModel> | number
|
not?: Prisma.NestedFloatFilter<$PrismaModel> | number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedBigIntWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedIntWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
in?: bigint[] | number[]
|
in?: number[]
|
||||||
notIn?: bigint[] | number[]
|
notIn?: number[]
|
||||||
lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
not?: Prisma.NestedBigIntWithAggregatesFilter<$PrismaModel> | bigint | number
|
not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
||||||
_sum?: Prisma.NestedBigIntFilter<$PrismaModel>
|
_sum?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedBigIntFilter<$PrismaModel>
|
_min?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_max?: Prisma.NestedBigIntFilter<$PrismaModel>
|
_max?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
|
@ -549,22 +538,6 @@ export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
_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> = {
|
export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||||
in?: number[] | null
|
in?: number[] | null
|
||||||
|
|
@ -621,6 +594,33 @@ export type NestedFloatWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
_max?: Prisma.NestedFloatFilter<$PrismaModel>
|
_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> = {
|
export type NestedFloatNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> | null
|
equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> | null
|
||||||
in?: number[] | null
|
in?: number[] | null
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -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'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ export type AccountAvgAggregateOutputType = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type AccountSumAggregateOutputType = {
|
export type AccountSumAggregateOutputType = {
|
||||||
id: bigint | null
|
id: number | null
|
||||||
date_orig: bigint | null
|
date_orig: bigint | null
|
||||||
date_last: bigint | null
|
date_last: bigint | null
|
||||||
date_expire: bigint | null
|
date_expire: bigint | null
|
||||||
|
|
@ -65,7 +65,7 @@ export type AccountSumAggregateOutputType = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type AccountMinAggregateOutputType = {
|
export type AccountMinAggregateOutputType = {
|
||||||
id: bigint | null
|
id: number | null
|
||||||
customer_id: string | null
|
customer_id: string | null
|
||||||
date_orig: bigint | null
|
date_orig: bigint | null
|
||||||
date_last: bigint | null
|
date_last: bigint | null
|
||||||
|
|
@ -131,7 +131,7 @@ export type AccountMinAggregateOutputType = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type AccountMaxAggregateOutputType = {
|
export type AccountMaxAggregateOutputType = {
|
||||||
id: bigint | null
|
id: number | null
|
||||||
customer_id: string | null
|
customer_id: string | null
|
||||||
date_orig: bigint | null
|
date_orig: bigint | null
|
||||||
date_last: bigint | null
|
date_last: bigint | null
|
||||||
|
|
@ -588,7 +588,7 @@ export type accountGroupByArgs<ExtArgs extends runtime.Types.Extensions.Internal
|
||||||
}
|
}
|
||||||
|
|
||||||
export type AccountGroupByOutputType = {
|
export type AccountGroupByOutputType = {
|
||||||
id: bigint
|
id: number
|
||||||
customer_id: string | null
|
customer_id: string | null
|
||||||
date_orig: bigint | null
|
date_orig: bigint | null
|
||||||
date_last: bigint | null
|
date_last: bigint | null
|
||||||
|
|
@ -677,7 +677,7 @@ export type accountWhereInput = {
|
||||||
AND?: Prisma.accountWhereInput | Prisma.accountWhereInput[]
|
AND?: Prisma.accountWhereInput | Prisma.accountWhereInput[]
|
||||||
OR?: Prisma.accountWhereInput[]
|
OR?: Prisma.accountWhereInput[]
|
||||||
NOT?: Prisma.accountWhereInput | Prisma.accountWhereInput[]
|
NOT?: Prisma.accountWhereInput | Prisma.accountWhereInput[]
|
||||||
id?: Prisma.BigIntFilter<"account"> | bigint | number
|
id?: Prisma.IntFilter<"account"> | number
|
||||||
customer_id?: Prisma.StringNullableFilter<"account"> | string | null
|
customer_id?: Prisma.StringNullableFilter<"account"> | string | null
|
||||||
date_orig?: Prisma.BigIntNullableFilter<"account"> | bigint | number | null
|
date_orig?: Prisma.BigIntNullableFilter<"account"> | bigint | number | null
|
||||||
date_last?: 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<{
|
export type accountWhereUniqueInput = Prisma.AtLeast<{
|
||||||
id?: bigint | number
|
id?: number
|
||||||
AND?: Prisma.accountWhereInput | Prisma.accountWhereInput[]
|
AND?: Prisma.accountWhereInput | Prisma.accountWhereInput[]
|
||||||
OR?: Prisma.accountWhereInput[]
|
OR?: Prisma.accountWhereInput[]
|
||||||
NOT?: Prisma.accountWhereInput | Prisma.accountWhereInput[]
|
NOT?: Prisma.accountWhereInput | Prisma.accountWhereInput[]
|
||||||
|
|
@ -953,7 +953,7 @@ export type accountScalarWhereWithAggregatesInput = {
|
||||||
AND?: Prisma.accountScalarWhereWithAggregatesInput | Prisma.accountScalarWhereWithAggregatesInput[]
|
AND?: Prisma.accountScalarWhereWithAggregatesInput | Prisma.accountScalarWhereWithAggregatesInput[]
|
||||||
OR?: Prisma.accountScalarWhereWithAggregatesInput[]
|
OR?: Prisma.accountScalarWhereWithAggregatesInput[]
|
||||||
NOT?: Prisma.accountScalarWhereWithAggregatesInput | 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
|
customer_id?: Prisma.StringNullableWithAggregatesFilter<"account"> | string | null
|
||||||
date_orig?: Prisma.BigIntNullableWithAggregatesFilter<"account"> | bigint | number | null
|
date_orig?: Prisma.BigIntNullableWithAggregatesFilter<"account"> | bigint | number | null
|
||||||
date_last?: Prisma.BigIntNullableWithAggregatesFilter<"account"> | bigint | number | null
|
date_last?: Prisma.BigIntNullableWithAggregatesFilter<"account"> | bigint | number | null
|
||||||
|
|
@ -1019,7 +1019,6 @@ export type accountScalarWhereWithAggregatesInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type accountCreateInput = {
|
export type accountCreateInput = {
|
||||||
id?: bigint | number
|
|
||||||
customer_id?: string | null
|
customer_id?: string | null
|
||||||
date_orig?: bigint | number | null
|
date_orig?: bigint | number | null
|
||||||
date_last?: bigint | number | null
|
date_last?: bigint | number | null
|
||||||
|
|
@ -1085,7 +1084,7 @@ export type accountCreateInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type accountUncheckedCreateInput = {
|
export type accountUncheckedCreateInput = {
|
||||||
id?: bigint | number
|
id?: number
|
||||||
customer_id?: string | null
|
customer_id?: string | null
|
||||||
date_orig?: bigint | number | null
|
date_orig?: bigint | number | null
|
||||||
date_last?: bigint | number | null
|
date_last?: bigint | number | null
|
||||||
|
|
@ -1151,7 +1150,6 @@ export type accountUncheckedCreateInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type accountUpdateInput = {
|
export type accountUpdateInput = {
|
||||||
id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
|
||||||
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
||||||
date_last?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
date_last?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
||||||
|
|
@ -1217,7 +1215,7 @@ export type accountUpdateInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type accountUncheckedUpdateInput = {
|
export type accountUncheckedUpdateInput = {
|
||||||
id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
||||||
date_last?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
date_last?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
||||||
|
|
@ -1283,7 +1281,7 @@ export type accountUncheckedUpdateInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type accountCreateManyInput = {
|
export type accountCreateManyInput = {
|
||||||
id?: bigint | number
|
id?: number
|
||||||
customer_id?: string | null
|
customer_id?: string | null
|
||||||
date_orig?: bigint | number | null
|
date_orig?: bigint | number | null
|
||||||
date_last?: bigint | number | null
|
date_last?: bigint | number | null
|
||||||
|
|
@ -1349,7 +1347,6 @@ export type accountCreateManyInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type accountUpdateManyMutationInput = {
|
export type accountUpdateManyMutationInput = {
|
||||||
id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
|
||||||
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
||||||
date_last?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
date_last?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
||||||
|
|
@ -1415,7 +1412,7 @@ export type accountUpdateManyMutationInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type accountUncheckedUpdateManyInput = {
|
export type accountUncheckedUpdateManyInput = {
|
||||||
id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
||||||
date_last?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
date_last?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
||||||
|
|
@ -1722,14 +1719,6 @@ export type accountSumOrderByAggregateInput = {
|
||||||
ppa_cc?: Prisma.SortOrder
|
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 = {
|
export type NullableStringFieldUpdateOperationsInput = {
|
||||||
set?: string | null
|
set?: string | null
|
||||||
}
|
}
|
||||||
|
|
@ -1924,7 +1913,7 @@ export type $accountPayload<ExtArgs extends runtime.Types.Extensions.InternalArg
|
||||||
name: "account"
|
name: "account"
|
||||||
objects: {}
|
objects: {}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: bigint
|
id: number
|
||||||
customer_id: string | null
|
customer_id: string | null
|
||||||
date_orig: bigint | null
|
date_orig: bigint | null
|
||||||
date_last: bigint | null
|
date_last: bigint | null
|
||||||
|
|
@ -2356,7 +2345,7 @@ export interface Prisma__accountClient<T, Null = never, ExtArgs extends runtime.
|
||||||
* Fields of the account model
|
* Fields of the account model
|
||||||
*/
|
*/
|
||||||
export interface accountFieldRefs {
|
export interface accountFieldRefs {
|
||||||
readonly id: Prisma.FieldRef<"account", 'BigInt'>
|
readonly id: Prisma.FieldRef<"account", 'Int'>
|
||||||
readonly customer_id: Prisma.FieldRef<"account", 'String'>
|
readonly customer_id: Prisma.FieldRef<"account", 'String'>
|
||||||
readonly date_orig: Prisma.FieldRef<"account", 'BigInt'>
|
readonly date_orig: Prisma.FieldRef<"account", 'BigInt'>
|
||||||
readonly date_last: Prisma.FieldRef<"account", 'BigInt'>
|
readonly date_last: Prisma.FieldRef<"account", 'BigInt'>
|
||||||
|
|
|
||||||
|
|
@ -468,6 +468,14 @@ export type account_memoSumOrderByAggregateInput = {
|
||||||
account_id?: Prisma.SortOrder
|
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<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type account_memoSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import type * as Prisma from "../internal/prismaNamespace"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model compta_ppa_file_id
|
* 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<Prisma.$compta_ppa_file_idPayload>
|
export type compta_ppa_file_idModel = runtime.Types.Result.DefaultSelection<Prisma.$compta_ppa_file_idPayload>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,8 @@ export type DeliveryAvgAggregateOutputType = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DeliverySumAggregateOutputType = {
|
export type DeliverySumAggregateOutputType = {
|
||||||
id: bigint | null
|
id: number | null
|
||||||
account_id: bigint | null
|
account_id: number | null
|
||||||
date_orig: bigint | null
|
date_orig: bigint | null
|
||||||
longitude: runtime.Decimal | null
|
longitude: runtime.Decimal | null
|
||||||
latitude: runtime.Decimal | null
|
latitude: runtime.Decimal | null
|
||||||
|
|
@ -53,8 +53,8 @@ export type DeliverySumAggregateOutputType = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DeliveryMinAggregateOutputType = {
|
export type DeliveryMinAggregateOutputType = {
|
||||||
id: bigint | null
|
id: number | null
|
||||||
account_id: bigint | null
|
account_id: number | null
|
||||||
name: string | null
|
name: string | null
|
||||||
comment: string | null
|
comment: string | null
|
||||||
date_orig: bigint | null
|
date_orig: bigint | null
|
||||||
|
|
@ -80,8 +80,8 @@ export type DeliveryMinAggregateOutputType = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DeliveryMaxAggregateOutputType = {
|
export type DeliveryMaxAggregateOutputType = {
|
||||||
id: bigint | null
|
id: number | null
|
||||||
account_id: bigint | null
|
account_id: number | null
|
||||||
name: string | null
|
name: string | null
|
||||||
comment: string | null
|
comment: string | null
|
||||||
date_orig: bigint | null
|
date_orig: bigint | null
|
||||||
|
|
@ -330,8 +330,8 @@ export type deliveryGroupByArgs<ExtArgs extends runtime.Types.Extensions.Interna
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DeliveryGroupByOutputType = {
|
export type DeliveryGroupByOutputType = {
|
||||||
id: bigint
|
id: number
|
||||||
account_id: bigint | null
|
account_id: number | null
|
||||||
name: string
|
name: string
|
||||||
comment: string
|
comment: string
|
||||||
date_orig: bigint | null
|
date_orig: bigint | null
|
||||||
|
|
@ -380,8 +380,8 @@ export type deliveryWhereInput = {
|
||||||
AND?: Prisma.deliveryWhereInput | Prisma.deliveryWhereInput[]
|
AND?: Prisma.deliveryWhereInput | Prisma.deliveryWhereInput[]
|
||||||
OR?: Prisma.deliveryWhereInput[]
|
OR?: Prisma.deliveryWhereInput[]
|
||||||
NOT?: Prisma.deliveryWhereInput | Prisma.deliveryWhereInput[]
|
NOT?: Prisma.deliveryWhereInput | Prisma.deliveryWhereInput[]
|
||||||
id?: Prisma.BigIntFilter<"delivery"> | bigint | number
|
id?: Prisma.IntFilter<"delivery"> | number
|
||||||
account_id?: Prisma.BigIntNullableFilter<"delivery"> | bigint | number | null
|
account_id?: Prisma.IntNullableFilter<"delivery"> | number | null
|
||||||
name?: Prisma.StringFilter<"delivery"> | string
|
name?: Prisma.StringFilter<"delivery"> | string
|
||||||
comment?: Prisma.StringFilter<"delivery"> | string
|
comment?: Prisma.StringFilter<"delivery"> | string
|
||||||
date_orig?: Prisma.BigIntNullableFilter<"delivery"> | bigint | number | null
|
date_orig?: Prisma.BigIntNullableFilter<"delivery"> | bigint | number | null
|
||||||
|
|
@ -435,11 +435,11 @@ export type deliveryOrderByWithRelationInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type deliveryWhereUniqueInput = Prisma.AtLeast<{
|
export type deliveryWhereUniqueInput = Prisma.AtLeast<{
|
||||||
id?: bigint | number
|
id?: number
|
||||||
AND?: Prisma.deliveryWhereInput | Prisma.deliveryWhereInput[]
|
AND?: Prisma.deliveryWhereInput | Prisma.deliveryWhereInput[]
|
||||||
OR?: Prisma.deliveryWhereInput[]
|
OR?: Prisma.deliveryWhereInput[]
|
||||||
NOT?: Prisma.deliveryWhereInput | 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
|
name?: Prisma.StringFilter<"delivery"> | string
|
||||||
comment?: Prisma.StringFilter<"delivery"> | string
|
comment?: Prisma.StringFilter<"delivery"> | string
|
||||||
date_orig?: Prisma.BigIntNullableFilter<"delivery"> | bigint | number | null
|
date_orig?: Prisma.BigIntNullableFilter<"delivery"> | bigint | number | null
|
||||||
|
|
@ -500,8 +500,8 @@ export type deliveryScalarWhereWithAggregatesInput = {
|
||||||
AND?: Prisma.deliveryScalarWhereWithAggregatesInput | Prisma.deliveryScalarWhereWithAggregatesInput[]
|
AND?: Prisma.deliveryScalarWhereWithAggregatesInput | Prisma.deliveryScalarWhereWithAggregatesInput[]
|
||||||
OR?: Prisma.deliveryScalarWhereWithAggregatesInput[]
|
OR?: Prisma.deliveryScalarWhereWithAggregatesInput[]
|
||||||
NOT?: Prisma.deliveryScalarWhereWithAggregatesInput | Prisma.deliveryScalarWhereWithAggregatesInput[]
|
NOT?: Prisma.deliveryScalarWhereWithAggregatesInput | Prisma.deliveryScalarWhereWithAggregatesInput[]
|
||||||
id?: Prisma.BigIntWithAggregatesFilter<"delivery"> | bigint | number
|
id?: Prisma.IntWithAggregatesFilter<"delivery"> | number
|
||||||
account_id?: Prisma.BigIntNullableWithAggregatesFilter<"delivery"> | bigint | number | null
|
account_id?: Prisma.IntNullableWithAggregatesFilter<"delivery"> | number | null
|
||||||
name?: Prisma.StringWithAggregatesFilter<"delivery"> | string
|
name?: Prisma.StringWithAggregatesFilter<"delivery"> | string
|
||||||
comment?: Prisma.StringWithAggregatesFilter<"delivery"> | string
|
comment?: Prisma.StringWithAggregatesFilter<"delivery"> | string
|
||||||
date_orig?: Prisma.BigIntNullableWithAggregatesFilter<"delivery"> | bigint | number | null
|
date_orig?: Prisma.BigIntNullableWithAggregatesFilter<"delivery"> | bigint | number | null
|
||||||
|
|
@ -527,8 +527,7 @@ export type deliveryScalarWhereWithAggregatesInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type deliveryCreateInput = {
|
export type deliveryCreateInput = {
|
||||||
id?: bigint | number
|
account_id?: number | null
|
||||||
account_id?: bigint | number | null
|
|
||||||
name: string
|
name: string
|
||||||
comment: string
|
comment: string
|
||||||
date_orig?: bigint | number | null
|
date_orig?: bigint | number | null
|
||||||
|
|
@ -554,8 +553,8 @@ export type deliveryCreateInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type deliveryUncheckedCreateInput = {
|
export type deliveryUncheckedCreateInput = {
|
||||||
id?: bigint | number
|
id?: number
|
||||||
account_id?: bigint | number | null
|
account_id?: number | null
|
||||||
name: string
|
name: string
|
||||||
comment: string
|
comment: string
|
||||||
date_orig?: bigint | number | null
|
date_orig?: bigint | number | null
|
||||||
|
|
@ -581,8 +580,7 @@ export type deliveryUncheckedCreateInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type deliveryUpdateInput = {
|
export type deliveryUpdateInput = {
|
||||||
id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
account_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
account_id?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
comment?: Prisma.StringFieldUpdateOperationsInput | string
|
comment?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
||||||
|
|
@ -608,8 +606,8 @@ export type deliveryUpdateInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type deliveryUncheckedUpdateInput = {
|
export type deliveryUncheckedUpdateInput = {
|
||||||
id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
account_id?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
account_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
comment?: Prisma.StringFieldUpdateOperationsInput | string
|
comment?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
||||||
|
|
@ -635,8 +633,8 @@ export type deliveryUncheckedUpdateInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type deliveryCreateManyInput = {
|
export type deliveryCreateManyInput = {
|
||||||
id?: bigint | number
|
id?: number
|
||||||
account_id?: bigint | number | null
|
account_id?: number | null
|
||||||
name: string
|
name: string
|
||||||
comment: string
|
comment: string
|
||||||
date_orig?: bigint | number | null
|
date_orig?: bigint | number | null
|
||||||
|
|
@ -662,8 +660,7 @@ export type deliveryCreateManyInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type deliveryUpdateManyMutationInput = {
|
export type deliveryUpdateManyMutationInput = {
|
||||||
id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
account_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
account_id?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
comment?: Prisma.StringFieldUpdateOperationsInput | string
|
comment?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
||||||
|
|
@ -689,8 +686,8 @@ export type deliveryUpdateManyMutationInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type deliveryUncheckedUpdateManyInput = {
|
export type deliveryUncheckedUpdateManyInput = {
|
||||||
id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
account_id?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
account_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
comment?: Prisma.StringFieldUpdateOperationsInput | string
|
comment?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
||||||
|
|
@ -892,8 +889,8 @@ export type $deliveryPayload<ExtArgs extends runtime.Types.Extensions.InternalAr
|
||||||
name: "delivery"
|
name: "delivery"
|
||||||
objects: {}
|
objects: {}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: bigint
|
id: number
|
||||||
account_id: bigint | null
|
account_id: number | null
|
||||||
name: string
|
name: string
|
||||||
comment: string
|
comment: string
|
||||||
date_orig: bigint | null
|
date_orig: bigint | null
|
||||||
|
|
@ -1285,8 +1282,8 @@ export interface Prisma__deliveryClient<T, Null = never, ExtArgs extends runtime
|
||||||
* Fields of the delivery model
|
* Fields of the delivery model
|
||||||
*/
|
*/
|
||||||
export interface deliveryFieldRefs {
|
export interface deliveryFieldRefs {
|
||||||
readonly id: Prisma.FieldRef<"delivery", 'BigInt'>
|
readonly id: Prisma.FieldRef<"delivery", 'Int'>
|
||||||
readonly account_id: Prisma.FieldRef<"delivery", 'BigInt'>
|
readonly account_id: Prisma.FieldRef<"delivery", 'Int'>
|
||||||
readonly name: Prisma.FieldRef<"delivery", 'String'>
|
readonly name: Prisma.FieldRef<"delivery", 'String'>
|
||||||
readonly comment: Prisma.FieldRef<"delivery", 'String'>
|
readonly comment: Prisma.FieldRef<"delivery", 'String'>
|
||||||
readonly date_orig: Prisma.FieldRef<"delivery", 'BigInt'>
|
readonly date_orig: Prisma.FieldRef<"delivery", 'BigInt'>
|
||||||
|
|
|
||||||
|
|
@ -48,11 +48,11 @@ export type TicketAvgAggregateOutputType = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TicketSumAggregateOutputType = {
|
export type TicketSumAggregateOutputType = {
|
||||||
id: bigint | null
|
id: number | null
|
||||||
ost_id: number | null
|
ost_id: number | null
|
||||||
parent: bigint | null
|
parent: bigint | null
|
||||||
account_id: bigint | null
|
account_id: number | null
|
||||||
delivery_id: bigint | null
|
delivery_id: number | null
|
||||||
bon_id: number | null
|
bon_id: number | null
|
||||||
dept_id: number | null
|
dept_id: number | null
|
||||||
open_by: number | null
|
open_by: number | null
|
||||||
|
|
@ -69,11 +69,11 @@ export type TicketSumAggregateOutputType = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TicketMinAggregateOutputType = {
|
export type TicketMinAggregateOutputType = {
|
||||||
id: bigint | null
|
id: number | null
|
||||||
ost_id: number | null
|
ost_id: number | null
|
||||||
parent: bigint | null
|
parent: bigint | null
|
||||||
account_id: bigint | null
|
account_id: number | null
|
||||||
delivery_id: bigint | null
|
delivery_id: number | null
|
||||||
bon_id: number | null
|
bon_id: number | null
|
||||||
subject: string | null
|
subject: string | null
|
||||||
dept_id: number | null
|
dept_id: number | null
|
||||||
|
|
@ -102,11 +102,11 @@ export type TicketMinAggregateOutputType = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TicketMaxAggregateOutputType = {
|
export type TicketMaxAggregateOutputType = {
|
||||||
id: bigint | null
|
id: number | null
|
||||||
ost_id: number | null
|
ost_id: number | null
|
||||||
parent: bigint | null
|
parent: bigint | null
|
||||||
account_id: bigint | null
|
account_id: number | null
|
||||||
delivery_id: bigint | null
|
delivery_id: number | null
|
||||||
bon_id: number | null
|
bon_id: number | null
|
||||||
subject: string | null
|
subject: string | null
|
||||||
dept_id: number | null
|
dept_id: number | null
|
||||||
|
|
@ -398,11 +398,11 @@ export type ticketGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalA
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TicketGroupByOutputType = {
|
export type TicketGroupByOutputType = {
|
||||||
id: bigint
|
id: number
|
||||||
ost_id: number | null
|
ost_id: number | null
|
||||||
parent: bigint
|
parent: bigint
|
||||||
account_id: bigint | null
|
account_id: number | null
|
||||||
delivery_id: bigint
|
delivery_id: number
|
||||||
bon_id: number | null
|
bon_id: number | null
|
||||||
subject: string | null
|
subject: string | null
|
||||||
dept_id: number | null
|
dept_id: number | null
|
||||||
|
|
@ -454,11 +454,11 @@ export type ticketWhereInput = {
|
||||||
AND?: Prisma.ticketWhereInput | Prisma.ticketWhereInput[]
|
AND?: Prisma.ticketWhereInput | Prisma.ticketWhereInput[]
|
||||||
OR?: Prisma.ticketWhereInput[]
|
OR?: Prisma.ticketWhereInput[]
|
||||||
NOT?: Prisma.ticketWhereInput | Prisma.ticketWhereInput[]
|
NOT?: Prisma.ticketWhereInput | Prisma.ticketWhereInput[]
|
||||||
id?: Prisma.BigIntFilter<"ticket"> | bigint | number
|
id?: Prisma.IntFilter<"ticket"> | number
|
||||||
ost_id?: Prisma.IntNullableFilter<"ticket"> | number | null
|
ost_id?: Prisma.IntNullableFilter<"ticket"> | number | null
|
||||||
parent?: Prisma.BigIntFilter<"ticket"> | bigint | number
|
parent?: Prisma.BigIntFilter<"ticket"> | bigint | number
|
||||||
account_id?: Prisma.BigIntNullableFilter<"ticket"> | bigint | number | null
|
account_id?: Prisma.IntNullableFilter<"ticket"> | number | null
|
||||||
delivery_id?: Prisma.BigIntFilter<"ticket"> | bigint | number
|
delivery_id?: Prisma.IntFilter<"ticket"> | number
|
||||||
bon_id?: Prisma.IntNullableFilter<"ticket"> | number | null
|
bon_id?: Prisma.IntNullableFilter<"ticket"> | number | null
|
||||||
subject?: Prisma.StringNullableFilter<"ticket"> | string | null
|
subject?: Prisma.StringNullableFilter<"ticket"> | string | null
|
||||||
dept_id?: Prisma.IntNullableFilter<"ticket"> | number | null
|
dept_id?: Prisma.IntNullableFilter<"ticket"> | number | null
|
||||||
|
|
@ -521,14 +521,14 @@ export type ticketOrderByWithRelationInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ticketWhereUniqueInput = Prisma.AtLeast<{
|
export type ticketWhereUniqueInput = Prisma.AtLeast<{
|
||||||
id?: bigint | number
|
id?: number
|
||||||
AND?: Prisma.ticketWhereInput | Prisma.ticketWhereInput[]
|
AND?: Prisma.ticketWhereInput | Prisma.ticketWhereInput[]
|
||||||
OR?: Prisma.ticketWhereInput[]
|
OR?: Prisma.ticketWhereInput[]
|
||||||
NOT?: Prisma.ticketWhereInput | Prisma.ticketWhereInput[]
|
NOT?: Prisma.ticketWhereInput | Prisma.ticketWhereInput[]
|
||||||
ost_id?: Prisma.IntNullableFilter<"ticket"> | number | null
|
ost_id?: Prisma.IntNullableFilter<"ticket"> | number | null
|
||||||
parent?: Prisma.BigIntFilter<"ticket"> | bigint | number
|
parent?: Prisma.BigIntFilter<"ticket"> | bigint | number
|
||||||
account_id?: Prisma.BigIntNullableFilter<"ticket"> | bigint | number | null
|
account_id?: Prisma.IntNullableFilter<"ticket"> | number | null
|
||||||
delivery_id?: Prisma.BigIntFilter<"ticket"> | bigint | number
|
delivery_id?: Prisma.IntFilter<"ticket"> | number
|
||||||
bon_id?: Prisma.IntNullableFilter<"ticket"> | number | null
|
bon_id?: Prisma.IntNullableFilter<"ticket"> | number | null
|
||||||
subject?: Prisma.StringNullableFilter<"ticket"> | string | null
|
subject?: Prisma.StringNullableFilter<"ticket"> | string | null
|
||||||
dept_id?: Prisma.IntNullableFilter<"ticket"> | number | null
|
dept_id?: Prisma.IntNullableFilter<"ticket"> | number | null
|
||||||
|
|
@ -598,11 +598,11 @@ export type ticketScalarWhereWithAggregatesInput = {
|
||||||
AND?: Prisma.ticketScalarWhereWithAggregatesInput | Prisma.ticketScalarWhereWithAggregatesInput[]
|
AND?: Prisma.ticketScalarWhereWithAggregatesInput | Prisma.ticketScalarWhereWithAggregatesInput[]
|
||||||
OR?: Prisma.ticketScalarWhereWithAggregatesInput[]
|
OR?: Prisma.ticketScalarWhereWithAggregatesInput[]
|
||||||
NOT?: Prisma.ticketScalarWhereWithAggregatesInput | 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
|
ost_id?: Prisma.IntNullableWithAggregatesFilter<"ticket"> | number | null
|
||||||
parent?: Prisma.BigIntWithAggregatesFilter<"ticket"> | bigint | number
|
parent?: Prisma.BigIntWithAggregatesFilter<"ticket"> | bigint | number
|
||||||
account_id?: Prisma.BigIntNullableWithAggregatesFilter<"ticket"> | bigint | number | null
|
account_id?: Prisma.IntNullableWithAggregatesFilter<"ticket"> | number | null
|
||||||
delivery_id?: Prisma.BigIntWithAggregatesFilter<"ticket"> | bigint | number
|
delivery_id?: Prisma.IntWithAggregatesFilter<"ticket"> | number
|
||||||
bon_id?: Prisma.IntNullableWithAggregatesFilter<"ticket"> | number | null
|
bon_id?: Prisma.IntNullableWithAggregatesFilter<"ticket"> | number | null
|
||||||
subject?: Prisma.StringNullableWithAggregatesFilter<"ticket"> | string | null
|
subject?: Prisma.StringNullableWithAggregatesFilter<"ticket"> | string | null
|
||||||
dept_id?: Prisma.IntNullableWithAggregatesFilter<"ticket"> | number | null
|
dept_id?: Prisma.IntNullableWithAggregatesFilter<"ticket"> | number | null
|
||||||
|
|
@ -631,11 +631,10 @@ export type ticketScalarWhereWithAggregatesInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ticketCreateInput = {
|
export type ticketCreateInput = {
|
||||||
id?: bigint | number
|
|
||||||
ost_id?: number | null
|
ost_id?: number | null
|
||||||
parent?: bigint | number
|
parent?: bigint | number
|
||||||
account_id?: bigint | number | null
|
account_id?: number | null
|
||||||
delivery_id?: bigint | number
|
delivery_id?: number
|
||||||
bon_id?: number | null
|
bon_id?: number | null
|
||||||
subject?: string | null
|
subject?: string | null
|
||||||
dept_id?: number | null
|
dept_id?: number | null
|
||||||
|
|
@ -664,11 +663,11 @@ export type ticketCreateInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ticketUncheckedCreateInput = {
|
export type ticketUncheckedCreateInput = {
|
||||||
id?: bigint | number
|
id?: number
|
||||||
ost_id?: number | null
|
ost_id?: number | null
|
||||||
parent?: bigint | number
|
parent?: bigint | number
|
||||||
account_id?: bigint | number | null
|
account_id?: number | null
|
||||||
delivery_id?: bigint | number
|
delivery_id?: number
|
||||||
bon_id?: number | null
|
bon_id?: number | null
|
||||||
subject?: string | null
|
subject?: string | null
|
||||||
dept_id?: number | null
|
dept_id?: number | null
|
||||||
|
|
@ -697,11 +696,10 @@ export type ticketUncheckedCreateInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ticketUpdateInput = {
|
export type ticketUpdateInput = {
|
||||||
id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
|
||||||
ost_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
ost_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
parent?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
parent?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
||||||
account_id?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
account_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
delivery_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
delivery_id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
bon_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
bon_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
subject?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
subject?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
dept_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
dept_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
|
|
@ -730,11 +728,11 @@ export type ticketUpdateInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ticketUncheckedUpdateInput = {
|
export type ticketUncheckedUpdateInput = {
|
||||||
id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
ost_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
ost_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
parent?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
parent?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
||||||
account_id?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
account_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
delivery_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
delivery_id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
bon_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
bon_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
subject?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
subject?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
dept_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
dept_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
|
|
@ -763,11 +761,11 @@ export type ticketUncheckedUpdateInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ticketCreateManyInput = {
|
export type ticketCreateManyInput = {
|
||||||
id?: bigint | number
|
id?: number
|
||||||
ost_id?: number | null
|
ost_id?: number | null
|
||||||
parent?: bigint | number
|
parent?: bigint | number
|
||||||
account_id?: bigint | number | null
|
account_id?: number | null
|
||||||
delivery_id?: bigint | number
|
delivery_id?: number
|
||||||
bon_id?: number | null
|
bon_id?: number | null
|
||||||
subject?: string | null
|
subject?: string | null
|
||||||
dept_id?: number | null
|
dept_id?: number | null
|
||||||
|
|
@ -796,11 +794,10 @@ export type ticketCreateManyInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ticketUpdateManyMutationInput = {
|
export type ticketUpdateManyMutationInput = {
|
||||||
id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
|
||||||
ost_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
ost_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
parent?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
parent?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
||||||
account_id?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
account_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
delivery_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
delivery_id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
bon_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
bon_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
subject?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
subject?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
dept_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
dept_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
|
|
@ -829,11 +826,11 @@ export type ticketUpdateManyMutationInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ticketUncheckedUpdateManyInput = {
|
export type ticketUncheckedUpdateManyInput = {
|
||||||
id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
ost_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
ost_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
parent?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
parent?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
||||||
account_id?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
account_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
delivery_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
delivery_id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
bon_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
bon_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
subject?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
subject?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
dept_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
dept_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
|
|
@ -1088,11 +1085,11 @@ export type $ticketPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||||
name: "ticket"
|
name: "ticket"
|
||||||
objects: {}
|
objects: {}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: bigint
|
id: number
|
||||||
ost_id: number | null
|
ost_id: number | null
|
||||||
parent: bigint
|
parent: bigint
|
||||||
account_id: bigint | null
|
account_id: number | null
|
||||||
delivery_id: bigint
|
delivery_id: number
|
||||||
bon_id: number | null
|
bon_id: number | null
|
||||||
subject: string | null
|
subject: string | null
|
||||||
dept_id: number | null
|
dept_id: number | null
|
||||||
|
|
@ -1487,11 +1484,11 @@ export interface Prisma__ticketClient<T, Null = never, ExtArgs extends runtime.T
|
||||||
* Fields of the ticket model
|
* Fields of the ticket model
|
||||||
*/
|
*/
|
||||||
export interface ticketFieldRefs {
|
export interface ticketFieldRefs {
|
||||||
readonly id: Prisma.FieldRef<"ticket", 'BigInt'>
|
readonly id: Prisma.FieldRef<"ticket", 'Int'>
|
||||||
readonly ost_id: Prisma.FieldRef<"ticket", 'Int'>
|
readonly ost_id: Prisma.FieldRef<"ticket", 'Int'>
|
||||||
readonly parent: Prisma.FieldRef<"ticket", 'BigInt'>
|
readonly parent: Prisma.FieldRef<"ticket", 'BigInt'>
|
||||||
readonly account_id: Prisma.FieldRef<"ticket", 'BigInt'>
|
readonly account_id: Prisma.FieldRef<"ticket", 'Int'>
|
||||||
readonly delivery_id: Prisma.FieldRef<"ticket", 'BigInt'>
|
readonly delivery_id: Prisma.FieldRef<"ticket", 'Int'>
|
||||||
readonly bon_id: Prisma.FieldRef<"ticket", 'Int'>
|
readonly bon_id: Prisma.FieldRef<"ticket", 'Int'>
|
||||||
readonly subject: Prisma.FieldRef<"ticket", 'String'>
|
readonly subject: Prisma.FieldRef<"ticket", 'String'>
|
||||||
readonly dept_id: Prisma.FieldRef<"ticket", 'Int'>
|
readonly dept_id: Prisma.FieldRef<"ticket", 'Int'>
|
||||||
|
|
|
||||||
|
|
@ -35,17 +35,17 @@ export type Ticket_msgAvgAggregateOutputType = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Ticket_msgSumAggregateOutputType = {
|
export type Ticket_msgSumAggregateOutputType = {
|
||||||
id: bigint | null
|
id: number | null
|
||||||
ticket_id: bigint | null
|
ticket_id: number | null
|
||||||
staff_id: bigint | null
|
staff_id: number | null
|
||||||
date_orig: bigint | null
|
date_orig: bigint | null
|
||||||
important: number | null
|
important: number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Ticket_msgMinAggregateOutputType = {
|
export type Ticket_msgMinAggregateOutputType = {
|
||||||
id: bigint | null
|
id: number | null
|
||||||
ticket_id: bigint | null
|
ticket_id: number | null
|
||||||
staff_id: bigint | null
|
staff_id: number | null
|
||||||
msg: string | null
|
msg: string | null
|
||||||
date_orig: bigint | null
|
date_orig: bigint | null
|
||||||
unread_csv: string | null
|
unread_csv: string | null
|
||||||
|
|
@ -55,9 +55,9 @@ export type Ticket_msgMinAggregateOutputType = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Ticket_msgMaxAggregateOutputType = {
|
export type Ticket_msgMaxAggregateOutputType = {
|
||||||
id: bigint | null
|
id: number | null
|
||||||
ticket_id: bigint | null
|
ticket_id: number | null
|
||||||
staff_id: bigint | null
|
staff_id: number | null
|
||||||
msg: string | null
|
msg: string | null
|
||||||
date_orig: bigint | null
|
date_orig: bigint | null
|
||||||
unread_csv: string | null
|
unread_csv: string | null
|
||||||
|
|
@ -220,9 +220,9 @@ export type ticket_msgGroupByArgs<ExtArgs extends runtime.Types.Extensions.Inter
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Ticket_msgGroupByOutputType = {
|
export type Ticket_msgGroupByOutputType = {
|
||||||
id: bigint
|
id: number
|
||||||
ticket_id: bigint
|
ticket_id: number
|
||||||
staff_id: bigint
|
staff_id: number
|
||||||
msg: string | null
|
msg: string | null
|
||||||
date_orig: bigint | null
|
date_orig: bigint | null
|
||||||
unread_csv: string
|
unread_csv: string
|
||||||
|
|
@ -255,9 +255,9 @@ export type ticket_msgWhereInput = {
|
||||||
AND?: Prisma.ticket_msgWhereInput | Prisma.ticket_msgWhereInput[]
|
AND?: Prisma.ticket_msgWhereInput | Prisma.ticket_msgWhereInput[]
|
||||||
OR?: Prisma.ticket_msgWhereInput[]
|
OR?: Prisma.ticket_msgWhereInput[]
|
||||||
NOT?: Prisma.ticket_msgWhereInput | Prisma.ticket_msgWhereInput[]
|
NOT?: Prisma.ticket_msgWhereInput | Prisma.ticket_msgWhereInput[]
|
||||||
id?: Prisma.BigIntFilter<"ticket_msg"> | bigint | number
|
id?: Prisma.IntFilter<"ticket_msg"> | number
|
||||||
ticket_id?: Prisma.BigIntFilter<"ticket_msg"> | bigint | number
|
ticket_id?: Prisma.IntFilter<"ticket_msg"> | number
|
||||||
staff_id?: Prisma.BigIntFilter<"ticket_msg"> | bigint | number
|
staff_id?: Prisma.IntFilter<"ticket_msg"> | number
|
||||||
msg?: Prisma.StringNullableFilter<"ticket_msg"> | string | null
|
msg?: Prisma.StringNullableFilter<"ticket_msg"> | string | null
|
||||||
date_orig?: Prisma.BigIntNullableFilter<"ticket_msg"> | bigint | number | null
|
date_orig?: Prisma.BigIntNullableFilter<"ticket_msg"> | bigint | number | null
|
||||||
unread_csv?: Prisma.StringFilter<"ticket_msg"> | string
|
unread_csv?: Prisma.StringFilter<"ticket_msg"> | string
|
||||||
|
|
@ -280,12 +280,12 @@ export type ticket_msgOrderByWithRelationInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ticket_msgWhereUniqueInput = Prisma.AtLeast<{
|
export type ticket_msgWhereUniqueInput = Prisma.AtLeast<{
|
||||||
id?: bigint | number
|
id?: number
|
||||||
AND?: Prisma.ticket_msgWhereInput | Prisma.ticket_msgWhereInput[]
|
AND?: Prisma.ticket_msgWhereInput | Prisma.ticket_msgWhereInput[]
|
||||||
OR?: Prisma.ticket_msgWhereInput[]
|
OR?: Prisma.ticket_msgWhereInput[]
|
||||||
NOT?: Prisma.ticket_msgWhereInput | Prisma.ticket_msgWhereInput[]
|
NOT?: Prisma.ticket_msgWhereInput | Prisma.ticket_msgWhereInput[]
|
||||||
ticket_id?: Prisma.BigIntFilter<"ticket_msg"> | bigint | number
|
ticket_id?: Prisma.IntFilter<"ticket_msg"> | number
|
||||||
staff_id?: Prisma.BigIntFilter<"ticket_msg"> | bigint | number
|
staff_id?: Prisma.IntFilter<"ticket_msg"> | number
|
||||||
msg?: Prisma.StringNullableFilter<"ticket_msg"> | string | null
|
msg?: Prisma.StringNullableFilter<"ticket_msg"> | string | null
|
||||||
date_orig?: Prisma.BigIntNullableFilter<"ticket_msg"> | bigint | number | null
|
date_orig?: Prisma.BigIntNullableFilter<"ticket_msg"> | bigint | number | null
|
||||||
unread_csv?: Prisma.StringFilter<"ticket_msg"> | string
|
unread_csv?: Prisma.StringFilter<"ticket_msg"> | string
|
||||||
|
|
@ -315,9 +315,9 @@ export type ticket_msgScalarWhereWithAggregatesInput = {
|
||||||
AND?: Prisma.ticket_msgScalarWhereWithAggregatesInput | Prisma.ticket_msgScalarWhereWithAggregatesInput[]
|
AND?: Prisma.ticket_msgScalarWhereWithAggregatesInput | Prisma.ticket_msgScalarWhereWithAggregatesInput[]
|
||||||
OR?: Prisma.ticket_msgScalarWhereWithAggregatesInput[]
|
OR?: Prisma.ticket_msgScalarWhereWithAggregatesInput[]
|
||||||
NOT?: Prisma.ticket_msgScalarWhereWithAggregatesInput | Prisma.ticket_msgScalarWhereWithAggregatesInput[]
|
NOT?: Prisma.ticket_msgScalarWhereWithAggregatesInput | Prisma.ticket_msgScalarWhereWithAggregatesInput[]
|
||||||
id?: Prisma.BigIntWithAggregatesFilter<"ticket_msg"> | bigint | number
|
id?: Prisma.IntWithAggregatesFilter<"ticket_msg"> | number
|
||||||
ticket_id?: Prisma.BigIntWithAggregatesFilter<"ticket_msg"> | bigint | number
|
ticket_id?: Prisma.IntWithAggregatesFilter<"ticket_msg"> | number
|
||||||
staff_id?: Prisma.BigIntWithAggregatesFilter<"ticket_msg"> | bigint | number
|
staff_id?: Prisma.IntWithAggregatesFilter<"ticket_msg"> | number
|
||||||
msg?: Prisma.StringNullableWithAggregatesFilter<"ticket_msg"> | string | null
|
msg?: Prisma.StringNullableWithAggregatesFilter<"ticket_msg"> | string | null
|
||||||
date_orig?: Prisma.BigIntNullableWithAggregatesFilter<"ticket_msg"> | bigint | number | null
|
date_orig?: Prisma.BigIntNullableWithAggregatesFilter<"ticket_msg"> | bigint | number | null
|
||||||
unread_csv?: Prisma.StringWithAggregatesFilter<"ticket_msg"> | string
|
unread_csv?: Prisma.StringWithAggregatesFilter<"ticket_msg"> | string
|
||||||
|
|
@ -327,9 +327,8 @@ export type ticket_msgScalarWhereWithAggregatesInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ticket_msgCreateInput = {
|
export type ticket_msgCreateInput = {
|
||||||
id?: bigint | number
|
ticket_id: number
|
||||||
ticket_id: bigint | number
|
staff_id?: number
|
||||||
staff_id?: bigint | number
|
|
||||||
msg?: string | null
|
msg?: string | null
|
||||||
date_orig?: bigint | number | null
|
date_orig?: bigint | number | null
|
||||||
unread_csv: string
|
unread_csv: string
|
||||||
|
|
@ -339,9 +338,9 @@ export type ticket_msgCreateInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ticket_msgUncheckedCreateInput = {
|
export type ticket_msgUncheckedCreateInput = {
|
||||||
id?: bigint | number
|
id?: number
|
||||||
ticket_id: bigint | number
|
ticket_id: number
|
||||||
staff_id?: bigint | number
|
staff_id?: number
|
||||||
msg?: string | null
|
msg?: string | null
|
||||||
date_orig?: bigint | number | null
|
date_orig?: bigint | number | null
|
||||||
unread_csv: string
|
unread_csv: string
|
||||||
|
|
@ -351,9 +350,8 @@ export type ticket_msgUncheckedCreateInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ticket_msgUpdateInput = {
|
export type ticket_msgUpdateInput = {
|
||||||
id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
ticket_id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
ticket_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
staff_id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
staff_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
|
||||||
msg?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
msg?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
||||||
unread_csv?: Prisma.StringFieldUpdateOperationsInput | string
|
unread_csv?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
|
@ -363,9 +361,9 @@ export type ticket_msgUpdateInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ticket_msgUncheckedUpdateInput = {
|
export type ticket_msgUncheckedUpdateInput = {
|
||||||
id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
ticket_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
ticket_id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
staff_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
staff_id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
msg?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
msg?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
||||||
unread_csv?: Prisma.StringFieldUpdateOperationsInput | string
|
unread_csv?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
|
@ -375,9 +373,9 @@ export type ticket_msgUncheckedUpdateInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ticket_msgCreateManyInput = {
|
export type ticket_msgCreateManyInput = {
|
||||||
id?: bigint | number
|
id?: number
|
||||||
ticket_id: bigint | number
|
ticket_id: number
|
||||||
staff_id?: bigint | number
|
staff_id?: number
|
||||||
msg?: string | null
|
msg?: string | null
|
||||||
date_orig?: bigint | number | null
|
date_orig?: bigint | number | null
|
||||||
unread_csv: string
|
unread_csv: string
|
||||||
|
|
@ -387,9 +385,8 @@ export type ticket_msgCreateManyInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ticket_msgUpdateManyMutationInput = {
|
export type ticket_msgUpdateManyMutationInput = {
|
||||||
id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
ticket_id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
ticket_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
staff_id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
staff_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
|
||||||
msg?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
msg?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
||||||
unread_csv?: Prisma.StringFieldUpdateOperationsInput | string
|
unread_csv?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
|
@ -399,9 +396,9 @@ export type ticket_msgUpdateManyMutationInput = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ticket_msgUncheckedUpdateManyInput = {
|
export type ticket_msgUncheckedUpdateManyInput = {
|
||||||
id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
ticket_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
ticket_id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
staff_id?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
staff_id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
msg?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
msg?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
|
||||||
unread_csv?: Prisma.StringFieldUpdateOperationsInput | string
|
unread_csv?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
|
@ -502,9 +499,9 @@ export type $ticket_msgPayload<ExtArgs extends runtime.Types.Extensions.Internal
|
||||||
name: "ticket_msg"
|
name: "ticket_msg"
|
||||||
objects: {}
|
objects: {}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: bigint
|
id: number
|
||||||
ticket_id: bigint
|
ticket_id: number
|
||||||
staff_id: bigint
|
staff_id: number
|
||||||
msg: string | null
|
msg: string | null
|
||||||
date_orig: bigint | null
|
date_orig: bigint | null
|
||||||
unread_csv: string
|
unread_csv: string
|
||||||
|
|
@ -880,9 +877,9 @@ export interface Prisma__ticket_msgClient<T, Null = never, ExtArgs extends runti
|
||||||
* Fields of the ticket_msg model
|
* Fields of the ticket_msg model
|
||||||
*/
|
*/
|
||||||
export interface ticket_msgFieldRefs {
|
export interface ticket_msgFieldRefs {
|
||||||
readonly id: Prisma.FieldRef<"ticket_msg", 'BigInt'>
|
readonly id: Prisma.FieldRef<"ticket_msg", 'Int'>
|
||||||
readonly ticket_id: Prisma.FieldRef<"ticket_msg", 'BigInt'>
|
readonly ticket_id: Prisma.FieldRef<"ticket_msg", 'Int'>
|
||||||
readonly staff_id: Prisma.FieldRef<"ticket_msg", 'BigInt'>
|
readonly staff_id: Prisma.FieldRef<"ticket_msg", 'Int'>
|
||||||
readonly msg: Prisma.FieldRef<"ticket_msg", 'String'>
|
readonly msg: Prisma.FieldRef<"ticket_msg", 'String'>
|
||||||
readonly date_orig: Prisma.FieldRef<"ticket_msg", 'BigInt'>
|
readonly date_orig: Prisma.FieldRef<"ticket_msg", 'BigInt'>
|
||||||
readonly unread_csv: Prisma.FieldRef<"ticket_msg", 'String'>
|
readonly unread_csv: Prisma.FieldRef<"ticket_msg", 'String'>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ datasource db {
|
||||||
}
|
}
|
||||||
|
|
||||||
model account {
|
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
|
customer_id String? @db.VarChar(32) //variable string, composition varies a lot, used by customers to identify their account
|
||||||
date_orig BigInt? //timestamp
|
date_orig BigInt? //timestamp
|
||||||
date_last BigInt? //timestamp
|
date_last BigInt? //timestamp
|
||||||
|
|
@ -100,6 +100,7 @@ model account_memo {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model compta_comptes {
|
model compta_comptes {
|
||||||
id BigInt @id @default(autoincrement())
|
id BigInt @id @default(autoincrement())
|
||||||
category String? @db.VarChar(64)
|
category String? @db.VarChar(64)
|
||||||
|
|
@ -107,6 +108,7 @@ model compta_comptes {
|
||||||
desc String? @db.MediumText
|
desc String? @db.MediumText
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model compta_comptes_soldes {
|
model compta_comptes_soldes {
|
||||||
id BigInt @id @default(autoincrement())
|
id BigInt @id @default(autoincrement())
|
||||||
num_compte Int
|
num_compte Int
|
||||||
|
|
@ -116,6 +118,7 @@ model compta_comptes_soldes {
|
||||||
type String @db.VarChar(3)
|
type String @db.VarChar(3)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model compta_journal_ecriture {
|
model compta_journal_ecriture {
|
||||||
id BigInt @id @default(autoincrement())
|
id BigInt @id @default(autoincrement())
|
||||||
date_orig BigInt?
|
date_orig BigInt?
|
||||||
|
|
@ -132,6 +135,7 @@ model compta_journal_ecriture {
|
||||||
@@index([num], map: "num")
|
@@index([num], map: "num")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model compta_journal_ecriture_bk {
|
model compta_journal_ecriture_bk {
|
||||||
id BigInt @id @default(autoincrement())
|
id BigInt @id @default(autoincrement())
|
||||||
date_orig BigInt?
|
date_orig BigInt?
|
||||||
|
|
@ -148,6 +152,7 @@ model compta_journal_ecriture_bk {
|
||||||
@@index([num], map: "num")
|
@@index([num], map: "num")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model compta_journal_ecriture_detail {
|
model compta_journal_ecriture_detail {
|
||||||
id BigInt @id @default(autoincrement())
|
id BigInt @id @default(autoincrement())
|
||||||
journal_id BigInt?
|
journal_id BigInt?
|
||||||
|
|
@ -158,6 +163,7 @@ model compta_journal_ecriture_detail {
|
||||||
@@index([journal_id], map: "journal_id")
|
@@index([journal_id], map: "journal_id")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model compta_journal_ecriture_detail_bk {
|
model compta_journal_ecriture_detail_bk {
|
||||||
id BigInt @id @default(autoincrement())
|
id BigInt @id @default(autoincrement())
|
||||||
journal_id BigInt?
|
journal_id BigInt?
|
||||||
|
|
@ -172,11 +178,13 @@ model compta_periode {
|
||||||
month Int @id @default(7)
|
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 {
|
model compta_ppa_file_id {
|
||||||
last_id Int @id @default(1)
|
last_id Int @id @default(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model compta_setup {
|
model compta_setup {
|
||||||
setup_id Int @id @default(1)
|
setup_id Int @id @default(1)
|
||||||
period_month Int @default(7)
|
period_month Int @default(7)
|
||||||
|
|
@ -189,12 +197,14 @@ model compta_setup {
|
||||||
imap_token String? @db.Text
|
imap_token String? @db.Text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model credit_code {
|
model credit_code {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
code String @db.VarChar(16)
|
code String @db.VarChar(16)
|
||||||
desc String @db.VarChar(256)
|
desc String @db.VarChar(256)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model tax {
|
model tax {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
name String? @db.VarChar(128)
|
name String? @db.VarChar(128)
|
||||||
|
|
@ -202,6 +212,7 @@ model tax {
|
||||||
rate Float?
|
rate Float?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model tax_group {
|
model tax_group {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
name String? @db.VarChar(128)
|
name String? @db.VarChar(128)
|
||||||
|
|
@ -209,6 +220,7 @@ model tax_group {
|
||||||
tax String? @db.VarChar(128)
|
tax String? @db.VarChar(128)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model td_payable {
|
model td_payable {
|
||||||
id Int @id @default(autoincrement()) @db.UnsignedInt
|
id Int @id @default(autoincrement()) @db.UnsignedInt
|
||||||
ticket_id Int @default(0) @db.UnsignedInt
|
ticket_id Int @default(0) @db.UnsignedInt
|
||||||
|
|
@ -225,6 +237,7 @@ model td_payable {
|
||||||
@@index([ticket_id], map: "ticket_id")
|
@@index([ticket_id], map: "ticket_id")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model conso {
|
model conso {
|
||||||
id BigInt @id @default(autoincrement())
|
id BigInt @id @default(autoincrement())
|
||||||
ip_id String? @db.VarChar(16)
|
ip_id String? @db.VarChar(16)
|
||||||
|
|
@ -236,6 +249,7 @@ model conso {
|
||||||
@@index([ip_id], map: "ip_id")
|
@@index([ip_id], map: "ip_id")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model conso_archive {
|
model conso_archive {
|
||||||
id BigInt @id @default(autoincrement())
|
id BigInt @id @default(autoincrement())
|
||||||
ip_id String? @db.VarChar(16)
|
ip_id String? @db.VarChar(16)
|
||||||
|
|
@ -247,6 +261,7 @@ model conso_archive {
|
||||||
@@index([ip_id], map: "ip_id")
|
@@index([ip_id], map: "ip_id")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model conso_avis {
|
model conso_avis {
|
||||||
id Int @id @default(autoincrement()) @db.UnsignedInt
|
id Int @id @default(autoincrement()) @db.UnsignedInt
|
||||||
date BigInt
|
date BigInt
|
||||||
|
|
@ -257,6 +272,7 @@ model conso_avis {
|
||||||
avis String @db.VarChar(32)
|
avis String @db.VarChar(32)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model conso_radius {
|
model conso_radius {
|
||||||
id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
|
id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
|
||||||
username String @db.VarChar(32)
|
username String @db.VarChar(32)
|
||||||
|
|
@ -269,6 +285,7 @@ model conso_radius {
|
||||||
@@index([username], map: "username")
|
@@index([username], map: "username")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model conso_radius_daily {
|
model conso_radius_daily {
|
||||||
id Int @id @default(autoincrement()) @db.UnsignedInt
|
id Int @id @default(autoincrement()) @db.UnsignedInt
|
||||||
username String @db.VarChar(32)
|
username String @db.VarChar(32)
|
||||||
|
|
@ -282,6 +299,7 @@ model conso_radius_daily {
|
||||||
@@index([username], map: "username")
|
@@index([username], map: "username")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model conso_radius_daily2 {
|
model conso_radius_daily2 {
|
||||||
id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
|
id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
|
||||||
username String @db.VarChar(32)
|
username String @db.VarChar(32)
|
||||||
|
|
@ -295,6 +313,7 @@ model conso_radius_daily2 {
|
||||||
@@index([username], map: "username")
|
@@index([username], map: "username")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model conso_radius_hourly {
|
model conso_radius_hourly {
|
||||||
id Int @id @default(autoincrement()) @db.UnsignedInt
|
id Int @id @default(autoincrement()) @db.UnsignedInt
|
||||||
username String @db.VarChar(32)
|
username String @db.VarChar(32)
|
||||||
|
|
@ -306,6 +325,7 @@ model conso_radius_hourly {
|
||||||
@@index([username], map: "username")
|
@@index([username], map: "username")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model conso_radius_monthly {
|
model conso_radius_monthly {
|
||||||
id Int @id @default(autoincrement()) @db.UnsignedInt
|
id Int @id @default(autoincrement()) @db.UnsignedInt
|
||||||
date String @db.VarChar(32)
|
date String @db.VarChar(32)
|
||||||
|
|
@ -317,6 +337,7 @@ model conso_radius_monthly {
|
||||||
@@index([username], map: "username")
|
@@index([username], map: "username")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOT USED BY THE TICKET MODULE *********************
|
||||||
model conso_radius_monthly2 {
|
model conso_radius_monthly2 {
|
||||||
id Int @id @default(autoincrement()) @db.UnsignedInt
|
id Int @id @default(autoincrement()) @db.UnsignedInt
|
||||||
date String @db.VarChar(32)
|
date String @db.VarChar(32)
|
||||||
|
|
@ -330,8 +351,8 @@ model conso_radius_monthly2 {
|
||||||
|
|
||||||
|
|
||||||
model delivery {
|
model delivery {
|
||||||
id BigInt @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
account_id BigInt?
|
account_id Int?
|
||||||
name String @db.VarChar(32)
|
name String @db.VarChar(32)
|
||||||
comment String @db.VarChar(512)
|
comment String @db.VarChar(512)
|
||||||
date_orig BigInt?
|
date_orig BigInt?
|
||||||
|
|
@ -359,6 +380,7 @@ model delivery {
|
||||||
@@index([placemarks_id], map: "placemarks_id")
|
@@index([placemarks_id], map: "placemarks_id")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
model delivery_history {
|
model delivery_history {
|
||||||
id Int @id @default(autoincrement()) @db.UnsignedInt
|
id Int @id @default(autoincrement()) @db.UnsignedInt
|
||||||
account_id Int @db.UnsignedInt
|
account_id Int @db.UnsignedInt
|
||||||
|
|
@ -1628,11 +1650,11 @@ model tv_mac {
|
||||||
}
|
}
|
||||||
|
|
||||||
model ticket {
|
model ticket {
|
||||||
id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
|
id Int @id @default(autoincrement())
|
||||||
ost_id Int? @db.UnsignedInt
|
ost_id Int? @db.UnsignedInt
|
||||||
parent BigInt @default(0)
|
parent BigInt @default(0)
|
||||||
account_id BigInt?
|
account_id Int?
|
||||||
delivery_id BigInt @default(0)
|
delivery_id Int @default(0)
|
||||||
bon_id Int? @db.UnsignedInt
|
bon_id Int? @db.UnsignedInt
|
||||||
subject String? @db.VarChar(256)
|
subject String? @db.VarChar(256)
|
||||||
dept_id Int?
|
dept_id Int?
|
||||||
|
|
@ -1707,9 +1729,9 @@ model ticket_dept {
|
||||||
}
|
}
|
||||||
|
|
||||||
model ticket_msg {
|
model ticket_msg {
|
||||||
id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
|
id Int @id @default(autoincrement())
|
||||||
ticket_id BigInt
|
ticket_id Int
|
||||||
staff_id BigInt @default(0)
|
staff_id Int @default(0)
|
||||||
msg String? @db.MediumText
|
msg String? @db.MediumText
|
||||||
date_orig BigInt?
|
date_orig BigInt?
|
||||||
unread_csv String @db.MediumText
|
unread_csv String @db.MediumText
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Controller, Get } from '@nestjs/common';
|
import { Controller } from '@nestjs/common';
|
||||||
|
|
||||||
@Controller()
|
@Controller()
|
||||||
export class AppController { }
|
export class AppController { }
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import { BadRequestException, Module, ValidationPipe } from '@nestjs/common';
|
import { BadRequestException, Module, ValidationPipe } from '@nestjs/common';
|
||||||
import { AppController } from './app.controller';
|
import { AppController } from './app.controller';
|
||||||
import { AppService } from './app.service';
|
import { AppService } from './app.service';
|
||||||
import { NotificationsModule } from './shared/notifications/notifications.module';
|
|
||||||
import { PrismaPostgresModule } from '../prisma/postgres/prisma-postgres.module';
|
import { PrismaPostgresModule } from '../prisma/postgres/prisma-postgres.module';
|
||||||
import { ScheduleModule } from '@nestjs/schedule';
|
import { ScheduleModule } from '@nestjs/schedule';
|
||||||
import { ConfigModule } from '@nestjs/config';
|
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 { ChatbotModule } from 'src/chatbot/chatbot.module';
|
||||||
import { PrismaMariadbModule } from 'prisma/mariadb/prisma-mariadb.module';
|
import { PrismaMariadbModule } from 'prisma/mariadb/prisma-mariadb.module';
|
||||||
import { PrismaLegacyModule } from 'prisma/prisma-legacy/prisma-legacy.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({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
AccountModule,
|
|
||||||
AuthenticationModule,
|
AuthenticationModule,
|
||||||
ConfigModule.forRoot({ isGlobal: true }),
|
ConfigModule.forRoot({ isGlobal: true }),
|
||||||
ScheduleModule.forRoot(), //cronjobs
|
ScheduleModule.forRoot(), //cronjobs
|
||||||
NotificationsModule,
|
|
||||||
PrismaPostgresModule,
|
PrismaPostgresModule,
|
||||||
PrismaMariadbModule,
|
PrismaMariadbModule,
|
||||||
PrismaLegacyModule,
|
PrismaLegacyModule,
|
||||||
TimeAndAttendanceModule,
|
TimeAndAttendanceModule,
|
||||||
IdentityAndAccountModule,
|
IdentityAndAccountModule,
|
||||||
ChatbotModule,
|
ChatbotModule,
|
||||||
|
CustomerSupportModule,
|
||||||
|
],
|
||||||
|
controllers: [
|
||||||
|
AppController
|
||||||
],
|
],
|
||||||
controllers: [AppController],
|
|
||||||
providers: [
|
providers: [
|
||||||
AppService,
|
AppService,
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8,26 +8,29 @@ import { Modules as ModulesEnum } from "prisma/postgres/generated/prisma/client/
|
||||||
|
|
||||||
@Controller('chatbot')
|
@Controller('chatbot')
|
||||||
export class ChatbotController {
|
export class ChatbotController {
|
||||||
constructor(private readonly chatbotService: ChatbotService) {}
|
constructor(private readonly chatbotService: ChatbotService) { }
|
||||||
|
|
||||||
@Post('')
|
@Post('')
|
||||||
@ModuleAccessAllowed(ModulesEnum.chatbot)
|
@ModuleAccessAllowed(ModulesEnum.chatbot)
|
||||||
async testConnection(@Body() body: UserMessageDto, @Access('email') email: string): Promise<Message> {
|
async testConnection(
|
||||||
return await this.chatbotService.pingExternalApi(body, email);
|
@Body() body: UserMessageDto,
|
||||||
}
|
@Access('email') email: string,
|
||||||
|
): Promise<Message> {
|
||||||
|
return await this.chatbotService.pingExternalApi(body, email);
|
||||||
|
}
|
||||||
|
|
||||||
// @Post('context')
|
// @Post('context')
|
||||||
// @ModuleAccessAllowed(ModulesEnum.chatbot)
|
// @ModuleAccessAllowed(ModulesEnum.chatbot)
|
||||||
// async sendContext(@Body() body: PageContextDto): Promise<string> {
|
// async sendContext(@Body() body: PageContextDto): Promise<string> {
|
||||||
// const sendPageContext = await this.chatbotService.sendPageContext(body);
|
// const sendPageContext = await this.chatbotService.sendPageContext(body);
|
||||||
// return sendPageContext;
|
// return sendPageContext;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Will have to modify later on to accomodate newer versions of User Auth/User type Structure
|
// Will have to modify later on to accomodate newer versions of User Auth/User type Structure
|
||||||
// @Post('user')
|
// @Post('user')
|
||||||
// @ModuleAccessAllowed(ModulesEnum.chatbot)
|
// @ModuleAccessAllowed(ModulesEnum.chatbot)
|
||||||
// async sendUserCredentials(@Access('email') email: string,): Promise<boolean> {
|
// async sendUserCredentials(@Access('email') email: string,): Promise<boolean> {
|
||||||
// const sendUserContext = await this.chatbotService.sendUserContext(email);
|
// const sendUserContext = await this.chatbotService.sendUserContext(email);
|
||||||
// return sendUserContext;
|
// return sendUserContext;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,4 @@ import { ChatbotService } from 'src/chatbot/chatbot.service';
|
||||||
providers: [ChatbotService],
|
providers: [ChatbotService],
|
||||||
exports: [],
|
exports: [],
|
||||||
})
|
})
|
||||||
export class ChatbotModule {}
|
export class ChatbotModule { }
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
import { UserMessageDto } from 'src/chatbot/dtos/user-message.dto';
|
|
||||||
import { HttpService } from '@nestjs/axios';
|
import { HttpService } from '@nestjs/axios';
|
||||||
import { firstValueFrom } from 'rxjs';
|
import { firstValueFrom } from 'rxjs';
|
||||||
import { Message } from 'src/chatbot/dtos/dialog-message.dto';
|
import { Message } from 'src/chatbot/dtos/dialog-message.dto';
|
||||||
|
import { ChatbotResponseDto, UserMessageDto } from 'src/chatbot/dtos/user-message.dto';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ChatbotService {
|
export class ChatbotService {
|
||||||
|
|
@ -19,7 +19,7 @@ export class ChatbotService {
|
||||||
sessionId: this.sessionId,
|
sessionId: this.sessionId,
|
||||||
pageContext: body.pageContext ?? undefined
|
pageContext: body.pageContext ?? undefined
|
||||||
}
|
}
|
||||||
));
|
))as ChatbotResponseDto;
|
||||||
|
|
||||||
if (!response.data)
|
if (!response.data)
|
||||||
return {
|
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;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
import { IsBoolean, IsString } from 'class-validator';
|
import { IsBoolean, IsString } from 'class-validator';
|
||||||
|
|
||||||
export class Message {
|
export class Message {
|
||||||
@IsString()
|
@IsString() text: string;
|
||||||
text!: string;
|
@IsBoolean() sent: boolean;
|
||||||
|
|
||||||
@IsBoolean()
|
|
||||||
sent!: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,8 @@
|
||||||
import { IsArray, IsString } from 'class-validator';
|
import { IsArray, IsOptional, IsString } from 'class-validator';
|
||||||
|
|
||||||
export class PageContextDto {
|
export class PageContextDto {
|
||||||
@IsString()
|
@IsString() name: string;
|
||||||
name: string;
|
@IsString() description: string;
|
||||||
|
@IsArray() features: string[];
|
||||||
@IsString()
|
@IsString() @IsOptional() path?: string;
|
||||||
description: string;
|
|
||||||
|
|
||||||
@IsArray()
|
|
||||||
features: string[];
|
|
||||||
|
|
||||||
@IsString()
|
|
||||||
path?: string;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,18 @@
|
||||||
import { Transform, Type } from 'class-transformer';
|
import { Type } from 'class-transformer';
|
||||||
import { IsNotEmpty, IsOptional, IsString } from 'class-validator';
|
import { IsNotEmpty, IsOptional, IsString } from 'class-validator';
|
||||||
import { PageContextDto } from './page-context.dto';
|
import { PageContextDto } from './page-context.dto';
|
||||||
|
|
||||||
export class UserMessageDto {
|
export class UserMessageDto {
|
||||||
@IsString()
|
@IsString()
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
@Transform(({ value }) => value.trim())
|
@IsString() userInput: string;
|
||||||
userInput!: string;
|
@IsOptional() @Type(() => PageContextDto) pageContext?: PageContextDto | undefined;
|
||||||
@IsOptional() @Type(() => PageContextDto) pageContext?: PageContextDto | undefined;
|
}
|
||||||
|
|
||||||
|
export class ChatbotResponseDto {
|
||||||
|
@Type(() => ChatbotOutput) data: ChatbotOutput[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ChatbotOutput {
|
||||||
|
@IsString() output: string;
|
||||||
}
|
}
|
||||||
|
|
@ -1,9 +1,14 @@
|
||||||
import { createParamDecorator, ExecutionContext } from "@nestjs/common";
|
import { createParamDecorator, ExecutionContext } from "@nestjs/common";
|
||||||
|
import { UserDto } from "src/identity-and-account/users-management/user.dto";
|
||||||
|
|
||||||
export const Access = createParamDecorator(
|
export interface AuthenticatedRequest extends Request {
|
||||||
(data:string, ctx: ExecutionContext) => {
|
user: UserDto;
|
||||||
const request = ctx.switchToHttp().getRequest();
|
}
|
||||||
const user = request.user;
|
|
||||||
|
export const Access = createParamDecorator<keyof UserDto | undefined>(
|
||||||
|
(data, ctx: ExecutionContext) => {
|
||||||
|
const request = ctx.switchToHttp().getRequest<AuthenticatedRequest>();
|
||||||
|
const user: UserDto = request.user;
|
||||||
return data ? user?.[data] : user;
|
return data ? user?.[data] : user;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
@ -7,13 +7,7 @@ import {
|
||||||
import { Reflector } from '@nestjs/core';
|
import { Reflector } from '@nestjs/core';
|
||||||
import { MODULES_KEY } from '../decorators/modules-guard.decorators';
|
import { MODULES_KEY } from '../decorators/modules-guard.decorators';
|
||||||
import { Modules } from "prisma/postgres/generated/prisma/client/postgres/client";
|
import { Modules } from "prisma/postgres/generated/prisma/client/postgres/client";
|
||||||
|
import { AuthenticatedRequest } from 'src/common/decorators/module-access.decorators';
|
||||||
|
|
||||||
|
|
||||||
interface RequestWithUser extends Request {
|
|
||||||
// TODO: Create an actual user model based on OAuth signin
|
|
||||||
user: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ModulesGuard implements CanActivate {
|
export class ModulesGuard implements CanActivate {
|
||||||
|
|
@ -27,18 +21,18 @@ export class ModulesGuard implements CanActivate {
|
||||||
if (!requiredModules || requiredModules.length === 0) {
|
if (!requiredModules || requiredModules.length === 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
const request = ctx.switchToHttp().getRequest<RequestWithUser>();
|
const request = ctx.switchToHttp().getRequest<AuthenticatedRequest>();
|
||||||
const user = request.user;
|
const user = request.user;
|
||||||
|
|
||||||
if (!user) {
|
if (!user) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (const module of requiredModules) {
|
for (const module of requiredModules) {
|
||||||
if (!user.user_module_access.includes(module)) {
|
if (!user.user_module_access.includes(module)) {
|
||||||
throw new ForbiddenException(
|
throw new ForbiddenException(
|
||||||
`This account does not have required access to: ${module}. current user modules: ${user.user_module_access} , required modules: ${requiredModules}`,
|
`This account does not have required access to: ${module}. current user modules: ${user.user_module_access.toString()} , required modules: ${requiredModules.toString()}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Injectable } from "@nestjs/common";
|
import { Injectable } from "@nestjs/common";
|
||||||
import { Prisma, PrismaClient } from "prisma/postgres/generated/prisma/client/postgres/client";
|
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 { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
||||||
|
import { Result } from "src/common/errors/result-error.factory";
|
||||||
|
|
||||||
type Tx = Prisma.TransactionClient | PrismaClient;
|
type Tx = Prisma.TransactionClient | PrismaClient;
|
||||||
|
|
||||||
|
|
@ -25,7 +25,9 @@ export class BankCodesResolver {
|
||||||
};
|
};
|
||||||
|
|
||||||
//finds only id by type
|
//finds only id by type
|
||||||
readonly findBankCodeIDByType = async (type: string, client?: Tx
|
readonly findBankCodeIDByType = async (
|
||||||
|
type: string,
|
||||||
|
client?: Tx
|
||||||
): Promise<Result<number, string>> => {
|
): Promise<Result<number, string>> => {
|
||||||
const db = (client ?? this.prisma) as PrismaClient;
|
const db = (client ?? this.prisma) as PrismaClient;
|
||||||
const bank_code = await db.bankCodes.findFirst({
|
const bank_code = await db.bankCodes.findFirst({
|
||||||
|
|
@ -37,7 +39,9 @@ export class BankCodesResolver {
|
||||||
return { success: true, data: bank_code.id };
|
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<Result<string, string>> => {
|
): Promise<Result<string, string>> => {
|
||||||
const db = (client ?? this.prisma) as PrismaClient;
|
const db = (client ?? this.prisma) as PrismaClient;
|
||||||
const bank_code = await db.bankCodes.findFirst({
|
const bank_code = await db.bankCodes.findFirst({
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
|
||||||
import { Injectable } from "@nestjs/common";
|
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 { Prisma, PrismaClient } from "prisma/postgres/generated/prisma/client/postgres/client";
|
||||||
|
import { Result } from "src/common/errors/result-error.factory";
|
||||||
|
|
||||||
type Tx = Prisma.TransactionClient | PrismaClient;
|
type Tx = Prisma.TransactionClient | PrismaClient;
|
||||||
|
|
||||||
|
|
@ -12,7 +12,9 @@ export class EmailToIdResolver {
|
||||||
constructor(private readonly prisma: PrismaPostgresService) { }
|
constructor(private readonly prisma: PrismaPostgresService) { }
|
||||||
|
|
||||||
// find employee_id using email
|
// find employee_id using email
|
||||||
readonly findIdByEmail = async (email: string, client?: Tx
|
readonly findIdByEmail = async (
|
||||||
|
email: string,
|
||||||
|
client?: Tx
|
||||||
): Promise<Result<number, string>> => {
|
): Promise<Result<number, string>> => {
|
||||||
const db = (client ?? this.prisma) as PrismaClient;
|
const db = (client ?? this.prisma) as PrismaClient;
|
||||||
const employee = await db.employees.findFirst({
|
const employee = await db.employees.findFirst({
|
||||||
|
|
@ -24,7 +26,9 @@ export class EmailToIdResolver {
|
||||||
}
|
}
|
||||||
|
|
||||||
// find user_id using email
|
// find user_id using email
|
||||||
readonly resolveUserIdWithEmail = async (email: string, client?: Tx
|
readonly resolveUserIdWithEmail = async (
|
||||||
|
email: string,
|
||||||
|
client?: Tx
|
||||||
): Promise<Result<string, string>> => {
|
): Promise<Result<string, string>> => {
|
||||||
const db = (client ?? this.prisma) as PrismaClient;
|
const db = (client ?? this.prisma) as PrismaClient;
|
||||||
const user = await db.users.findFirst({
|
const user = await db.users.findFirst({
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Injectable } from "@nestjs/common";
|
import { Injectable } from "@nestjs/common";
|
||||||
import { Result } from "src/common/errors/result-error.factory";
|
|
||||||
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
||||||
import { Prisma, PrismaClient } from "prisma/postgres/generated/prisma/client/postgres/client";
|
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;
|
type Tx = Prisma.TransactionClient | PrismaClient;
|
||||||
|
|
||||||
|
|
@ -9,7 +9,10 @@ type Tx = Prisma.TransactionClient | PrismaClient;
|
||||||
export class FullNameResolver {
|
export class FullNameResolver {
|
||||||
constructor(private readonly prisma: PrismaPostgresService) { }
|
constructor(private readonly prisma: PrismaPostgresService) { }
|
||||||
|
|
||||||
readonly resolveFullName = async (employee_id: number, client?: Tx): Promise<Result<string, string>> => {
|
readonly resolveFullName = async (
|
||||||
|
employee_id: number,
|
||||||
|
client?: Tx
|
||||||
|
): Promise<Result<string, string>> => {
|
||||||
const db = (client ?? this.prisma) as PrismaClient;
|
const db = (client ?? this.prisma) as PrismaClient;
|
||||||
const employee = await db.employees.findUnique({
|
const employee = await db.employees.findUnique({
|
||||||
where: { id: employee_id },
|
where: { id: employee_id },
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,9 @@ interface ShiftKey {
|
||||||
export class ShiftIdResolver {
|
export class ShiftIdResolver {
|
||||||
constructor(private readonly prisma: PrismaPostgresService) { }
|
constructor(private readonly prisma: PrismaPostgresService) { }
|
||||||
|
|
||||||
readonly findShiftIdByData = async (key: ShiftKey, client?: Tx
|
readonly findShiftIdByData = async (
|
||||||
|
key: ShiftKey,
|
||||||
|
client?: Tx
|
||||||
): Promise<Result<number, string>> => {
|
): Promise<Result<number, string>> => {
|
||||||
const db = (client ?? this.prisma) as PrismaClient;
|
const db = (client ?? this.prisma) as PrismaClient;
|
||||||
const shift = await db.shifts.findFirst({
|
const shift = await db.shifts.findFirst({
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { Injectable } from "@nestjs/common";
|
import { Injectable } from "@nestjs/common";
|
||||||
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
|
||||||
import { EmailToIdResolver } from "./email-id.mapper";
|
import { EmailToIdResolver } from "./email-id.mapper";
|
||||||
import { Result } from "src/common/errors/result-error.factory";
|
|
||||||
import { weekStartSunday } from "src/common/utils/date-utils";
|
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 { PrismaClient } from "prisma/postgres/generated/prisma/client/postgres/internal/class";
|
||||||
import { Prisma } from "prisma/postgres/generated/prisma/client/postgres/client";
|
import { Prisma } from "prisma/postgres/generated/prisma/client/postgres/client";
|
||||||
|
|
||||||
|
|
@ -16,7 +16,11 @@ export class EmployeeTimesheetResolver {
|
||||||
private readonly emailResolver: EmailToIdResolver,
|
private readonly emailResolver: EmailToIdResolver,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
readonly findTimesheetIdByEmail = async (email: string, date: Date, client?: Tx): Promise<Result<{ id: number }, string>> => {
|
readonly findTimesheetIdByEmail = async (
|
||||||
|
email: string,
|
||||||
|
date: Date,
|
||||||
|
client?: Tx
|
||||||
|
): Promise<Result<{ id: number }, string>> => {
|
||||||
const db = (client ?? this.prisma) as PrismaClient;
|
const db = (client ?? this.prisma) as PrismaClient;
|
||||||
const employee_id = await this.emailResolver.findIdByEmail(email);
|
const employee_id = await this.emailResolver.findIdByEmail(email);
|
||||||
if (!employee_id.success) return { success: false, error: employee_id.error }
|
if (!employee_id.success) return { success: false, error: employee_id.error }
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,10 @@ export abstract class BaseApprovalService<T> {
|
||||||
protected abstract delegateFor(tx: TransactionClient): UpdatableDelegate<T>;
|
protected abstract delegateFor(tx: TransactionClient): UpdatableDelegate<T>;
|
||||||
|
|
||||||
//standard update Aproval
|
//standard update Aproval
|
||||||
async updateApproval(id: number, is_approved: boolean): Promise<T> {
|
async updateApproval(
|
||||||
|
id: number,
|
||||||
|
is_approved: boolean
|
||||||
|
): Promise<T> {
|
||||||
try {
|
try {
|
||||||
return await this.delegate.update({
|
return await this.delegate.update({
|
||||||
where: { id },
|
where: { id },
|
||||||
|
|
@ -34,7 +37,11 @@ export abstract class BaseApprovalService<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async updateApprovalWithTransaction(tx: TransactionClient, id: number, is_approved: boolean): Promise<T> {
|
async updateApprovalWithTransaction(
|
||||||
|
tx: TransactionClient,
|
||||||
|
id: number,
|
||||||
|
is_approved: boolean
|
||||||
|
): Promise<T> {
|
||||||
try {
|
try {
|
||||||
return await this.delegateFor(tx).update({
|
return await this.delegateFor(tx).update({
|
||||||
where: { id },
|
where: { id },
|
||||||
|
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
//Prisma 'where' clause for DTO filters
|
|
||||||
export function buildPrismaWhere<T extends Record<string, any>>(dto: T): Record <string, any> {
|
|
||||||
const where: Record<string,any> = {};
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
@ -156,3 +156,11 @@ export const addHourstoDateString = (start_time: string, hours: number): string
|
||||||
const mm = String(end.getUTCMinutes()).padStart(2, '0');
|
const mm = String(end.getUTCMinutes()).padStart(2, '0');
|
||||||
return `${hh}:${mm}:00`;
|
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}`;
|
||||||
|
}
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
# GET http://localhost:3000/accounts
|
|
||||||
|
|
||||||
# GET http://localhost:3000/accounts/6912
|
|
||||||
|
|
||||||
|
|
||||||
GET http://localhost:3000/accounts/account/6912
|
|
||||||
|
|
@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -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;
|
|
||||||
};
|
|
||||||
|
|
@ -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 { };
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
import { Injectable } from "@nestjs/common";
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class AccountCreateService {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
import { Injectable } from "@nestjs/common";
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class AccountMemoUpdateService {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -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<Result<AccountMemo[], string>> => {
|
|
||||||
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 }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -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<Result<boolean, string>> {
|
|
||||||
|
|
||||||
// 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,
|
|
||||||
// },
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
@ -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<Result<Account[], string>> => {
|
|
||||||
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<Result<Account, string>> => {
|
|
||||||
|
|
||||||
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 };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,13 @@
|
||||||
import { Module } from "@nestjs/common";
|
import { Module } from "@nestjs/common";
|
||||||
|
import { TicketController } from "src/customer-support/tickets/ticket.controller";
|
||||||
|
import { TicketService } from "src/customer-support/tickets/ticket.service";
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [],
|
controllers: [
|
||||||
controllers: [],
|
TicketController
|
||||||
providers: [],
|
],
|
||||||
exports: [],
|
providers: [
|
||||||
}) export class CustomerSupportModule {}
|
TicketService
|
||||||
|
],
|
||||||
|
|
||||||
|
}) export class CustomerSupportModule { }
|
||||||
1
src/customer-support/http-test-files/ticket.test.http
Normal file
1
src/customer-support/http-test-files/ticket.test.http
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
GET http://localhost:3000/tickets/OPEN?sortOrder=last_update&sortTypes=DESC&offset=0&limit=10&email=gilles@targointernet.com
|
||||||
14
src/customer-support/tickets/dtos/ticket-list.dto.ts
Normal file
14
src/customer-support/tickets/dtos/ticket-list.dto.ts
Normal file
|
|
@ -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;
|
||||||
|
}
|
||||||
69
src/customer-support/tickets/dtos/ticket.dto.ts
Normal file
69
src/customer-support/tickets/dtos/ticket.dto.ts
Normal file
|
|
@ -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'];
|
||||||
|
|
@ -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<Result<TicketList[], string>> {
|
||||||
|
const statusFilters = status.split(',');
|
||||||
|
const queryEmail = filterEmail ?? email;
|
||||||
|
|
||||||
|
return await this.getService.getListOfAllTicketByFilters(
|
||||||
|
statusFilters,
|
||||||
|
offset,
|
||||||
|
limit,
|
||||||
|
sortOrder,
|
||||||
|
sortType,
|
||||||
|
queryEmail,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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 { }
|
||||||
|
|
@ -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<Result<TicketList[], string>> => {
|
||||||
|
|
||||||
|
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<TicketList[]>(
|
||||||
|
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 };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -9,17 +9,23 @@ import { UsersService } from 'src/identity-and-account/users-management/services
|
||||||
|
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [ PassportModule.register({
|
imports: [
|
||||||
session: true,
|
PassportModule.register({
|
||||||
defaultStrategy: 'openidconnect'
|
session: true,
|
||||||
}), UsersModule, ],
|
defaultStrategy: 'openidconnect'
|
||||||
|
}), UsersModule,
|
||||||
|
],
|
||||||
providers: [
|
providers: [
|
||||||
AuthentikAuthService,
|
AuthentikAuthService,
|
||||||
AuthentikStrategy,
|
AuthentikStrategy,
|
||||||
ExpressSessionSerializer,
|
ExpressSessionSerializer,
|
||||||
UsersService,
|
UsersService,
|
||||||
],
|
],
|
||||||
exports: [ AuthentikAuthService ],
|
exports: [
|
||||||
controllers: [AuthController],
|
AuthentikAuthService
|
||||||
|
],
|
||||||
|
controllers: [
|
||||||
|
AuthController
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class AuthenticationModule {}
|
export class AuthenticationModule { }
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ export class AuthController {
|
||||||
|
|
||||||
@Get('callback')
|
@Get('callback')
|
||||||
@UseGuards(OIDCLoginGuard)
|
@UseGuards(OIDCLoginGuard)
|
||||||
loginCallback(@Req() req: Request, @Res() res: Response) {
|
loginCallback(@Req() _req: Request, @Res() res: Response) {
|
||||||
res.redirect(process.env.REDIRECT_URL_DEV!);
|
res.redirect(process.env.REDIRECT_URL_DEV!);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
import { ExecutionContext, Injectable } from '@nestjs/common';
|
import { ExecutionContext, Injectable } from '@nestjs/common';
|
||||||
import { AuthGuard } from '@nestjs/passport';
|
import { AuthGuard } from '@nestjs/passport';
|
||||||
|
import { Request } from 'express';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class OIDCLoginGuard extends AuthGuard('openidconnect') {
|
export class OIDCLoginGuard extends AuthGuard('openidconnect') {
|
||||||
async canActivate(context: ExecutionContext) {
|
async canActivate(context: ExecutionContext) {
|
||||||
const result = (await super.canActivate(context)) as boolean;
|
const result = (await super.canActivate(context)) as boolean;
|
||||||
const request = context.switchToHttp().getRequest();
|
const request = context.switchToHttp().getRequest<Request>();
|
||||||
await super.logIn(request);
|
await super.logIn(request);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ export class ExpressSessionSerializer extends PassportSerializer {
|
||||||
}
|
}
|
||||||
done(null, user);
|
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){
|
if (!payload){
|
||||||
done(new UnauthorizedException('Deserialize user error'), payload);
|
done(new UnauthorizedException('Deserialize user error'), payload);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
|
|
||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
import { UsersService } from 'src/identity-and-account/users-management/services/users.service';
|
import { UsersService } from 'src/identity-and-account/users-management/services/users.service';
|
||||||
|
import { UserDto } from 'src/identity-and-account/users-management/user.dto';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AuthentikAuthService {
|
export class AuthentikAuthService {
|
||||||
constructor(private usersService: UsersService) {}
|
constructor(private usersService: UsersService) {}
|
||||||
|
|
||||||
async validateUser(user_email: string): Promise<any> {
|
async validateUser(user_email: string): Promise<Partial<UserDto>> {
|
||||||
const user = await this.usersService.findOneByEmail(user_email);
|
const user = await this.usersService.findOneByEmail(user_email);
|
||||||
|
|
||||||
return user;
|
return user;
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,9 @@ export class AuthentikStrategy extends PassportStrategy(OIDCStrategy, 'openidcon
|
||||||
|
|
||||||
async validate(
|
async validate(
|
||||||
_issuer: string,
|
_issuer: string,
|
||||||
profile: Profile,
|
_profile: Profile,
|
||||||
_context: any,
|
_context: any,
|
||||||
_idToken: string,
|
idToken: string,
|
||||||
_accessToken: string,
|
_accessToken: string,
|
||||||
_refreshToken: string,
|
_refreshToken: string,
|
||||||
_params: any,
|
_params: any,
|
||||||
|
|
@ -50,9 +50,9 @@ export class AuthentikStrategy extends PassportStrategy(OIDCStrategy, 'openidcon
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
||||||
const components = _idToken.split('.');
|
const components = idToken.split('.');
|
||||||
const payload = Buffer.from(components[1], "base64").toString('utf-8');
|
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);
|
if (!claims.email) return cb(new Error('Missing email in OIDC profile'), false);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,17 @@ export class EmployeesController {
|
||||||
|
|
||||||
@Get('personal-profile')
|
@Get('personal-profile')
|
||||||
@ModuleAccessAllowed(ModulesEnum.personal_profile)
|
@ModuleAccessAllowed(ModulesEnum.personal_profile)
|
||||||
async findOwnProfile(@Access('email') email: string): Promise<Result<Partial<EmployeeDetailedDto>, string>> {
|
async findOwnProfile(
|
||||||
|
@Access('email') email: string
|
||||||
|
): Promise<Result<Partial<EmployeeDetailedDto>, string>> {
|
||||||
return await this.getService.findOwnProfile(email);
|
return await this.getService.findOwnProfile(email);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('profile')
|
@Get('profile')
|
||||||
@ModuleAccessAllowed(ModulesEnum.personal_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<Result<Partial<EmployeeDetailedDto>, string>> {
|
): Promise<Result<Partial<EmployeeDetailedDto>, string>> {
|
||||||
return await this.getService.findOneDetailedProfile(email, employee_email);
|
return await this.getService.findOneDetailedProfile(email, employee_email);
|
||||||
}
|
}
|
||||||
|
|
@ -37,13 +41,17 @@ export class EmployeesController {
|
||||||
|
|
||||||
@Post('create')
|
@Post('create')
|
||||||
@ModuleAccessAllowed(ModulesEnum.employee_management)
|
@ModuleAccessAllowed(ModulesEnum.employee_management)
|
||||||
async createEmployee(@Body() dto: EmployeeDetailedUpsertDto): Promise<Result<boolean, string>> {
|
async createEmployee(
|
||||||
|
@Body() dto: EmployeeDetailedUpsertDto
|
||||||
|
): Promise<Result<boolean, string>> {
|
||||||
return await this.createService.createEmployee(dto);
|
return await this.createService.createEmployee(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Patch('update')
|
@Patch('update')
|
||||||
@ModuleAccessAllowed(ModulesEnum.employee_management)
|
@ModuleAccessAllowed(ModulesEnum.employee_management)
|
||||||
async updateEmployee(@Body() dto:EmployeeDetailedUpsertDto){
|
async updateEmployee(
|
||||||
|
@Body() dto:EmployeeDetailedUpsertDto
|
||||||
|
){
|
||||||
return await this.updateService.updateEmployee(dto);
|
return await this.updateService.updateEmployee(dto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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';
|
import { EmployeesCreateService } from 'src/identity-and-account/employees/services/employees-create.service';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [],
|
controllers: [
|
||||||
controllers: [EmployeesController],
|
EmployeesController
|
||||||
|
],
|
||||||
providers: [
|
providers: [
|
||||||
EmployeesGetService,
|
EmployeesGetService,
|
||||||
EmployeesUpdateService,
|
EmployeesUpdateService,
|
||||||
|
|
@ -16,6 +17,8 @@ import { EmployeesCreateService } from 'src/identity-and-account/employees/servi
|
||||||
AccessGetService,
|
AccessGetService,
|
||||||
EmailToIdResolver
|
EmailToIdResolver
|
||||||
],
|
],
|
||||||
exports: [EmployeesGetService],
|
exports: [
|
||||||
|
EmployeesGetService
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class EmployeesModule { }
|
export class EmployeesModule { }
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,9 @@ export class HomePageController {
|
||||||
|
|
||||||
@Get('help')
|
@Get('help')
|
||||||
@ModuleAccessAllowed(ModulesEnum.dashboard)
|
@ModuleAccessAllowed(ModulesEnum.dashboard)
|
||||||
async getIntroductionHelper(@Access('email') email: string) {
|
async getIntroductionHelper(
|
||||||
|
@Access('email') email: string
|
||||||
|
) {
|
||||||
return await this.homePageService.buildHomePageHelpMessage(email);
|
return await this.homePageService.buildHomePageHelpMessage(email);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -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";
|
import { HomePageService } from "src/identity-and-account/help/help-page.service";
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
controllers: [HomePageController],
|
controllers: [
|
||||||
providers: [HomePageService, EmailToIdResolver],
|
HomePageController
|
||||||
exports: [HomePageService],
|
],
|
||||||
|
providers: [
|
||||||
|
HomePageService,
|
||||||
|
EmailToIdResolver
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
HomePageService
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class HomePageModule { };
|
export class HomePageModule { };
|
||||||
|
|
@ -10,7 +10,9 @@ export class HomePageService {
|
||||||
private readonly emailresolver: EmailToIdResolver,
|
private readonly emailresolver: EmailToIdResolver,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
buildHomePageHelpMessage = async (email: string): Promise<Result<string[], string>> => {
|
buildHomePageHelpMessage = async (
|
||||||
|
email: string
|
||||||
|
): Promise<Result<string[], string>> => {
|
||||||
const user_id = await this.emailresolver.resolveUserIdWithEmail(email);
|
const user_id = await this.emailresolver.resolveUserIdWithEmail(email);
|
||||||
if (!user_id.success) return { success: false, error: 'INVALID_EMAIL' };
|
if (!user_id.success) return { success: false, error: 'INVALID_EMAIL' };
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,14 +12,19 @@ export class PreferencesController {
|
||||||
|
|
||||||
@Patch('update')
|
@Patch('update')
|
||||||
@ModuleAccessAllowed(ModulesEnum.personal_profile)
|
@ModuleAccessAllowed(ModulesEnum.personal_profile)
|
||||||
async updatePreferences(@Access('email') email: string, @Body() payload: PreferencesDto
|
async updatePreferences(
|
||||||
|
@Access('email') email: string,
|
||||||
|
@Body() payload: PreferencesDto
|
||||||
): Promise<Result<PreferencesDto, string>> {
|
): Promise<Result<PreferencesDto, string>> {
|
||||||
return this.service.updatePreferences(email, payload);
|
return this.service.updatePreferences(email, payload);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get()
|
@Get()
|
||||||
@ModuleAccessAllowed(ModulesEnum.personal_profile)
|
@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);
|
return this.service.findPreferences(email, employee_email);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,16 @@ import { PreferencesService } from "./preferences.service";
|
||||||
import { Module } from "@nestjs/common";
|
import { Module } from "@nestjs/common";
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
controllers: [ PreferencesController ],
|
controllers: [
|
||||||
providers: [ PreferencesService, EmailToIdResolver ],
|
PreferencesController
|
||||||
exports: [ PreferencesService ],
|
],
|
||||||
|
providers: [
|
||||||
|
PreferencesService,
|
||||||
|
EmailToIdResolver
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
PreferencesService
|
||||||
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
export class PreferencesModule {}
|
export class PreferencesModule {}
|
||||||
|
|
@ -11,7 +11,10 @@ export class PreferencesService {
|
||||||
private readonly emailResolver: EmailToIdResolver,
|
private readonly emailResolver: EmailToIdResolver,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
async findPreferences(email: string, employee_email?: string): Promise<Result<PreferencesDto, string>> {
|
async findPreferences(
|
||||||
|
email: string,
|
||||||
|
employee_email?: string
|
||||||
|
): Promise<Result<PreferencesDto, string>> {
|
||||||
const account_email = employee_email ?? email;
|
const account_email = employee_email ?? email;
|
||||||
const user_id = await this.emailResolver.resolveUserIdWithEmail(account_email);
|
const user_id = await this.emailResolver.resolveUserIdWithEmail(account_email);
|
||||||
if (!user_id.success) return { success: false, error: 'EMPLOYEE_NOT_FOUND' };
|
if (!user_id.success) return { success: false, error: 'EMPLOYEE_NOT_FOUND' };
|
||||||
|
|
@ -42,7 +45,10 @@ export class PreferencesService {
|
||||||
return { success: true, data: preferences };
|
return { success: true, data: preferences };
|
||||||
}
|
}
|
||||||
|
|
||||||
async updatePreferences(email: string, dto: PreferencesDto): Promise<Result<PreferencesDto, string>> {
|
async updatePreferences(
|
||||||
|
email: string,
|
||||||
|
dto: PreferencesDto
|
||||||
|
): Promise<Result<PreferencesDto, string>> {
|
||||||
const user_id = await this.emailResolver.resolveUserIdWithEmail(email);
|
const user_id = await this.emailResolver.resolveUserIdWithEmail(email);
|
||||||
if (!user_id.success) return { success: false, error: user_id.error }
|
if (!user_id.success) return { success: false, error: user_id.error }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import { IsBoolean } from "class-validator";
|
import { IsBoolean } from "class-validator";
|
||||||
|
|
||||||
export class ModuleAccess {
|
export class ModuleAccess {
|
||||||
@IsBoolean() timesheets!: boolean;
|
@IsBoolean() timesheets: boolean;
|
||||||
@IsBoolean() timesheets_approval!: boolean;
|
@IsBoolean() timesheets_approval: boolean;
|
||||||
@IsBoolean() employee_list!: boolean;
|
@IsBoolean() employee_list: boolean;
|
||||||
@IsBoolean() employee_management!: boolean;
|
@IsBoolean() employee_management: boolean;
|
||||||
@IsBoolean() personal_profile!: boolean;
|
@IsBoolean() personal_profile: boolean;
|
||||||
@IsBoolean() dashboard!: boolean;
|
@IsBoolean() dashboard: boolean;
|
||||||
}
|
}
|
||||||
|
|
@ -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 { Access } from "src/common/decorators/module-access.decorators";
|
||||||
import { Result } from "src/common/errors/result-error.factory";
|
import { Result } from "src/common/errors/result-error.factory";
|
||||||
import { ModuleAccess } from "src/identity-and-account/user-module-access/module-acces.dto";
|
import { ModuleAccess } from "src/identity-and-account/user-module-access/module-acces.dto";
|
||||||
|
|
@ -16,7 +16,9 @@ export class ModuleAccessController {
|
||||||
|
|
||||||
@Get()
|
@Get()
|
||||||
@ModuleAccessAllowed(ModulesEnum.employee_management)
|
@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<Result<boolean, string>> {
|
): Promise<Result<boolean, string>> {
|
||||||
await this.getService.findModuleAccess(email, employee_email);
|
await this.getService.findModuleAccess(email, employee_email);
|
||||||
return { success: true, data: true };
|
return { success: true, data: true };
|
||||||
|
|
@ -24,7 +26,10 @@ export class ModuleAccessController {
|
||||||
|
|
||||||
@Patch('update')
|
@Patch('update')
|
||||||
@ModuleAccessAllowed(ModulesEnum.employee_management)
|
@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<Result<boolean, string>> {
|
): Promise<Result<boolean, string>> {
|
||||||
await this.updateService.updateModuleAccess(email, dto, employee_email);
|
await this.updateService.updateModuleAccess(email, dto, employee_email);
|
||||||
return { success: true, data: true };
|
return { success: true, data: true };
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,16 @@ import { AccessGetService } from "src/identity-and-account/user-module-access/se
|
||||||
import { EmailToIdResolver } from "src/common/mappers/email-id.mapper";
|
import { EmailToIdResolver } from "src/common/mappers/email-id.mapper";
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
controllers: [ModuleAccessController],
|
controllers: [
|
||||||
providers: [AccessUpdateService, AccessGetService, EmailToIdResolver],
|
ModuleAccessController
|
||||||
exports: [AccessGetService],
|
],
|
||||||
|
providers: [
|
||||||
|
AccessUpdateService,
|
||||||
|
AccessGetService,
|
||||||
|
EmailToIdResolver
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
AccessGetService
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class ModuleAccessModule { }
|
export class ModuleAccessModule { }
|
||||||
|
|
@ -12,7 +12,10 @@ export class AccessGetService {
|
||||||
private readonly emailResolver: EmailToIdResolver,
|
private readonly emailResolver: EmailToIdResolver,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
async findModuleAccess(email: string, employee_email?: string): Promise<Result<ModuleAccess, string>> {
|
async findModuleAccess(
|
||||||
|
email: string,
|
||||||
|
employee_email?: string
|
||||||
|
): Promise<Result<ModuleAccess, string>> {
|
||||||
const account_email = employee_email ?? email;
|
const account_email = employee_email ?? email;
|
||||||
const user_id = await this.emailResolver.resolveUserIdWithEmail(account_email);
|
const user_id = await this.emailResolver.resolveUserIdWithEmail(account_email);
|
||||||
if (!user_id.success) return { success: false, error: 'EMPLOYEE_NOT_FOUND' };
|
if (!user_id.success) return { success: false, error: 'EMPLOYEE_NOT_FOUND' };
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,11 @@ export class AccessUpdateService {
|
||||||
private readonly emailResolver: EmailToIdResolver,
|
private readonly emailResolver: EmailToIdResolver,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
async updateModuleAccess(email: string, dto: ModuleAccess, employee_email?: string): Promise<Result<ModuleAccess, string>> {
|
async updateModuleAccess(
|
||||||
|
email: string,
|
||||||
|
dto: ModuleAccess,
|
||||||
|
employee_email?: string
|
||||||
|
): Promise<Result<ModuleAccess, string>> {
|
||||||
const account_email = employee_email ?? email;
|
const account_email = employee_email ?? email;
|
||||||
const user_id = await this.emailResolver.resolveUserIdWithEmail(account_email);
|
const user_id = await this.emailResolver.resolveUserIdWithEmail(account_email);
|
||||||
if (!user_id.success) return { success: false, error: 'EMPLOYEE_NOT_FOUND' };
|
if (!user_id.success) return { success: false, error: 'EMPLOYEE_NOT_FOUND' };
|
||||||
|
|
@ -52,7 +56,10 @@ export class AccessUpdateService {
|
||||||
return { success: true, data: updated_access };
|
return { success: true, data: updated_access };
|
||||||
}
|
}
|
||||||
|
|
||||||
async revokeModuleAccess(email: string, employee_email?: string): Promise<Result<ModuleAccess, string>> {
|
async revokeModuleAccess(
|
||||||
|
email: string,
|
||||||
|
employee_email?: string
|
||||||
|
): Promise<Result<ModuleAccess, string>> {
|
||||||
const account_email = employee_email ?? email;
|
const account_email = employee_email ?? email;
|
||||||
const user_id = await this.emailResolver.resolveUserIdWithEmail(account_email);
|
const user_id = await this.emailResolver.resolveUserIdWithEmail(account_email);
|
||||||
if (!user_id.success) return { success: false, error: 'EMPLOYEE_NOT_FOUND' };
|
if (!user_id.success) return { success: false, error: 'EMPLOYEE_NOT_FOUND' };
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,9 @@ import { PrismaPostgresService } from 'prisma/postgres/prisma-postgres.service';
|
||||||
export abstract class AbstractUserService {
|
export abstract class AbstractUserService {
|
||||||
constructor(protected readonly prisma: PrismaPostgresService) { }
|
constructor(protected readonly prisma: PrismaPostgresService) { }
|
||||||
|
|
||||||
async findOneByEmail(email: string): Promise<Partial<Users>> {
|
async findOneByEmail(
|
||||||
|
email: string
|
||||||
|
): Promise<Partial<Users>> {
|
||||||
const user = await this.prisma.users.findUnique({
|
const user = await this.prisma.users.findUnique({
|
||||||
where: { email },
|
where: { email },
|
||||||
include: {
|
include: {
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,5 @@ export class UserDto {
|
||||||
@IsString() last_name: string;
|
@IsString() last_name: string;
|
||||||
@IsEmail() email: string;
|
@IsEmail() email: string;
|
||||||
@IsEnum(Roles) role: string;
|
@IsEnum(Roles) role: string;
|
||||||
@IsArray() @IsEnum(Modules, { each: true }) user_module_access!: Modules[];
|
@IsArray() @IsEnum(Modules, { each: true }) user_module_access: Modules[];
|
||||||
}
|
}
|
||||||
|
|
@ -3,8 +3,14 @@ import { UsersService } from './services/users.service';
|
||||||
import { PrismaPostgresModule } from 'prisma/postgres/prisma-postgres.module';
|
import { PrismaPostgresModule } from 'prisma/postgres/prisma-postgres.module';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [PrismaPostgresModule],
|
imports: [
|
||||||
providers: [UsersService],
|
PrismaPostgresModule
|
||||||
exports: [UsersService],
|
],
|
||||||
|
providers: [
|
||||||
|
UsersService
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
UsersService
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class UsersModule {}
|
export class UsersModule {}
|
||||||
|
|
|
||||||
18
src/main.ts
18
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 { NestFactory, Reflector } from '@nestjs/core';
|
||||||
import { AppModule } from './app.module';
|
import { AppModule } from './app.module';
|
||||||
import { ModulesGuard } from './common/guards/modules.guard';
|
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
|
const SESSION_TOKEN_DURATION_MINUTES = 180
|
||||||
|
|
||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
|
BigInt.prototype['toJSON'] = function () { return Number(this) };
|
||||||
const app = await NestFactory.create(AppModule);
|
const app = await NestFactory.create(AppModule);
|
||||||
const prisma_postgres = app.get(PrismaPostgresService);
|
const prisma_postgres = app.get(PrismaPostgresService);
|
||||||
|
|
||||||
const reflector = app.get(Reflector);
|
const reflector = app.get(Reflector);
|
||||||
|
|
||||||
app.useGlobalGuards(
|
app.useGlobalGuards(
|
||||||
new ModulesGuard(reflector), //deny-by-default and Module-based Access Control
|
new ModulesGuard(reflector),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Authentication and session
|
// Authentication and session
|
||||||
|
|
@ -45,19 +41,11 @@ async function bootstrap() {
|
||||||
|
|
||||||
// Enable CORS
|
// Enable CORS
|
||||||
app.enableCors({
|
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,
|
credentials: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
await app.listen(process.env.PORT ?? 3000);
|
await app.listen(process.env.PORT ?? 3000);
|
||||||
|
|
||||||
|
|
||||||
// migration function calls
|
|
||||||
// await initializePaidTimeOff();
|
|
||||||
// await initializePreferences();
|
|
||||||
// await extractOldTimesheets();
|
|
||||||
// await extractOldShifts();
|
|
||||||
// await extractOldExpenses();
|
|
||||||
// await initSupervisor();
|
|
||||||
}
|
}
|
||||||
bootstrap();
|
bootstrap();
|
||||||
|
|
|
||||||
|
|
@ -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 {}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user