This repository has been archived on 2023-10-28. You can view files and clone it, but cannot push or open issues or pull requests.
pwt-0x01-ng/Models/Order.cs
surtur 13b0ffffeb
All checks were successful
continuous-integration/drone/push Build is passing
refactor: use fully qualified class name in FK ref
as per #11
2021-02-12 11:32:58 +01:00

22 lines
553 B
C#

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using pwt_0x01_ng.Models.Identity;
namespace pwt_0x01_ng.Models
{
[Table(nameof(Order))]
public class Order : Entity
{
[Required]
public string Order_Number { get; set; }
public IList<OrderItem> OrderItems { get; set; }
[ForeignKey(nameof(Identity.User))]
[Required]
public int User_id { get; set; }
[NotMapped]
public User usr { get; set; }
[Required]
public decimal Price_total { get; set; }
}
}