Entities: Use 'required' and '= null!' to get rid of warnings
This commit is contained in:
@ -9,7 +9,7 @@ namespace Elwig.Models.Entities {
|
||||
public int MgNr { get; set; }
|
||||
|
||||
[Column("date")]
|
||||
public string DateString { get; set; }
|
||||
public required string DateString { get; set; }
|
||||
[NotMapped]
|
||||
public DateOnly Date {
|
||||
get => DateOnly.ParseExact(DateString, "yyyy-MM-dd");
|
||||
@ -20,12 +20,12 @@ namespace Elwig.Models.Entities {
|
||||
public int BusinessShares { get; set; }
|
||||
|
||||
[Column("type")]
|
||||
public string Type { get; set; }
|
||||
public required string Type { get; set; }
|
||||
|
||||
[Column("comment")]
|
||||
public string? Comment { get; set; }
|
||||
|
||||
[ForeignKey("MgNr")]
|
||||
public virtual Member Member { get; private set; }
|
||||
public virtual Member Member { get; private set; } = null!;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user