finnow/finnow-api/source/attachment/data.d

15 lines
509 B
D

module attachment.data;
import handy_http_primitives : Optional;
import attachment.model;
import std.datetime;
interface AttachmentRepository {
Optional!Attachment findById(ulong id);
Attachment[] findAllByLinkedEntity(string subquery, ulong entityId);
Attachment[] findAllByTransactionId(ulong transactionId);
Attachment[] findAllByValueRecordId(ulong valueRecordId);
ulong save(SysTime uploadedAt, string filename, string contentType, in ubyte[] content);
void remove(ulong id);
}