Skip to content

Instantly share code, notes, and snippets.

@venblee
Created June 19, 2013 09:51
Show Gist options
  • Save venblee/5813122 to your computer and use it in GitHub Desktop.
Save venblee/5813122 to your computer and use it in GitHub Desktop.
Code First
public class REQ
{
[Key]
public int Id { get; set; }
[DisplayName("REQ Number:"), Required]
public string REQNumber { get; set; }
[DisplayName("Date:"), Required]
public DateTime? DateCreated { get; set; }
[DisplayName("Required Date:"), Required]
public DateTime? DateExpected { get; set; }
[DisplayName("Sub Total")]
public decimal? SubTotal { get; set; }
[DisplayName("Tax")]
public decimal? Tax { get; set; }
[DisplayName("Tax Rate")]
public decimal? TaxRate { get; set; }
[DisplayName("Total")]
public decimal? Total { get; set; }
[DisplayName("Notes:")]
public string Notes { get; set; }
[ForeignKey("REQStatus"), DisplayName("Status")]
public int? StatusId { get; set; }
public virtual PurchaseStatus REQStatus { get; set; }
[DisplayName("Date Modified")]
public DateTime? DateModified { get; set; }
[DisplayName("Date Completed")]
public DateTime? DateComplete { get; set; }
[ForeignKey("RequestedEmployee"), DisplayName("Request Modify")]
public int? RequestedEmpId { get; set; }
public virtual Employee RequestedEmployee { get; set; }
[ForeignKey("ModifyEmployee"), DisplayName("Employee Modify")]
public int? ModifiedEmpId { get; set; }
public virtual Employee ModifyEmployee { get; set; }
[DisplayName("Approval Date:")]
public DateTime? DateApproved { get; set; }
[ForeignKey("ApproverEmployee"), DisplayName("Finacial")]
public int? FinacialApproverEmpId { get; set; }
public virtual Employee ApproverEmployee { get; set; }
// Use this for One to Many Relationships
public List<REQDetail> PurchaseRequestDetails { get; set; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment