- Currency.IsActive удалён полностью (domain/DTO/API/web/миграция). Валюты — глобальный справочник; «архивировать» USD глобально бессмысленно, а per-tenant видимости у валют нет. - MinorUnit остаётся в БД (нужен для форматирования цен), но скрыт из UI: убран CurrencyDto.MinorUnit, CurrencyInput.MinorUnit, колонка «Знаки» из списка. - Форма валюты — 3 поля: Код / Название / Символ. - Миграция Phase5e_DropCurrencyIsActive дропает колонку. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
87 lines
4.2 KiB
C#
87 lines
4.2 KiB
C#
using foodmarket.Domain.Catalog;
|
|
|
|
namespace foodmarket.Application.Catalog;
|
|
|
|
public record CountryDto(
|
|
Guid Id, string Code, string Name,
|
|
Guid? DefaultCurrencyId, string? DefaultCurrencyCode, string? DefaultCurrencySymbol,
|
|
decimal VatRate);
|
|
|
|
|
|
public record CurrencyDto(Guid Id, string Code, string Name, string Symbol);
|
|
|
|
public record UnitOfMeasureDto(
|
|
Guid Id, string Code, string Name, string? Description, bool IsActive);
|
|
|
|
public record PriceTypeDto(
|
|
Guid Id, string Name, bool IsDefault, bool IsRetail, int SortOrder, bool IsActive);
|
|
|
|
public record StoreDto(
|
|
Guid Id, string Name, string? Code, string? Address, string? Phone,
|
|
string? ManagerName, bool IsMain, bool IsActive);
|
|
|
|
public record RetailPointDto(
|
|
Guid Id, string Name, string? Code, Guid StoreId, string? StoreName,
|
|
string? Address, string? Phone, string? FiscalSerial, string? FiscalRegNumber, bool IsActive);
|
|
|
|
public record ProductGroupDto(
|
|
Guid Id, string Name, Guid? ParentId, string Path, int SortOrder, bool IsActive);
|
|
|
|
public record CounterpartyDto(
|
|
Guid Id, string Name, string? LegalName, CounterpartyType Type,
|
|
string? Bin, string? Iin, string? TaxNumber, Guid? CountryId, string? CountryName,
|
|
string? Address, string? Phone, string? Email,
|
|
string? BankName, string? BankAccount, string? Bik, string? ContactPerson, string? Notes, bool IsActive);
|
|
|
|
public record ProductBarcodeDto(Guid Id, string Code, BarcodeType Type, bool IsPrimary);
|
|
|
|
public record ProductPriceDto(Guid Id, Guid PriceTypeId, string PriceTypeName, decimal Amount, Guid CurrencyId, string CurrencyCode);
|
|
|
|
public record ProductDto(
|
|
Guid Id, string Name, string? Article, string? Description,
|
|
Guid UnitOfMeasureId, string UnitName,
|
|
decimal Vat, bool VatEnabled,
|
|
Guid? ProductGroupId, string? ProductGroupName,
|
|
Guid? DefaultSupplierId, string? DefaultSupplierName,
|
|
Guid? CountryOfOriginId, string? CountryOfOriginName,
|
|
bool IsService, Packaging Packaging, bool IsMarked,
|
|
decimal? MinStock, decimal? MaxStock,
|
|
decimal? PurchasePrice, Guid? PurchaseCurrencyId, string? PurchaseCurrencyCode,
|
|
string? ImageUrl, bool IsActive,
|
|
IReadOnlyList<ProductPriceDto> Prices,
|
|
IReadOnlyList<ProductBarcodeDto> Barcodes);
|
|
|
|
// Upsert payloads (input)
|
|
public record CountryInput(
|
|
string Code, string Name,
|
|
Guid? DefaultCurrencyId = null, decimal VatRate = 0m);
|
|
public record CurrencyInput(string Code, string Name, string Symbol);
|
|
public record UnitOfMeasureInput(string Code, string Name, string? Description = null, bool IsActive = true);
|
|
public record PriceTypeInput(string Name, bool IsDefault = false, bool IsRetail = false, int SortOrder = 0, bool IsActive = true);
|
|
public record StoreInput(
|
|
string Name, string? Code,
|
|
string? Address = null, string? Phone = null, string? ManagerName = null,
|
|
bool IsMain = false, bool IsActive = true);
|
|
public record RetailPointInput(
|
|
string Name, string? Code, Guid StoreId,
|
|
string? Address = null, string? Phone = null,
|
|
string? FiscalSerial = null, string? FiscalRegNumber = null, bool IsActive = true);
|
|
public record ProductGroupInput(string Name, Guid? ParentId, int SortOrder = 0, bool IsActive = true);
|
|
public record CounterpartyInput(
|
|
string Name, string? LegalName, CounterpartyType Type,
|
|
string? Bin, string? Iin, string? TaxNumber, Guid? CountryId,
|
|
string? Address, string? Phone, string? Email,
|
|
string? BankName, string? BankAccount, string? Bik, string? ContactPerson, string? Notes, bool IsActive = true);
|
|
public record ProductBarcodeInput(string Code, BarcodeType Type = BarcodeType.Ean13, bool IsPrimary = false);
|
|
public record ProductPriceInput(Guid PriceTypeId, decimal Amount, Guid CurrencyId);
|
|
public record ProductInput(
|
|
string Name, string? Article, string? Description,
|
|
Guid UnitOfMeasureId, decimal? Vat, bool VatEnabled,
|
|
Guid? ProductGroupId, Guid? DefaultSupplierId, Guid? CountryOfOriginId,
|
|
bool IsService = false, Packaging Packaging = Packaging.Piece, bool IsMarked = false,
|
|
decimal? MinStock = null, decimal? MaxStock = null,
|
|
decimal? PurchasePrice = null, Guid? PurchaseCurrencyId = null,
|
|
string? ImageUrl = null, bool IsActive = true,
|
|
IReadOnlyList<ProductPriceInput>? Prices = null,
|
|
IReadOnlyList<ProductBarcodeInput>? Barcodes = null);
|