feat: Add internationalization fields to DTOs (priceCurrency, timeZone, revenueCurrency, preferredLocale)

This commit is contained in:
dahoud
2025-12-06 23:51:13 +00:00
parent 151b55ae70
commit 93e46328ae
3 changed files with 86 additions and 2 deletions

View File

@@ -54,6 +54,18 @@ public class ClientDTO {
*/
private BigDecimal annualRevenue;
/**
* Devise du chiffre d'affaires (Code ISO 4217).
*/
@Size(min = 3, max = 3, message = "Le code devise doit faire 3 caractères")
private String revenueCurrency = "USD";
/**
* Locale préférée pour la communication (ex: fr-FR, en-US).
*/
@Size(max = 20, message = "La locale ne peut pas dépasser 20 caractères")
private String preferredLocale = "fr-FR";
/**
* Adresse de l'entreprise - ligne 1.
*/
@@ -203,6 +215,22 @@ public class ClientDTO {
this.annualRevenue = annualRevenue;
}
public String getRevenueCurrency() {
return revenueCurrency;
}
public void setRevenueCurrency(String revenueCurrency) {
this.revenueCurrency = revenueCurrency;
}
public String getPreferredLocale() {
return preferredLocale;
}
public void setPreferredLocale(String preferredLocale) {
this.preferredLocale = preferredLocale;
}
public String getAddressLine1() {
return addressLine1;
}

View File

@@ -100,6 +100,18 @@ public class CoachingSessionDTO {
*/
private BigDecimal price;
/**
* Devise du prix (Code ISO 4217, ex: USD, XOF, EUR).
*/
@Size(min = 3, max = 3, message = "Le code devise doit faire 3 caractères")
private String priceCurrency = "USD";
/**
* Fuseau horaire de la session (ex: Africa/Abidjan, America/New_York).
*/
@Size(max = 50, message = "Le fuseau horaire ne peut pas dépasser 50 caractères")
private String timeZone = "UTC";
/**
* Statut de la session.
*/
@@ -281,6 +293,22 @@ public class CoachingSessionDTO {
this.price = price;
}
public String getPriceCurrency() {
return priceCurrency;
}
public void setPriceCurrency(String priceCurrency) {
this.priceCurrency = priceCurrency;
}
public String getTimeZone() {
return timeZone;
}
public void setTimeZone(String timeZone) {
this.timeZone = timeZone;
}
public SessionStatus getStatus() {
return status;
}

View File

@@ -95,6 +95,18 @@ public class WorkshopDTO {
*/
private BigDecimal price;
/**
* Devise du prix (Code ISO 4217, ex: USD, XOF, EUR).
*/
@Size(min = 3, max = 3, message = "Le code devise doit faire 3 caractères")
private String priceCurrency = "USD";
/**
* Fuseau horaire de l'atelier (ex: Africa/Abidjan, America/New_York).
*/
@Size(max = 50, message = "Le fuseau horaire ne peut pas dépasser 50 caractères")
private String timeZone = "UTC";
/**
* Statut de l'atelier.
*/
@@ -253,6 +265,22 @@ public class WorkshopDTO {
this.price = price;
}
public String getPriceCurrency() {
return priceCurrency;
}
public void setPriceCurrency(String priceCurrency) {
this.priceCurrency = priceCurrency;
}
public String getTimeZone() {
return timeZone;
}
public void setTimeZone(String timeZone) {
this.timeZone = timeZone;
}
public String getStatus() {
return status;
}
@@ -331,8 +359,8 @@ public class WorkshopDTO {
* @return true si l'atelier est complet
*/
public boolean isFull() {
return currentParticipants != null && maxParticipants != null &&
currentParticipants >= maxParticipants;
return currentParticipants != null && maxParticipants != null &&
currentParticipants >= maxParticipants;
}
/**