Entities: Use 'required' and '= null!' to get rid of warnings

This commit is contained in:
2024-02-29 15:48:09 +01:00
parent 53a25b3be4
commit f922388db9
40 changed files with 142 additions and 155 deletions

View File

@ -6,10 +6,10 @@ namespace Elwig.Models.Entities {
[Table("wine_attribute"), PrimaryKey("AttrId"), Index("Name", IsUnique = true)]
public class WineAttr {
[Column("attrid")]
public string AttrId { get; set; }
public required string AttrId { get; set; }
[Column("name")]
public string Name { get; set; }
public required string Name { get; set; }
[Column("active")]
public bool IsActive { get; set; }
@ -23,13 +23,6 @@ namespace Elwig.Models.Entities {
[Column("fill_lower")]
public int FillLower { get; set; }
public WineAttr() { }
public WineAttr(string attrId, string name) {
AttrId = attrId;
Name = name;
}
public override string ToString() {
return Name;
}