Describe the boundary and the model.
Compose field schemas for the wire shape, then map the validated result into User. Built-in codecs such as Ack.datetime() keep rich values inside your application.
final boundary = Ack.object({
'createdAt': Ack.datetime(),
});
final userCodec = boundary.codec<User>(
decode: User.fromMap,
encode: (user) => user.toMap(),
);