Aller au contenu principal

Types Employé

Types utilisés pour la gestion des employés.

B2BEmployeItem

Représente un employé avec toutes ses informations. Hérite de B2BUpdateEmployeDto.

public class B2BEmployeItem : B2BUpdateEmployeDto
{
public Guid IdUnique { get; set; }
public DateTime DerniereMAJ { get; set; }
public DateTime DateCreation { get; set; }
public int SourceModification { get; set; }
public int SourceCreation { get; set; }
}
PropriétéTypeDescription
IdUniqueGuidIdentifiant unique MCM
DerniereMAJDateTimeDate de dernière modification
DateCreationDateTimeDate de création
SourceModificationintSource de la dernière modification
SourceCreationintSource de création

Hérite de toutes les propriétés de B2BUpdateEmployeDto.


B2BUpdateEmployeDto

DTO pour créer ou modifier un employé.

public class B2BUpdateEmployeDto
{
public required string IdExterne { get; init; }
public required string Prenom { get; init; }
public required string Nom { get; init; }
public required string NoMembre { get; init; }
public required string Courriel { get; init; }
public required string IdentifiantExterneEmployeur { get; set; }

public string? CourrielAlternatif { get; set; }
public string? TelephonePrincipal { get; set; }
public string? TelephoneAlternatif { get; set; }
public string? Adresse1 { get; set; }
public string? Adresse2 { get; set; }
public string? Ville { get; set; }
public string? Province { get; set; }
public string? CodePostal { get; set; }
public bool? MauvaisCourriel { get; set; }
public bool? MauvaisCourrielAlternatif { get; set; }
public DateOnly? DateNaissance { get; set; }
public string? Matricule { get; set; }
public ICollection<B2BValeurChampUtilisateurItem> ValeursChampUtilisateur { get; set; } = [];
}

Propriétés requises

PropriétéTypeDescription
IdExternestringIdentifiant unique dans votre système
PrenomstringPrénom de l'employé
NomstringNom de famille
NoMembrestringNuméro de membre
CourrielstringAdresse courriel principale
IdentifiantExterneEmployeurstringIdentifiant externe de l'employeur

Propriétés optionnelles

PropriétéTypeDescription
CourrielAlternatifstring?Courriel secondaire
TelephonePrincipalstring?Téléphone principal
TelephoneAlternatifstring?Téléphone secondaire
Adresse1string?Première ligne d'adresse
Adresse2string?Deuxième ligne d'adresse
Villestring?Ville
Provincestring?Province/État
CodePostalstring?Code postal
MauvaisCourrielbool?Indicateur courriel invalide
MauvaisCourrielAlternatifbool?Indicateur courriel alternatif invalide
DateNaissanceDateOnly?Date de naissance
Matriculestring?Matricule employé
ValeursChampUtilisateurICollection<B2BValeurChampUtilisateurItem>Valeurs des champs personnalisés

Exemple

var employe = new B2BUpdateEmployeDto
{
IdExterne = "EMP-12345",
Prenom = "Jean",
Nom = "Dupont",
NoMembre = "M-12345",
Courriel = "jean.dupont@example.com",
IdentifiantExterneEmployeur = "EMPL-001",
TelephonePrincipal = "514-555-1234",
Ville = "Montréal",
Province = "QC",
CodePostal = "H2X 1Y4",
ValeursChampUtilisateur =
[
new() { Nom = "Département", ValeurString = "IT" }
]
};

B2BUpsertEmployeDto

DTO pour la synchronisation (upsert). Toutes les propriétés sont optionnelles sauf IdExterne.

public class B2BUpsertEmployeDto
{
public string? Prenom { get; set; }
public string? Nom { get; set; }
public string? NoMembre { get; set; }
public string? Courriel { get; set; }
public string? CourrielAlternatif { get; set; }
public string? TelephonePrincipal { get; set; }
public string? TelephoneAlternatif { get; set; }
public string? Adresse1 { get; set; }
public string? Adresse2 { get; set; }
public string? Ville { get; set; }
public string? Province { get; set; }
public string? CodePostal { get; set; }
public required string IdExterne { get; set; }
public int? EmployeurId { get; set; }
public string? IdExterneEmployeur { get; set; }
public DateTime? DateAdhesion { get; set; }
public bool? MauvaisCourriel { get; set; }
public bool? MauvaisCourrielAlternatif { get; set; }
public DateOnly? DateNaissance { get; set; }
public string? Matricule { get; set; }
public List<B2BValeurChampUtilisateurDto> ValeursChampUtilisateur { get; set; } = [];
}

Propriété requise

PropriétéTypeDescription
IdExternestringIdentifiant unique dans votre système (clé de correspondance)

Propriétés optionnelles

PropriétéTypeDescription
Prenomstring?Prénom de l'employé
Nomstring?Nom de famille
NoMembrestring?Numéro de membre
Courrielstring?Adresse courriel principale
CourrielAlternatifstring?Courriel secondaire
TelephonePrincipalstring?Téléphone principal
TelephoneAlternatifstring?Téléphone secondaire
Adresse1string?Première ligne d'adresse
Adresse2string?Deuxième ligne d'adresse
Villestring?Ville
Provincestring?Province/État
CodePostalstring?Code postal
EmployeurIdint?ID interne de l'employeur (alternative à IdExterneEmployeur)
IdExterneEmployeurstring?Identifiant externe de l'employeur
DateAdhesionDateTime?Date d'adhésion
MauvaisCourrielbool?Indicateur courriel invalide
MauvaisCourrielAlternatifbool?Indicateur courriel alternatif invalide
DateNaissanceDateOnly?Date de naissance
Matriculestring?Matricule employé
ValeursChampUtilisateurList<B2BValeurChampUtilisateurDto>Valeurs des champs personnalisés
Différence avec B2BUpdateEmployeDto

B2BUpsertEmployeDto est utilisé lors de la synchronisation en lot. Toutes les propriétés (sauf IdExterne) sont optionnelles car seuls les champs fournis sont mis à jour.

Notez que les valeurs de champs personnalisés utilisent B2BValeurChampUtilisateurDto (écriture) au lieu de B2BValeurChampUtilisateurItem (lecture typée).


B2BUpdateCourrielDto

DTO pour la mise à jour des courriels d'un employé.

public class B2BUpdateCourrielDto
{
public required string IdExterne { get; init; }
public string? CourrielPrincipal { get; init; }
public string? CourrielAlternatif { get; init; }
}
PropriétéTypeRequisDescription
IdExternestringOuiIdentifiant externe de l'employé
CourrielPrincipalstring?NonNouvelle adresse courriel principale
CourrielAlternatifstring?NonNouvelle adresse courriel alternative
astuce

Fournissez uniquement les courriels à mettre à jour. Les champs null ne modifient pas la valeur existante.