refactor(EnvelopeDocument): rename as Document

This commit is contained in:
2025-09-09 18:56:55 +02:00
parent fbbc05814f
commit ae669d05e7
23 changed files with 51 additions and 51 deletions

View File

@@ -14,14 +14,14 @@ public class DocumentExecutor : SQLExecutor, IDocumentExecutor
{
}
public async Task<EnvelopeDocument> CreateDocumentAsync(string base64, string envelope_uuid, CancellationToken cancellation = default)
public async Task<Document> CreateDocumentAsync(string base64, string envelope_uuid, CancellationToken cancellation = default)
{
using var connection = new SqlConnection(Params.ConnectionString);
var sql = Provider.GetRequiredService<DocumentCreateReadSQL>();
var formattedSql = string.Format(sql.Raw, envelope_uuid.ToSqlParam());
var param = DocumentCreateReadSQL.CreateParmas(base64);
await connection.OpenAsync(cancellation);
var documents = await connection.QueryAsync<EnvelopeDocument>(formattedSql, param);
var documents = await connection.QueryAsync<Document>(formattedSql, param);
return documents.FirstOrDefault()
?? throw new InvalidOperationException($"Document creation failed. Parameters:" +
$"base64={base64}, envelope_uuid='{envelope_uuid}'.");