- 仓储实体与 db.sql 统一为小写 c_ 前缀,新增 migrate_rename_warehouse_C_to_c.sql - 专线小包批量模板精简版/标准版双模板,Excel 必填标红与发件地址上传参数 Co-authored-by: Cursor <cursoragent@cursor.com>
115 lines
2.9 KiB
C#
115 lines
2.9 KiB
C#
using Microsoft.AspNetCore.Http;
|
|
using Oms.Application.Services.Orders.Templates;
|
|
|
|
namespace Oms.Application.Dtos.Orders;
|
|
|
|
public class OrderTemplateFieldSchemaOutput
|
|
{
|
|
public string TemplateKey { get; set; } = string.Empty;
|
|
|
|
public string TemplateName { get; set; } = string.Empty;
|
|
|
|
public List<OrderTemplateFieldSchemaItemOutput> Fields { get; set; } = [];
|
|
}
|
|
|
|
public class OrderTemplateFieldSchemaItemOutput
|
|
{
|
|
public string FieldKey { get; set; } = string.Empty;
|
|
|
|
public string Label { get; set; } = string.Empty;
|
|
|
|
public bool Required { get; set; }
|
|
|
|
public string DataType { get; set; } = "string";
|
|
|
|
public string? DictType { get; set; }
|
|
|
|
public string Group { get; set; } = string.Empty;
|
|
|
|
public string Example { get; set; } = string.Empty;
|
|
|
|
public string Hint { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class OrderTemplateDictOptionsOutput
|
|
{
|
|
public List<OrderTemplateDictOptionOutput> Items { get; set; } = [];
|
|
}
|
|
|
|
public class OrderTemplateDictOptionOutput
|
|
{
|
|
public string DictType { get; set; } = string.Empty;
|
|
|
|
public string Code { get; set; } = string.Empty;
|
|
|
|
public string Label { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class OrderTemplateCustomUploadInput
|
|
{
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
public IFormFile File { get; set; } = null!;
|
|
}
|
|
|
|
public class OrderTemplateCustomUploadOutput
|
|
{
|
|
public int TemplateId { get; set; }
|
|
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
public string MappingStatus { get; set; } = OrderTemplateMappingStatus.Draft;
|
|
|
|
public List<string> SourceHeaders { get; set; } = [];
|
|
}
|
|
|
|
public class OrderTemplateCustomDetailOutput
|
|
{
|
|
public int Id { get; set; }
|
|
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
public string Type { get; set; } = string.Empty;
|
|
|
|
public string? StandardTemplateKey { get; set; }
|
|
|
|
public string MappingStatus { get; set; } = OrderTemplateMappingStatus.Draft;
|
|
|
|
public string? SourceFileName { get; set; }
|
|
|
|
public List<string> SourceHeaders { get; set; } = [];
|
|
|
|
public OrderTemplateColumnMappingDocument? Mapping { get; set; }
|
|
|
|
public List<OrderTemplateFieldSchemaItemOutput> StandardFields { get; set; } = [];
|
|
}
|
|
|
|
public class OrderTemplateSaveMappingInput
|
|
{
|
|
public int TemplateId { get; set; }
|
|
|
|
public string? StandardTemplateKey { get; set; }
|
|
|
|
public int HeaderRowIndex { get; set; } = 1;
|
|
|
|
public int DataStartRowIndex { get; set; } = 2;
|
|
|
|
public List<OrderTemplateSaveMappingItemInput> Mappings { get; set; } = [];
|
|
}
|
|
|
|
public class OrderTemplateSaveMappingItemInput
|
|
{
|
|
public string StandardFieldKey { get; set; } = string.Empty;
|
|
|
|
public string SourceColumn { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class OrderTemplateSaveMappingOutput
|
|
{
|
|
public int TemplateId { get; set; }
|
|
|
|
public string MappingStatus { get; set; } = OrderTemplateMappingStatus.Ready;
|
|
|
|
public List<string> MissingRequiredFields { get; set; } = [];
|
|
}
|