Add project files.
This commit is contained in:
35
Models/Orders.cs
Normal file
35
Models/Orders.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace LogisticsApp.Server.Models
|
||||
{
|
||||
public class Order
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(200)]
|
||||
public string ClientName { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[Column(TypeName = "decimal(18,2)")]
|
||||
public decimal OrderCost { get; set; }
|
||||
|
||||
[Required]
|
||||
public DateTime OrderDate { get; set; } = DateTime.UtcNow;
|
||||
|
||||
[Required]
|
||||
[StringLength(20)]
|
||||
public string Status { get; set; } = "pending"; // pending, in_progress, completed, cancelled
|
||||
|
||||
[Required]
|
||||
[StringLength(500)]
|
||||
public string Address { get; set; } = string.Empty;
|
||||
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
public DateTime? UpdatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user