// A photo or file column's value: the attachment's ref, and a file's name.// What a column stores it as is the app's (`CottonUI/Editors/ColumnValues.swift`).importFoundation/// A photo or file column's value: a stored reference, and for a file the/// name it arrived with.publicstructAttachmentValue: Equatable, Sendable {publicvar ref: Stringpublicvar name: String?publicinit(ref: String, name: String?) {self.ref = refself.name = name }publicstaticfunc read(_ value: RecordValue) -> AttachmentValue? {switch value {case .text(let ref) where !ref.isEmpty:returnAttachmentValue(ref: ref, name: nil)case .object(let fields):guardcase .text(let ref)? = fields["ref"], !ref.isEmpty else { returnnil }ifcase .text(let name)? = fields["name"] { returnAttachmentValue(ref: ref, name: name) }returnAttachmentValue(ref: ref, name: nil)default:returnnil } }}