25 lines
674 B
Scala
25 lines
674 B
Scala
|
|
package lu.foyer
|
||
|
|
package clients
|
||
|
|
|
||
|
|
import zio.schema.*
|
||
|
|
|
||
|
|
import java.time.LocalDate
|
||
|
|
|
||
|
|
enum ClientEvent derives Schema:
|
||
|
|
case Created(
|
||
|
|
lastName: ClientLastName,
|
||
|
|
firstName: ClientFirstName,
|
||
|
|
birthDate: ClientBirthDate,
|
||
|
|
drivingLicenseDate: Option[ClientDrivingLicenseDate],
|
||
|
|
phoneNumber: Option[PhoneNumberInput],
|
||
|
|
email: Option[Email],
|
||
|
|
address: Option[Address])
|
||
|
|
case Updated(
|
||
|
|
lastName: Option[ClientLastName],
|
||
|
|
firstName: Option[ClientFirstName],
|
||
|
|
birthDate: Option[ClientBirthDate],
|
||
|
|
drivingLicenseDate: Option[ClientDrivingLicenseDate],
|
||
|
|
phoneNumber: Option[PhoneNumberInput],
|
||
|
|
email: Option[Email],
|
||
|
|
address: Option[Address])
|