Entities: Use 'required' and '= null!' to get rid of warnings
This commit is contained in:
		| @@ -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; | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user