Update DeliveryAdminWindow
This commit is contained in:
@ -1,10 +1,13 @@
|
||||
using Elwig.Helpers;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Configuration;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
|
||||
namespace Elwig.Models {
|
||||
[Table("wine_quality_level"), PrimaryKey("QualId")]
|
||||
public class WineQualLevel {
|
||||
public class WineQualLevel : IEquatable<WineQualLevel> {
|
||||
[Column("qualid")]
|
||||
public string QualId { get; private set; }
|
||||
|
||||
@ -24,5 +27,21 @@ namespace Elwig.Models {
|
||||
public string Name { get; private set; }
|
||||
|
||||
public string MinKmwStr => (MinKmw == null) ? "" : $"(mind. {MinKmw:#.0}°)";
|
||||
|
||||
public override bool Equals(object? obj) {
|
||||
return Equals(obj as WineQualLevel);
|
||||
}
|
||||
|
||||
public bool Equals(WineQualLevel? obj) {
|
||||
return QualId == obj?.QualId;
|
||||
}
|
||||
|
||||
public static bool operator ==(WineQualLevel? q1, WineQualLevel? q2) {
|
||||
return q1?.Equals(q2) ?? Equals(q1, q2);
|
||||
}
|
||||
|
||||
public static bool operator !=(WineQualLevel? q1, WineQualLevel? q2) {
|
||||
return !(q1?.Equals(q2) ?? Equals(q1, q2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user