refactor: move default configuration to sqlite
This commit is contained in:
parent
1bdf40f31f
commit
4c93ed282d
@ -2,13 +2,13 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||||
|
|
||||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||||
|
|
||||||
public class CampusConfiguration : IEntityTypeConfiguration<Campus>
|
public sealed class CampusConfiguration : IEntityTypeConfiguration<Campus>
|
||||||
{
|
{
|
||||||
public void Configure(EntityTypeBuilder<Campus> builder)
|
public void Configure(EntityTypeBuilder<Campus> builder)
|
||||||
{
|
{
|
||||||
builder.ToTable(nameof(Campus));
|
builder.ToTable("MyCampusName");
|
||||||
builder.HasKey(c => c.Id);
|
builder.HasKey(c => c.Id);
|
||||||
builder.HasIndex(c => c.Id).IsUnique();
|
builder.HasIndex(c => c.Id).IsUnique();
|
||||||
builder.Property(c => c.Id).HasColumnType("INTEGER").IsRequired().ValueGeneratedOnAdd();
|
builder.Property(c => c.Id).HasColumnType("INTEGER").IsRequired().ValueGeneratedOnAdd();
|
@ -2,7 +2,7 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||||
|
|
||||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||||
|
|
||||||
public class DisciplineConfiguration : IEntityTypeConfiguration<Discipline>
|
public class DisciplineConfiguration : IEntityTypeConfiguration<Discipline>
|
||||||
{
|
{
|
@ -2,7 +2,7 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||||
|
|
||||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||||
|
|
||||||
public class FacultyConfiguration : IEntityTypeConfiguration<Faculty>
|
public class FacultyConfiguration : IEntityTypeConfiguration<Faculty>
|
||||||
{
|
{
|
@ -2,7 +2,7 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||||
|
|
||||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||||
|
|
||||||
public class GroupConfiguration : IEntityTypeConfiguration<Group>
|
public class GroupConfiguration : IEntityTypeConfiguration<Group>
|
||||||
{
|
{
|
@ -2,7 +2,7 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||||
|
|
||||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||||
|
|
||||||
public class LectureHallConfiguration : IEntityTypeConfiguration<LectureHall>
|
public class LectureHallConfiguration : IEntityTypeConfiguration<LectureHall>
|
||||||
{
|
{
|
@ -2,7 +2,7 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||||
|
|
||||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||||
|
|
||||||
public class LessonAssociationConfiguration : IEntityTypeConfiguration<LessonAssociation>
|
public class LessonAssociationConfiguration : IEntityTypeConfiguration<LessonAssociation>
|
||||||
{
|
{
|
@ -2,7 +2,7 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||||
|
|
||||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||||
|
|
||||||
public class LessonConfiguration : IEntityTypeConfiguration<Lesson>
|
public class LessonConfiguration : IEntityTypeConfiguration<Lesson>
|
||||||
{
|
{
|
@ -2,7 +2,7 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||||
|
|
||||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||||
|
|
||||||
public class ProfessorConfiguration : IEntityTypeConfiguration<Professor>
|
public class ProfessorConfiguration : IEntityTypeConfiguration<Professor>
|
||||||
{
|
{
|
@ -2,7 +2,7 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||||
|
|
||||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||||
|
|
||||||
public class SpecificWeekConfiguration : IEntityTypeConfiguration<SpecificWeek>
|
public class SpecificWeekConfiguration : IEntityTypeConfiguration<SpecificWeek>
|
||||||
{
|
{
|
@ -2,7 +2,7 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||||
|
|
||||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||||
|
|
||||||
public class TypeOfOccupationConfiguration : IEntityTypeConfiguration<TypeOfOccupation>
|
public class TypeOfOccupationConfiguration : IEntityTypeConfiguration<TypeOfOccupation>
|
||||||
{
|
{
|
Loading…
Reference in New Issue
Block a user