namespace Admin.NET.Plugin.AiDOP.Dto.SmartOps; public sealed class KpiTargetCreateDto { public string MetricCode { get; set; } = string.Empty; public long FactoryId { get; set; } public decimal TargetValue { get; set; } public DateTime EffectiveFrom { get; set; } public DateTime? EffectiveTo { get; set; } public bool ClosePrevious { get; set; } public string? Remark { get; set; } } public sealed class KpiTargetUpdateDto { public decimal? TargetValue { get; set; } public DateTime? EffectiveTo { get; set; } public string? Remark { get; set; } } public sealed class KpiTargetQueryDto { public string MetricCode { get; set; } = string.Empty; public long? FactoryId { get; set; } } public sealed class KpiTargetResolveResult { public string MetricCode { get; set; } = string.Empty; public long FactoryId { get; set; } public string BizDate { get; set; } = string.Empty; public decimal? TargetValue { get; set; } public long? TargetConfigId { get; set; } public string TargetSource { get; set; } = "MISSING"; public string? ConfigSourceType { get; set; } public string? EffectiveFrom { get; set; } public string? EffectiveTo { get; set; } public DateTime ResolvedAt { get; set; } } public sealed class KpiTargetDto { public long Id { get; set; } public long FactoryId { get; set; } public string MetricCode { get; set; } = string.Empty; public decimal TargetValue { get; set; } public string EffectiveFrom { get; set; } = string.Empty; public string? EffectiveTo { get; set; } public string SourceType { get; set; } = string.Empty; public string? SourceBatchId { get; set; } public int Status { get; set; } public string? Remark { get; set; } public DateTime CreateTime { get; set; } public DateTime UpdateTime { get; set; } } public sealed class KpiTargetImportPreviewDto { public long BatchId { get; set; } public string BatchNo { get; set; } = string.Empty; public string Status { get; set; } = string.Empty; public int TotalRows { get; set; } public int ValidRows { get; set; } public int ErrorRows { get; set; } public List Errors { get; set; } = new(); } public sealed class KpiTargetImportCommitDto { public long BatchId { get; set; } } public sealed class KpiTargetImportErrorDto { public int RowNo { get; set; } public string? MetricCode { get; set; } public string Code { get; set; } = string.Empty; public string Message { get; set; } = string.Empty; } public sealed class KpiTargetImportRow { public int RowNo { get; set; } public string MetricCode { get; set; } = string.Empty; public long FactoryId { get; set; } public decimal TargetValue { get; set; } public DateTime EffectiveFrom { get; set; } public DateTime? EffectiveTo { get; set; } public string? Remark { get; set; } } public sealed class KpiTargetLegacyStatDto { public string TargetSource { get; set; } = string.Empty; public int Count { get; set; } }