Initial commit
This commit is contained in:
@@ -0,0 +1,206 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PowderCoating.Application.DTOs.Vendor;
|
||||
|
||||
// ============================================================================
|
||||
// LIST DTO - For Index page listing
|
||||
// ============================================================================
|
||||
public class VendorListDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string CompanyName { get; set; } = string.Empty;
|
||||
public string? ContactName { get; set; }
|
||||
public string? Phone { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public bool IsPreferred { get; set; }
|
||||
public int InventoryItemCount { get; set; }
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// FULL VENDOR DTO - For Details page
|
||||
// ============================================================================
|
||||
public class VendorDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string CompanyName { get; set; } = string.Empty;
|
||||
public string? ContactName { get; set; }
|
||||
public string? Phone { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? Website { get; set; }
|
||||
public string? Address { get; set; }
|
||||
public string? City { get; set; }
|
||||
public string? State { get; set; }
|
||||
public string? ZipCode { get; set; }
|
||||
public string? Country { get; set; }
|
||||
public string? AccountNumber { get; set; }
|
||||
public string? TaxId { get; set; }
|
||||
public string? PaymentTerms { get; set; }
|
||||
public decimal? CreditLimit { get; set; }
|
||||
public string? Notes { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public bool IsPreferred { get; set; }
|
||||
public int? DefaultExpenseAccountId { get; set; }
|
||||
public string? DefaultExpenseAccountName { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// CREATE VENDOR DTO - For creating new vendors
|
||||
// ============================================================================
|
||||
public class CreateVendorDto
|
||||
{
|
||||
[Required]
|
||||
[Display(Name = "Vendor Name")]
|
||||
[StringLength(200)]
|
||||
public string CompanyName { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Contact Name")]
|
||||
[StringLength(100)]
|
||||
public string? ContactName { get; set; }
|
||||
|
||||
[Display(Name = "Phone")]
|
||||
[Phone]
|
||||
[StringLength(20)]
|
||||
public string? Phone { get; set; }
|
||||
|
||||
[Display(Name = "Email")]
|
||||
[EmailAddress]
|
||||
[StringLength(100)]
|
||||
public string? Email { get; set; }
|
||||
|
||||
[Display(Name = "Website")]
|
||||
[Url]
|
||||
[StringLength(200)]
|
||||
public string? Website { get; set; }
|
||||
|
||||
[Display(Name = "Address")]
|
||||
[StringLength(200)]
|
||||
public string? Address { get; set; }
|
||||
|
||||
[Display(Name = "City")]
|
||||
[StringLength(100)]
|
||||
public string? City { get; set; }
|
||||
|
||||
[Display(Name = "State")]
|
||||
[StringLength(2)]
|
||||
public string? State { get; set; }
|
||||
|
||||
[Display(Name = "Zip Code")]
|
||||
[StringLength(10)]
|
||||
public string? ZipCode { get; set; }
|
||||
|
||||
[Display(Name = "Country")]
|
||||
[StringLength(50)]
|
||||
public string? Country { get; set; }
|
||||
|
||||
[Display(Name = "Account Number")]
|
||||
[StringLength(50)]
|
||||
public string? AccountNumber { get; set; }
|
||||
|
||||
[Display(Name = "Tax ID / EIN")]
|
||||
[StringLength(50)]
|
||||
public string? TaxId { get; set; }
|
||||
|
||||
[Display(Name = "Payment Terms")]
|
||||
[StringLength(100)]
|
||||
public string? PaymentTerms { get; set; }
|
||||
|
||||
[Display(Name = "Credit Limit")]
|
||||
[Range(0, 10000000)]
|
||||
public decimal? CreditLimit { get; set; }
|
||||
|
||||
[Display(Name = "Notes")]
|
||||
[DataType(DataType.MultilineText)]
|
||||
public string? Notes { get; set; }
|
||||
|
||||
[Display(Name = "Active")]
|
||||
public bool IsActive { get; set; } = true;
|
||||
|
||||
[Display(Name = "Preferred Vendor")]
|
||||
public bool IsPreferred { get; set; } = false;
|
||||
|
||||
[Display(Name = "Default Expense Account")]
|
||||
public int? DefaultExpenseAccountId { get; set; }
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// UPDATE VENDOR DTO - For editing existing vendors
|
||||
// ============================================================================
|
||||
public class UpdateVendorDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[Display(Name = "Vendor Name")]
|
||||
[StringLength(200)]
|
||||
public string CompanyName { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Contact Name")]
|
||||
[StringLength(100)]
|
||||
public string? ContactName { get; set; }
|
||||
|
||||
[Display(Name = "Phone")]
|
||||
[Phone]
|
||||
[StringLength(20)]
|
||||
public string? Phone { get; set; }
|
||||
|
||||
[Display(Name = "Email")]
|
||||
[EmailAddress]
|
||||
[StringLength(100)]
|
||||
public string? Email { get; set; }
|
||||
|
||||
[Display(Name = "Website")]
|
||||
[Url]
|
||||
[StringLength(200)]
|
||||
public string? Website { get; set; }
|
||||
|
||||
[Display(Name = "Address")]
|
||||
[StringLength(200)]
|
||||
public string? Address { get; set; }
|
||||
|
||||
[Display(Name = "City")]
|
||||
[StringLength(100)]
|
||||
public string? City { get; set; }
|
||||
|
||||
[Display(Name = "State")]
|
||||
[StringLength(2)]
|
||||
public string? State { get; set; }
|
||||
|
||||
[Display(Name = "Zip Code")]
|
||||
[StringLength(10)]
|
||||
public string? ZipCode { get; set; }
|
||||
|
||||
[Display(Name = "Country")]
|
||||
[StringLength(50)]
|
||||
public string? Country { get; set; }
|
||||
|
||||
[Display(Name = "Account Number")]
|
||||
[StringLength(50)]
|
||||
public string? AccountNumber { get; set; }
|
||||
|
||||
[Display(Name = "Tax ID / EIN")]
|
||||
[StringLength(50)]
|
||||
public string? TaxId { get; set; }
|
||||
|
||||
[Display(Name = "Payment Terms")]
|
||||
[StringLength(100)]
|
||||
public string? PaymentTerms { get; set; }
|
||||
|
||||
[Display(Name = "Credit Limit")]
|
||||
[Range(0, 10000000)]
|
||||
public decimal? CreditLimit { get; set; }
|
||||
|
||||
[Display(Name = "Notes")]
|
||||
[DataType(DataType.MultilineText)]
|
||||
public string? Notes { get; set; }
|
||||
|
||||
[Display(Name = "Active")]
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
[Display(Name = "Preferred Vendor")]
|
||||
public bool IsPreferred { get; set; }
|
||||
|
||||
[Display(Name = "Default Expense Account")]
|
||||
public int? DefaultExpenseAccountId { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user