24 lines
647 B
Scala
24 lines
647 B
Scala
|
|
package lu.foyer
|
||
|
|
package clients
|
||
|
|
|
||
|
|
import zio.schema.*
|
||
|
|
|
||
|
|
import java.time.LocalDate
|
||
|
|
|
||
|
|
enum ClientCommand derives Schema:
|
||
|
|
case Create(
|
||
|
|
lastName: ClientLastName,
|
||
|
|
firstName: ClientFirstName,
|
||
|
|
drivingLicenseDate: Option[ClientDrivingLicenseDate],
|
||
|
|
phoneNumber: Option[PhoneNumberInput],
|
||
|
|
email: Option[Email],
|
||
|
|
address: Option[Address])
|
||
|
|
case Update(
|
||
|
|
lastName: Option[ClientLastName],
|
||
|
|
firstName: Option[ClientFirstName],
|
||
|
|
drivingLicenseDate: Option[ClientDrivingLicenseDate],
|
||
|
|
phoneNumber: Option[PhoneNumberInput],
|
||
|
|
email: Option[Email],
|
||
|
|
address: Option[Address])
|
||
|
|
case Disable(reason: ClientDisabledReason)
|