-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for multiple establishment sources
- Loading branch information
Showing
13 changed files
with
2,404 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...m/src/TeachingRecordSystem.Core/DataStore/Postgres/Mappings/EstablishmentSourceMapping.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Microsoft.EntityFrameworkCore.Metadata.Builders; | ||
using TeachingRecordSystem.Core.DataStore.Postgres.Models; | ||
|
||
namespace TeachingRecordSystem.Core.DataStore.Postgres.Mappings; | ||
|
||
public class EstablishmentSourceMapping : IEntityTypeConfiguration<EstablishmentSource> | ||
{ | ||
public void Configure(EntityTypeBuilder<EstablishmentSource> builder) | ||
{ | ||
builder.ToTable("establishment_sources"); | ||
builder.HasKey(e => e.EstablishmentSourceId); | ||
builder.Property(e => e.Name).HasMaxLength(50).UseCollation("case_insensitive").IsRequired(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.