0
0
RhSolutions-Api/RhSolutions.Api/Models/Product.cs

34 lines
892 B
C#
Raw Normal View History

2022-12-14 09:53:10 +03:00
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Diagnostics;
using System.Text.Json.Serialization;
namespace RhSolutions.Api.Models
{
public partial class Product : IDisposable
{
[Key]
[JsonIgnore]
public int Id { get; set; }
public string ProductSku { get; set; } = string.Empty;
public List<string> DeprecatedSkus { get; set; } = new();
public string Name { get; set; } = string.Empty;
public string ProductLine { get; set; } = string.Empty;
public bool? IsOnWarehouse { get; set; }
public Measure ProductMeasure { get; set; }
public double? DeliveryMakeUp { get; set; }
[Column(TypeName = "decimal(8,2)")]
public decimal Price { get; set; }
public void Dispose()
{
Debug.WriteLine($"{this} disposed");
}
public override string ToString()
{
return $"({ProductSku}) {Name}";
}
}
}