CONTROLLERS.
This commit is contained in:
@@ -5,11 +5,19 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace GrossesMitainesAPI.Models;
|
||||
public class InvoiceModel {
|
||||
public enum InStates {
|
||||
Confirmed,
|
||||
Cancelled,
|
||||
Preparing,
|
||||
Shipping,
|
||||
Shipped,
|
||||
Returned
|
||||
}
|
||||
public class ProductInvoice {
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
public ProductModel Product { get; set; }
|
||||
public int Quantity { get; set; }
|
||||
public uint Quantity { get; set; }
|
||||
}
|
||||
|
||||
[Key]
|
||||
@@ -23,14 +31,11 @@ public class InvoiceModel {
|
||||
[Required, EmailAddress]
|
||||
public string EmailAddress { get; set; }
|
||||
public InventoryUser? LinkedAccount { get; set; }
|
||||
public DateTime PurchaseDate { get; } = DateTime.Now;
|
||||
public DateTime PurchaseDate { get; set; } = DateTime.Now;
|
||||
[Required]
|
||||
public List<ProductInvoice> Products { get; set; }
|
||||
|
||||
//[Required, Column("BillingAddress")]
|
||||
//public AddressModel BillingAddress { get; set; }
|
||||
[Required]
|
||||
public AddressModel ShippingAddress { get; set; }
|
||||
public bool Canceled { get; set; } = false;
|
||||
public InStates Status { get; set; } = InStates.Confirmed;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user