59 lines
1.4 KiB
C#
59 lines
1.4 KiB
C#
using System.Text.Json;
|
|
|
|
namespace ScrapperAPI.Dtos;
|
|
|
|
public sealed class CreateExtractionModelDto
|
|
{
|
|
public string Name { get; init; } = null!;
|
|
public int Version { get; init; }
|
|
public string? Description { get; init; }
|
|
public JsonDocument Definition { get; init; } = null!;
|
|
|
|
public CreateExtractionModelDto()
|
|
{
|
|
|
|
}
|
|
|
|
public CreateExtractionModelDto(string name, int version, string? description, JsonDocument definition)
|
|
{
|
|
Name = name;
|
|
Version = version;
|
|
Description = description;
|
|
Definition = definition;
|
|
}
|
|
}
|
|
|
|
public sealed class ExtractionModelRow
|
|
{
|
|
public long Id { get; init; }
|
|
public string Name { get; init; } = null!;
|
|
public int Version { get; init; }
|
|
public string? Description { get; init; }
|
|
public JsonDocument Definition { get; init; } = null!;
|
|
public DateTimeOffset CreatedAt { get; init; }
|
|
public DateTimeOffset UpdatedAt { get; init; }
|
|
|
|
public ExtractionModelRow()
|
|
{
|
|
|
|
}
|
|
|
|
public ExtractionModelRow(
|
|
long id,
|
|
string name,
|
|
int version,
|
|
string? description,
|
|
JsonDocument definition,
|
|
DateTimeOffset createdAt,
|
|
DateTimeOffset updatedAt)
|
|
{
|
|
Id = id;
|
|
Name = name;
|
|
Version = version;
|
|
Description = description;
|
|
Definition = definition;
|
|
CreatedAt = createdAt;
|
|
UpdatedAt = updatedAt;
|
|
}
|
|
}
|