Feature: Added SortOrder to Inventory.
Chore: Settle Choices form greatly simplified. Feature: Modifiers are now cached.
This commit is contained in:
@ -16,6 +16,7 @@ namespace Tanshu.Accounts.Entities
|
||||
|
||||
public virtual Guid InventoryID { get; set; }
|
||||
public virtual Kot Kot { get; set; }
|
||||
public virtual int SortOrder { get; set; }
|
||||
public virtual Product Product { get; set; }
|
||||
public virtual decimal Quantity { get; set; }
|
||||
public virtual decimal Price { get; set; }
|
||||
@ -49,6 +50,7 @@ namespace Tanshu.Accounts.Entities
|
||||
Schema("dbo");
|
||||
Lazy(true);
|
||||
Id(x => x.InventoryID, m => m.Generator(Generators.GuidComb));
|
||||
Property(x => x.SortOrder, map => map.NotNullable(true));
|
||||
Property(x => x.Quantity, map => map.NotNullable(true));
|
||||
Property(x => x.Price, map => map.NotNullable(true));
|
||||
Property(x => x.FullPrice, map => map.NotNullable(true));
|
||||
|
||||
@ -69,7 +69,12 @@ namespace Tanshu.Accounts.Entities
|
||||
map.Cascade(Cascade.None);
|
||||
});
|
||||
|
||||
Bag(x => x.Inventories, colmap => { colmap.Key(x => x.Column("KotID")); colmap.Inverse(true); }, map => { map.OneToMany(); });
|
||||
Bag(x => x.Inventories, colmap =>
|
||||
{
|
||||
colmap.Key(x => x.Column("KotID"));
|
||||
colmap.Inverse(true);
|
||||
colmap.OrderBy(x => x.SortOrder);
|
||||
}, map => { map.OneToMany(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user