mirror of
https://github.com/BZmHackTeam/BezpiecznaZywnosc
synced 2024-12-22 14:46:58 +01:00
DataContext²
This commit is contained in:
parent
fc10a2dd30
commit
f6f6c17555
2 changed files with 3 additions and 1 deletions
|
@ -15,6 +15,6 @@ public class DataContext : DbContext
|
|||
{
|
||||
base.OnModelCreating(mb);
|
||||
|
||||
|
||||
mb.Entity<IncidentSubmission>().HasIndex(s => new { s.SubmitterAddress, s.Producer });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,8 @@ public class IncidentSubmission
|
|||
public required string Name { get; set; }
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public DateTime Submitted { get; set; }
|
||||
[EmailAddress]
|
||||
public string? SubmitterAddress { get; set; }
|
||||
public required string ProductName { get; set; }
|
||||
public required string Producer { get; set; }
|
||||
public required string Description { get; set; }
|
||||
|
|
Loading…
Reference in a new issue