Add commands engine
This commit is contained in:
parent
1919e4b72c
commit
91584c18d5
9 changed files with 336 additions and 58 deletions
|
|
@ -4,7 +4,9 @@ package clients
|
|||
import zio.schema.*
|
||||
|
||||
import java.time.LocalDate
|
||||
import zio.schema.annotation.discriminatorName
|
||||
|
||||
@discriminatorName("eventType")
|
||||
enum ClientEvent derives Schema:
|
||||
case Created(
|
||||
lastName: ClientLastName,
|
||||
|
|
@ -22,3 +24,9 @@ enum ClientEvent derives Schema:
|
|||
phoneNumber: Option[PhoneNumberInput],
|
||||
email: Option[Email],
|
||||
address: Option[Address])
|
||||
case Disabled(reason: ClientDisabledReason)
|
||||
|
||||
object ClientEvent:
|
||||
given Schema[ClientEvent.Created] = DeriveSchema.gen
|
||||
given Schema[ClientEvent.Updated] = DeriveSchema.gen
|
||||
given Schema[ClientEvent.Disabled] = DeriveSchema.gen
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue