A schema field definition for a date type.
Date fields are stored as ISO 8601 strings in DynamoDB and exposed as JavaScript Date objects on entities, mirroring @DateAttribute behavior.
Date
@DateAttribute
const schema = { createdDate: { type: "date" }, deletedAt: { type: "date", nullable: true }} as const satisfies ObjectSchema; Copy
const schema = { createdDate: { type: "date" }, deletedAt: { type: "date", nullable: true }} as const satisfies ObjectSchema;
Optional
When true, the field becomes optional (Date | undefined).
true
Date | undefined
Must be "date" to indicate a date field.
"date"
A schema field definition for a date type.
Date fields are stored as ISO 8601 strings in DynamoDB and exposed as JavaScript
Dateobjects on entities, mirroring@DateAttributebehavior.Example