Created Order, Refund, Shipping
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
namespace LiteCharms.Features.MidrandBooks.Orders.Entities;
|
||||
|
||||
public class OrderConfiguration : IEntityTypeConfiguration<Order>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<Order> builder)
|
||||
{
|
||||
builder.ToTable("Orders");
|
||||
|
||||
builder.HasKey(o => o.Id);
|
||||
builder.Property(o => o.CustomerId).IsRequired();
|
||||
builder.Property(o => o.CreatedAt).IsRequired().ValueGeneratedOnAdd().HasDefaultValueSql("now()");
|
||||
builder.Property(o => o.UpdatedAt).HasDefaultValueSql("now()");
|
||||
builder.Property(o => o.Status).IsRequired();
|
||||
builder.Property(o => o.Total).IsRequired().HasColumnType("decimal(18,2)");
|
||||
builder.Property(o => o.Notes).HasMaxLength(1000);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user