entc: support schema/blob annotation

This commit is contained in:
Giau. Tran Minh
2026-05-03 18:00:38 +00:00
parent 665007afec
commit 7a21ec2e29
37 changed files with 1611 additions and 417 deletions

View File

@@ -660,6 +660,13 @@ func (b *bytesBuilder) Optional() *bytesBuilder {
return b
}
// Blob indicates that this field stores its data in external blob storage
// rather than in the database. Blob fields have no SQL column.
func (b *bytesBuilder) Blob() *bytesBuilder {
b.desc.Blob = true
return b
}
// Sensitive fields not printable and not serializable.
func (b *bytesBuilder) Sensitive() *bytesBuilder {
b.desc.Sensitive = true
@@ -1439,6 +1446,7 @@ type Descriptor struct {
Comment string // field comment.
Deprecated bool // mark the field as deprecated.
DeprecatedReason string // deprecation reason.
Blob bool // field is stored in external blob storage.
Err error
}