- Прайс-лист: поиск + грид на рабочем /api/supplier-prices/summary (наименование, форма, производитель, поставщик, цена) - Накладные: реестр приходных документов (из buyer/report) - Справочник: профиль покупателя + грузополучатели (buyer/locations) - Core: GetPriceSummaryAsync, GetBuyerLocationsAsync + DTO - README: статус разделов + примечание про buyer/orders 500 (фикс застейджен) Рабочие: Прайс-лист, Заказы, Накладные, Отчёты, Справочник. Осталось: Отправить (корзина+DBF), Отказы (нужен эндпоинт), автообновление. Собирается; рантайм новых 3 разделов не проверен (клиент за игрой — окна не поднимал). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
83 lines
3.3 KiB
C#
83 lines
3.3 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace Elfisa.Core;
|
|
|
|
public sealed class LoginRequest
|
|
{
|
|
[JsonPropertyName("username")] public string Username { get; set; } = "";
|
|
[JsonPropertyName("password")] public string Password { get; set; } = "";
|
|
}
|
|
|
|
public sealed class LoginResponse
|
|
{
|
|
[JsonPropertyName("token")] public string? Token { get; set; }
|
|
[JsonPropertyName("role")] public string? Role { get; set; }
|
|
[JsonPropertyName("redirect_url")] public string? RedirectUrl { get; set; }
|
|
}
|
|
|
|
public sealed class BuyerReportResponse
|
|
{
|
|
[JsonPropertyName("lines")] public List<BuyerReportLineDto>? Lines { get; set; }
|
|
}
|
|
|
|
public sealed class BuyerReportLineDto
|
|
{
|
|
[JsonPropertyName("order_id")] public string? OrderId { get; set; }
|
|
[JsonPropertyName("global_sign")] public string? GlobalSign { get; set; }
|
|
[JsonPropertyName("order_date")] public DateTime? OrderDate { get; set; }
|
|
[JsonPropertyName("status")] public string? Status { get; set; }
|
|
[JsonPropertyName("supplier")] public string? Supplier { get; set; }
|
|
[JsonPropertyName("location")] public string? Location { get; set; }
|
|
[JsonPropertyName("item_name")] public string? ItemName { get; set; }
|
|
[JsonPropertyName("item_code")] public string? ItemCode { get; set; }
|
|
[JsonPropertyName("qty")] public decimal Qty { get; set; }
|
|
[JsonPropertyName("unit_price")] public decimal UnitPrice { get; set; }
|
|
[JsonPropertyName("sum")] public decimal Sum { get; set; }
|
|
}
|
|
|
|
public sealed class AiReportRequest
|
|
{
|
|
[JsonPropertyName("prompt")] public string Prompt { get; set; } = "";
|
|
[JsonPropertyName("token")] public string Token { get; set; } = "";
|
|
[JsonPropertyName("format")] public string Format { get; set; } = "docx";
|
|
}
|
|
|
|
public sealed class AiReportResult
|
|
{
|
|
public byte[] Content { get; set; } = Array.Empty<byte>();
|
|
public string FileName { get; set; } = "report.docx";
|
|
}
|
|
|
|
public sealed class ErrorResponse
|
|
{
|
|
[JsonPropertyName("error")] public string? Error { get; set; }
|
|
}
|
|
|
|
public sealed class PriceSummaryResponse
|
|
{
|
|
[JsonPropertyName("summary")] public List<PriceItem>? Summary { get; set; }
|
|
[JsonPropertyName("total_drugs")] public int TotalDrugs { get; set; }
|
|
}
|
|
|
|
public sealed class PriceItem
|
|
{
|
|
[JsonPropertyName("supplier_price_id")] public string? SupplierPriceId { get; set; }
|
|
[JsonPropertyName("supplier_name")] public string? SupplierName { get; set; }
|
|
[JsonPropertyName("drug_name")] public string? DrugName { get; set; }
|
|
[JsonPropertyName("cure_form")] public string? CureForm { get; set; }
|
|
[JsonPropertyName("barcode")] public string? Barcode { get; set; }
|
|
[JsonPropertyName("price")] public decimal Price { get; set; }
|
|
[JsonPropertyName("quantity")] public decimal Quantity { get; set; }
|
|
[JsonPropertyName("manufacturer")] public string? Manufacturer { get; set; }
|
|
[JsonPropertyName("trade_name")] public string? TradeName { get; set; }
|
|
[JsonPropertyName("es_code")] public long EsCode { get; set; }
|
|
}
|
|
|
|
public sealed class BuyerLocationDto
|
|
{
|
|
[JsonPropertyName("buyer_location_id")] public string? BuyerLocationId { get; set; }
|
|
[JsonPropertyName("address")] public string? Address { get; set; }
|
|
[JsonPropertyName("region_name")] public string? RegionName { get; set; }
|
|
[JsonPropertyName("is_default")] public bool IsDefault { get; set; }
|
|
}
|