Add commands engine
This commit is contained in:
parent
1919e4b72c
commit
91584c18d5
9 changed files with 336 additions and 58 deletions
|
|
@ -9,6 +9,7 @@ enum ClientCommand derives Schema:
|
|||
case Create(
|
||||
lastName: ClientLastName,
|
||||
firstName: ClientFirstName,
|
||||
birthDate: ClientBirthDate,
|
||||
drivingLicenseDate: Option[ClientDrivingLicenseDate],
|
||||
phoneNumber: Option[PhoneNumberInput],
|
||||
email: Option[Email],
|
||||
|
|
@ -16,8 +17,14 @@ enum ClientCommand derives Schema:
|
|||
case Update(
|
||||
lastName: Option[ClientLastName],
|
||||
firstName: Option[ClientFirstName],
|
||||
birthDate: Option[ClientBirthDate],
|
||||
drivingLicenseDate: Option[ClientDrivingLicenseDate],
|
||||
phoneNumber: Option[PhoneNumberInput],
|
||||
email: Option[Email],
|
||||
address: Option[Address])
|
||||
case Disable(reason: ClientDisabledReason)
|
||||
|
||||
object ClientCommand:
|
||||
given Schema[ClientCommand.Create] = DeriveSchema.gen
|
||||
given Schema[ClientCommand.Update] = DeriveSchema.gen
|
||||
given Schema[ClientCommand.Disable] = DeriveSchema.gen
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue