// 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,         
//             },
//         });




//     }
// }