| | | 1 | | using Snacks.Domain.Abstractions; |
| | | 2 | | |
| | | 3 | | namespace Snacks.Domain.Models; |
| | | 4 | | |
| | | 5 | | public class Order : IOrder |
| | | 6 | | { |
| | 98 | 7 | | public int Id { get; set; } = 0; |
| | 82 | 8 | | public string? Identifikation { get; set; } = null; |
| | 82 | 9 | | public int OrderAddressId { get; set; } = 0; |
| | 86 | 10 | | public int OrderStateId { get; set; } = 0; |
| | 84 | 11 | | public int RestaurantId { get; set; } = 0; |
| | 96 | 12 | | public Order() { } |
| | 4 | 13 | | public Order (int id, string identifikation, int orderAddressId, int orderStateId, int restaurantId) |
| | 4 | 14 | | { |
| | 4 | 15 | | Id = id; |
| | 4 | 16 | | Identifikation = identifikation; |
| | 4 | 17 | | OrderAddressId = orderAddressId; |
| | 4 | 18 | | OrderStateId = orderStateId; |
| | 4 | 19 | | RestaurantId = restaurantId; |
| | 4 | 20 | | } |
| | | 21 | | public override string ToString() |
| | 2 | 22 | | { |
| | 2 | 23 | | return $"Id: {Id}, Identifikation: {Identifikation}, OrderAdressId: {OrderAddressId}, OrderStateId: {OrderStateI |
| | 2 | 24 | | } |
| | | 25 | | public int CompareTo(IOrder? other) |
| | 0 | 26 | | { |
| | 0 | 27 | | if (other == null) return 1; |
| | 0 | 28 | | return this.Id.CompareTo(other.Id); |
| | 0 | 29 | | } |
| | | 30 | | } |