module attachment.data; import handy_httpd.components.optional; import attachment.model; import std.datetime; interface AttachmentRepository { Optional!Attachment findById(ulong id); Attachment[] findAllByLinkedEntity(string subquery, ulong entityId); ulong save(SysTime uploadedAt, string filename, string contentType, ubyte[] content); void remove(ulong id); }