dotnet-dynamic-query/PoweredSoft.DynamicQuery.Test/Mock/Entities.cs

48 lines
1.3 KiB
C#
Raw Normal View History

2018-10-22 22:05:23 -04:00
using System;
using System.Collections.Generic;
2018-10-22 21:21:14 -04:00
namespace PoweredSoft.DynamicQuery.Test.Mock
{
public class Order
{
public long Id { get; set; }
public long OrderNum { get; set; }
2018-10-22 22:05:23 -04:00
public DateTime Date { get; set; }
2018-10-22 21:21:14 -04:00
public long CustomerId { get; set; }
public virtual Customer Customer { get; set; }
public ICollection<OrderItem> OrderItems { get; set; } = new HashSet<OrderItem>();
}
public class Customer
{
public long Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public ICollection<Order> Orders { get; set; } = new HashSet<Order>();
}
public class Item
{
public long Id { get; set; }
public string Name { get; set; }
public decimal Price { get; set; }
public virtual ICollection<OrderItem> OrderItems { get; set; } = new HashSet<OrderItem>();
}
public class OrderItem
{
public long Id { get; set; }
public long Quantity { get; set; }
public decimal PriceAtTheTime { get; set; }
public long ItemId { get; set; }
2018-10-22 22:05:23 -04:00
public long OrderId { get; set; }
2018-10-22 21:21:14 -04:00
public virtual Item Item { get; set; }
public virtual Order Order { get; set; }
}
}