Refactor DTOs: make public, add properties, clean up
Refactored DTO classes by removing unnecessary using statements and internal wrappers, making them public, and adding explicit properties with default values. Clarified namespaces and improved accessibility for use in API contracts or service layers. Added CatalogUpdateProcedure to CatalogWriteDto to specify update operation type.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
namespace DbFirst.Contracts.Catalogs;
|
||||
|
||||
namespace DbFirst.Contracts.Catalogs
|
||||
public class CatalogReadDto
|
||||
{
|
||||
internal class CatalogReadDto
|
||||
{
|
||||
}
|
||||
public int Guid { get; set; }
|
||||
public string CatTitle { get; set; } = string.Empty;
|
||||
public string CatString { get; set; } = string.Empty;
|
||||
public string AddedWho { get; set; } = string.Empty;
|
||||
public DateTime AddedWhen { get; set; }
|
||||
public string? ChangedWho { get; set; }
|
||||
public DateTime? ChangedWhen { get; set; }
|
||||
}
|
||||
@@ -1,12 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using DbFirst.Domain;
|
||||
|
||||
namespace DbFirst.Contracts.Catalogs
|
||||
namespace DbFirst.Contracts.Catalogs;
|
||||
|
||||
public class CatalogWriteDto
|
||||
{
|
||||
internal class CatalogWriteDto
|
||||
{
|
||||
}
|
||||
public string CatTitle { get; set; } = string.Empty;
|
||||
public string CatString { get; set; } = string.Empty;
|
||||
public CatalogUpdateProcedure UpdateProcedure { get; set; } = CatalogUpdateProcedure.Update;
|
||||
}
|
||||
@@ -1,12 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
namespace DbFirst.Contracts.Dashboards;
|
||||
|
||||
namespace DbFirst.Contracts.Dashboards
|
||||
public class DashboardInfoDto
|
||||
{
|
||||
internal class DashboardInfoDto
|
||||
{
|
||||
}
|
||||
public string Id { get; set; } = string.Empty;
|
||||
public string Name { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -1,12 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
namespace DbFirst.Contracts.Layouts;
|
||||
|
||||
namespace DbFirst.Contracts.Layouts
|
||||
public class LayoutDto
|
||||
{
|
||||
internal class LayoutDto
|
||||
{
|
||||
}
|
||||
public string LayoutType { get; set; } = string.Empty;
|
||||
public string LayoutKey { get; set; } = string.Empty;
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string LayoutData { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
namespace DbFirst.Contracts.MassData;
|
||||
|
||||
namespace DbFirst.Contracts.MassData
|
||||
public class MassDataReadDto
|
||||
{
|
||||
internal class MassDataReadDto
|
||||
{
|
||||
}
|
||||
public int Id { get; set; }
|
||||
public string CustomerName { get; set; } = string.Empty;
|
||||
public decimal Amount { get; set; }
|
||||
public string Category { get; set; } = string.Empty;
|
||||
public bool StatusFlag { get; set; }
|
||||
public DateTime AddedWhen { get; set; }
|
||||
public DateTime? ChangedWhen { get; set; }
|
||||
}
|
||||
@@ -1,12 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
namespace DbFirst.Contracts.MassData;
|
||||
|
||||
namespace DbFirst.Contracts.MassData
|
||||
public class MassDataWriteDto
|
||||
{
|
||||
internal class MassDataWriteDto
|
||||
{
|
||||
}
|
||||
public string CustomerName { get; set; } = string.Empty;
|
||||
public decimal Amount { get; set; }
|
||||
public string Category { get; set; } = string.Empty;
|
||||
public bool StatusFlag { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user