Types Employé
Types utilisés pour la gestion des employés.
B2BEmployeItem
Représente un employé avec toutes ses informations.
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é | Type | Description |
|---|---|---|
IdUnique | Guid | Identifiant unique MCM |
DerniereMAJ | DateTime | Date de dernière modification |
DateCreation | DateTime | Date de création |
SourceModification | int | Source de la dernière modification |
SourceCreation | int | Source 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é | Type | Description |
|---|---|---|
IdExterne | string | Identifiant unique dans votre système |
Prenom | string | Prénom de l'employé |
Nom | string | Nom de famille |
NoMembre | string | Numéro de membre |
Courriel | string | Adresse courriel principale |
IdentifiantExterneEmployeur | string | IdExterne de l'employeur |
Propriétés optionnelles
| Propriété | Type | Description |
|---|---|---|
CourrielAlternatif | string? | Courriel secondaire |
TelephonePrincipal | string? | Téléphone principal |
TelephoneAlternatif | string? | Téléphone secondaire |
Adresse1 | string? | Première ligne d'adresse |
Adresse2 | string? | Deuxième ligne d'adresse |
Ville | string? | Ville |
Province | string? | Province/État |
CodePostal | string? | Code postal |
MauvaisCourriel | bool? | Indicateur courriel invalide |
MauvaisCourrielAlternatif | bool? | Indicateur courriel alternatif invalide |
DateNaissance | DateOnly? | Date de naissance |
Matricule | string? | Matricule employé |
ValeursChampUtilisateur | ICollection<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 List<B2BValeurChampUtilisateurItem>
{
new() { NomChamp = "Département", Valeur = "IT" }
}
};
B2BUpsertEmployeDto
DTO pour la synchronisation (upsert). Structure similaire à B2BUpdateEmployeDto.
B2BUpdateCourrielDto
DTO pour la mise à jour groupée des courriels.
public class B2BUpdateCourrielDto
{
public string IdExterne { get; set; }
public string NouveauCourriel { get; set; }
}
| Propriété | Type | Description |
|---|---|---|
IdExterne | string | Identifiant de l'employé |
NouveauCourriel | string | Nouvelle adresse courriel |