Order.cs 918 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using Shouldly;
  3. namespace PetaPoco.Tests.Integration.Documentation.Pocos
  4. {
  5. [ExplicitColumns]
  6. [TableName("Orders")]
  7. [PrimaryKey("Id")]
  8. public class Order
  9. {
  10. [Column]
  11. public int Id { get; set; }
  12. [Column]
  13. public Guid PersonId { get; set; }
  14. [Column]
  15. public string PoNumber { get; set; }
  16. [Column]
  17. public DateTime CreatedOn { get; set; }
  18. [Column]
  19. public string CreatedBy { get; set; }
  20. [Column("OrderStatus")]
  21. public OrderStatus Status { get; set; }
  22. public void ShouldBe(Order other)
  23. {
  24. Id.ShouldBe(other.Id);
  25. PersonId.ShouldBe(other.PersonId);
  26. PoNumber.ShouldBe(other.PoNumber);
  27. Status.ShouldBe(other.Status);
  28. CreatedOn.ShouldBe(other.CreatedOn);
  29. CreatedBy.ShouldBe(other.CreatedBy);
  30. }
  31. }
  32. }