INIT GITEA

This commit is contained in:
2026-09-12 18:19:29 +02:00
parent b2faeb2986
commit 02ba8d4fe5
405 changed files with 125279 additions and 125267 deletions
+191 -191
View File
@@ -1,191 +1,191 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using System;
using WorkFlowCheck.Common.RequestContext;
using WorkFlowCheck.Common.Security;
using WorkFlowCheck.DL.Configurations;
using WorkFlowCheck.DL.Entities;
using WorkFlowCheck.DL.Extensions;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL
{
public class AppDbContext : DbContext
{
private readonly IRequestContext _requestContext;
public AppDbContext(DbContextOptions<AppDbContext> options, IRequestContext requestContext)
: base(options)
{
_requestContext = requestContext;
}
#region Entities DbSet
public DbSet<Entities.CheckListHeader> CheckListHeaders { get; set; } = null!;
public DbSet<Entities.CheckListRow> CheckListRows { get; set; } = null!;
public DbSet<Entities.CheckListTemplateHeader> CheckListTemplateHeaders { get; set; } = null!;
public DbSet<Entities.CheckListTemplateRow> CheckListTemplateRows { get; set; } = null!;
public DbSet<Entities.CheckPoint> CheckPoints { get; set; } = null!;
public DbSet<DeviceMessage> DeviceMessages { get; set; } = null!;
public DbSet<Entities.Equipment> Equipments { get; set; } = null!;
public DbSet<Entities.FCMToken> FCMTokens { get; set; } = null!;
public DbSet<Entities.Location> Locations { get; set; } = null!;
public DbSet<Entities.NumberGeneratorTemplate> NumberGeneratorTemplates { get; set; } = null!;
public DbSet<Entities.NumberGeneratorTemplateDate> NumberGeneratorTemplateDates { get; set; } = null!;
public DbSet<Entities.Role> Roles { get; set; } = null!;
public DbSet<Entities.User> Users { get; set; } = null!;
public DbSet<Entities.UserRole> UserRoles { get; set; } = null!;
public DbSet<Entities.RoleCheckListTemplateHeader> RoleCheckListTemplateHeaders { get; set; } = null!;
public DbSet<Entities.RoleCheckPoint> RoleCheckPoints { get; set; } = null!;
#endregion
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfiguration(new CheckListHeaderTypeConfiguration());
modelBuilder.ApplyConfiguration(new CheckListRowTypeConfiguration());
modelBuilder.ApplyConfiguration(new CheckListTemplateHeaderTypeConfiguration());
modelBuilder.ApplyConfiguration(new CheckListTemplateRowTypeConfiguration());
modelBuilder.ApplyConfiguration(new CheckPointTypeConfiguration());
modelBuilder.ApplyConfiguration(new DeviceMessageTypeConfiguration());
modelBuilder.ApplyConfiguration(new EquipmentTypeConfiguration());
modelBuilder.ApplyConfiguration(new FCMTokenTypeConfiguration());
modelBuilder.ApplyConfiguration(new LocationTypeConfiguration());
modelBuilder.ApplyConfiguration(new NumberGeneratorTypeConfiguration());
modelBuilder.ApplyConfiguration(new NumberGeneratorDateTypeConfiguration());
modelBuilder.ApplyConfiguration(new RoleTypeConfiguration());
modelBuilder.ApplyConfiguration(new RoleCheckListTemplateHeaderTypeConfiguration());
modelBuilder.ApplyConfiguration(new RoleCheckPointTypeConfiguration());
modelBuilder.ApplyConfiguration(new UserTypeConfiguration());
modelBuilder.ApplyConfiguration(new UserRoleTypeConfiguration());
modelBuilder.RegisterSoftDeleteQueryFilters();
SeedInit(modelBuilder);
}
public override async Task<int> SaveChangesAsync(CancellationToken cancellationToken = default)
{
SaveChangesCore();
return await base.SaveChangesAsync(cancellationToken);
}
protected virtual void SaveChangesCore()
{
var utcNow = DateTime.UtcNow;
var deletedEntries = ChangeTracker
.Entries()
.Where(e => e.Entity is ISoftDeletableEntity && e.State == EntityState.Deleted);
UpdateDeletedEntries(deletedEntries);
var modifiedEntries = ChangeTracker
.Entries()
.Where(e => e.Entity is IAuditableEntity && e.State == EntityState.Modified);
UpdateModifiedEntires(modifiedEntries, utcNow);
var addedEntries = ChangeTracker
.Entries()
.Where(e => e.Entity is IAuditableEntity && e.State == EntityState.Added);
UpdateAddedEntries(addedEntries, utcNow);
}
private void UpdateAddedEntries(IEnumerable<EntityEntry> addedEntries, DateTime utcNow)
{
foreach (var entry in addedEntries)
{
((IAuditableEntity)entry.Entity).CreatedAt = utcNow;
((IAuditableEntity)entry.Entity).LastModAt = utcNow;
((IAuditableEntity)entry.Entity).CreatedBy = _requestContext.CurrentUsername ?? "Admin";
((IAuditableEntity)entry.Entity).LastModBy = _requestContext.CurrentUsername ?? "Admin";
}
}
private void UpdateModifiedEntires(IEnumerable<EntityEntry> modifiedEntries, DateTime utcNow)
{
foreach (var entry in modifiedEntries)
{
((IAuditableEntity)entry.Entity).LastModAt = utcNow;
((IAuditableEntity)entry.Entity).LastModBy = _requestContext.CurrentUsername ?? "Admin";
}
}
private void UpdateDeletedEntries(IEnumerable<EntityEntry> deletedEntries)
{
foreach (var entry in deletedEntries)
{
((ISoftDeletableEntity)entry.Entity).IsDeleted = true;
entry.State = EntityState.Modified;
}
}
private void SeedInit(ModelBuilder modelBuilder)
{
modelBuilder.Entity<User>().HasData(
new User
{
Id = 1,
Email = "admin@nuvolar.hu",
FirstName = "Administrator",
LastName = "System",
IsDeleted = false,
UserName = "admin",
PasswordHash = PasswordHasher.HashPassword("111111"),
CreatedAt = DateTime.UtcNow,
CreatedBy = "System",
LastModAt = DateTime.UtcNow,
LastModBy = "System",
JwtToken = "",
Active = true,
Token2FA = "",
NFCActive = true,
NFCCode = "00000000"
},
new User
{
Id = 2,
Email = "user@nuvolar.hu",
FirstName = "User",
LastName = "System",
IsDeleted = false,
UserName = "user",
PasswordHash = PasswordHasher.HashPassword("222222"),
CreatedAt = DateTime.UtcNow,
CreatedBy = "System",
LastModAt = DateTime.UtcNow,
LastModBy = "System",
JwtToken = "",
Active = true,
Token2FA = "",
NFCActive = true,
NFCCode = "00000000"
}
);
modelBuilder.Entity<NumberGeneratorTemplate>().HasData(
new NumberGeneratorTemplate
{
Id = 1,
CurrentNumber = 0,
DigitFormat = "D4",
GenerateType = GenerateType.OnlyYear,
LastGeneratedNumber = "",
Prefix = "CHK",
PrefixSeparator = "-",
ShortName = "Ellenőrzési dokumentum sorszámozása",
Suffix = "",
SuffixSeparator = "-",
}
);
modelBuilder.Entity<NumberGeneratorTemplateDate>().HasData(
new NumberGeneratorTemplateDate
{
Id = 1,
CurrentNumber = 0,
LastGeneratedNumber = "",
Month = 0,
Year = 1,
NumberGeneratorTemplateId = 1,
}
);
}
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using System;
using WorkFlowCheck.Common.RequestContext;
using WorkFlowCheck.Common.Security;
using WorkFlowCheck.DL.Configurations;
using WorkFlowCheck.DL.Entities;
using WorkFlowCheck.DL.Extensions;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL
{
public class AppDbContext : DbContext
{
private readonly IRequestContext _requestContext;
public AppDbContext(DbContextOptions<AppDbContext> options, IRequestContext requestContext)
: base(options)
{
_requestContext = requestContext;
}
#region Entities DbSet
public DbSet<Entities.CheckListHeader> CheckListHeaders { get; set; } = null!;
public DbSet<Entities.CheckListRow> CheckListRows { get; set; } = null!;
public DbSet<Entities.CheckListTemplateHeader> CheckListTemplateHeaders { get; set; } = null!;
public DbSet<Entities.CheckListTemplateRow> CheckListTemplateRows { get; set; } = null!;
public DbSet<Entities.CheckPoint> CheckPoints { get; set; } = null!;
public DbSet<DeviceMessage> DeviceMessages { get; set; } = null!;
public DbSet<Entities.Equipment> Equipments { get; set; } = null!;
public DbSet<Entities.FCMToken> FCMTokens { get; set; } = null!;
public DbSet<Entities.Location> Locations { get; set; } = null!;
public DbSet<Entities.NumberGeneratorTemplate> NumberGeneratorTemplates { get; set; } = null!;
public DbSet<Entities.NumberGeneratorTemplateDate> NumberGeneratorTemplateDates { get; set; } = null!;
public DbSet<Entities.Role> Roles { get; set; } = null!;
public DbSet<Entities.User> Users { get; set; } = null!;
public DbSet<Entities.UserRole> UserRoles { get; set; } = null!;
public DbSet<Entities.RoleCheckListTemplateHeader> RoleCheckListTemplateHeaders { get; set; } = null!;
public DbSet<Entities.RoleCheckPoint> RoleCheckPoints { get; set; } = null!;
#endregion
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfiguration(new CheckListHeaderTypeConfiguration());
modelBuilder.ApplyConfiguration(new CheckListRowTypeConfiguration());
modelBuilder.ApplyConfiguration(new CheckListTemplateHeaderTypeConfiguration());
modelBuilder.ApplyConfiguration(new CheckListTemplateRowTypeConfiguration());
modelBuilder.ApplyConfiguration(new CheckPointTypeConfiguration());
modelBuilder.ApplyConfiguration(new DeviceMessageTypeConfiguration());
modelBuilder.ApplyConfiguration(new EquipmentTypeConfiguration());
modelBuilder.ApplyConfiguration(new FCMTokenTypeConfiguration());
modelBuilder.ApplyConfiguration(new LocationTypeConfiguration());
modelBuilder.ApplyConfiguration(new NumberGeneratorTypeConfiguration());
modelBuilder.ApplyConfiguration(new NumberGeneratorDateTypeConfiguration());
modelBuilder.ApplyConfiguration(new RoleTypeConfiguration());
modelBuilder.ApplyConfiguration(new RoleCheckListTemplateHeaderTypeConfiguration());
modelBuilder.ApplyConfiguration(new RoleCheckPointTypeConfiguration());
modelBuilder.ApplyConfiguration(new UserTypeConfiguration());
modelBuilder.ApplyConfiguration(new UserRoleTypeConfiguration());
modelBuilder.RegisterSoftDeleteQueryFilters();
SeedInit(modelBuilder);
}
public override async Task<int> SaveChangesAsync(CancellationToken cancellationToken = default)
{
SaveChangesCore();
return await base.SaveChangesAsync(cancellationToken);
}
protected virtual void SaveChangesCore()
{
var utcNow = DateTime.UtcNow;
var deletedEntries = ChangeTracker
.Entries()
.Where(e => e.Entity is ISoftDeletableEntity && e.State == EntityState.Deleted);
UpdateDeletedEntries(deletedEntries);
var modifiedEntries = ChangeTracker
.Entries()
.Where(e => e.Entity is IAuditableEntity && e.State == EntityState.Modified);
UpdateModifiedEntires(modifiedEntries, utcNow);
var addedEntries = ChangeTracker
.Entries()
.Where(e => e.Entity is IAuditableEntity && e.State == EntityState.Added);
UpdateAddedEntries(addedEntries, utcNow);
}
private void UpdateAddedEntries(IEnumerable<EntityEntry> addedEntries, DateTime utcNow)
{
foreach (var entry in addedEntries)
{
((IAuditableEntity)entry.Entity).CreatedAt = utcNow;
((IAuditableEntity)entry.Entity).LastModAt = utcNow;
((IAuditableEntity)entry.Entity).CreatedBy = _requestContext.CurrentUsername ?? "Admin";
((IAuditableEntity)entry.Entity).LastModBy = _requestContext.CurrentUsername ?? "Admin";
}
}
private void UpdateModifiedEntires(IEnumerable<EntityEntry> modifiedEntries, DateTime utcNow)
{
foreach (var entry in modifiedEntries)
{
((IAuditableEntity)entry.Entity).LastModAt = utcNow;
((IAuditableEntity)entry.Entity).LastModBy = _requestContext.CurrentUsername ?? "Admin";
}
}
private void UpdateDeletedEntries(IEnumerable<EntityEntry> deletedEntries)
{
foreach (var entry in deletedEntries)
{
((ISoftDeletableEntity)entry.Entity).IsDeleted = true;
entry.State = EntityState.Modified;
}
}
private void SeedInit(ModelBuilder modelBuilder)
{
modelBuilder.Entity<User>().HasData(
new User
{
Id = 1,
Email = "admin@nuvolar.hu",
FirstName = "Administrator",
LastName = "System",
IsDeleted = false,
UserName = "admin",
PasswordHash = PasswordHasher.HashPassword("111111"),
CreatedAt = DateTime.UtcNow,
CreatedBy = "System",
LastModAt = DateTime.UtcNow,
LastModBy = "System",
JwtToken = "",
Active = true,
Token2FA = "",
NFCActive = true,
NFCCode = "00000000"
},
new User
{
Id = 2,
Email = "user@nuvolar.hu",
FirstName = "User",
LastName = "System",
IsDeleted = false,
UserName = "user",
PasswordHash = PasswordHasher.HashPassword("222222"),
CreatedAt = DateTime.UtcNow,
CreatedBy = "System",
LastModAt = DateTime.UtcNow,
LastModBy = "System",
JwtToken = "",
Active = true,
Token2FA = "",
NFCActive = true,
NFCCode = "00000000"
}
);
modelBuilder.Entity<NumberGeneratorTemplate>().HasData(
new NumberGeneratorTemplate
{
Id = 1,
CurrentNumber = 0,
DigitFormat = "D4",
GenerateType = GenerateType.OnlyYear,
LastGeneratedNumber = "",
Prefix = "CHK",
PrefixSeparator = "-",
ShortName = "Ellenőrzési dokumentum sorszámozása",
Suffix = "",
SuffixSeparator = "-",
}
);
modelBuilder.Entity<NumberGeneratorTemplateDate>().HasData(
new NumberGeneratorTemplateDate
{
Id = 1,
CurrentNumber = 0,
LastGeneratedNumber = "",
Month = 0,
Year = 1,
NumberGeneratorTemplateId = 1,
}
);
}
}
}
@@ -1,27 +1,27 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Entities;
namespace WorkFlowCheck.DL.Configurations
{
public class CheckListHeaderTypeConfiguration : IEntityTypeConfiguration<Entities.CheckListHeader>
{
public void Configure(EntityTypeBuilder<Entities.CheckListHeader> builder)
{
builder.ToTable("CheckListHeader");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
builder
.HasOne(ch => ch.AcceptUser)
.WithMany()
.HasForeignKey(ch => ch.AcceptUserId)
.OnDelete(DeleteBehavior.Restrict); // Elkerüljük a cascade delete-et
}
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Entities;
namespace WorkFlowCheck.DL.Configurations
{
public class CheckListHeaderTypeConfiguration : IEntityTypeConfiguration<Entities.CheckListHeader>
{
public void Configure(EntityTypeBuilder<Entities.CheckListHeader> builder)
{
builder.ToTable("CheckListHeader");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
builder
.HasOne(ch => ch.AcceptUser)
.WithMany()
.HasForeignKey(ch => ch.AcceptUserId)
.OnDelete(DeleteBehavior.Restrict); // Elkerüljük a cascade delete-et
}
}
}
@@ -1,21 +1,21 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class CheckListRowTypeConfiguration : IEntityTypeConfiguration<Entities.CheckListRow>
{
public void Configure(EntityTypeBuilder<Entities.CheckListRow> builder)
{
builder.ToTable("CheckListRow");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class CheckListRowTypeConfiguration : IEntityTypeConfiguration<Entities.CheckListRow>
{
public void Configure(EntityTypeBuilder<Entities.CheckListRow> builder)
{
builder.ToTable("CheckListRow");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
@@ -1,21 +1,21 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class CheckListTemplateHeaderTypeConfiguration : IEntityTypeConfiguration<Entities.CheckListTemplateHeader>
{
public void Configure(EntityTypeBuilder<Entities.CheckListTemplateHeader> builder)
{
builder.ToTable("CheckListTemplateHeader");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class CheckListTemplateHeaderTypeConfiguration : IEntityTypeConfiguration<Entities.CheckListTemplateHeader>
{
public void Configure(EntityTypeBuilder<Entities.CheckListTemplateHeader> builder)
{
builder.ToTable("CheckListTemplateHeader");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
@@ -1,21 +1,21 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class CheckListTemplateRowTypeConfiguration : IEntityTypeConfiguration<Entities.CheckListTemplateRow>
{
public void Configure(EntityTypeBuilder<Entities.CheckListTemplateRow> builder)
{
builder.ToTable("CheckListTemplateRow");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class CheckListTemplateRowTypeConfiguration : IEntityTypeConfiguration<Entities.CheckListTemplateRow>
{
public void Configure(EntityTypeBuilder<Entities.CheckListTemplateRow> builder)
{
builder.ToTable("CheckListTemplateRow");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
@@ -1,21 +1,21 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class CheckPointTypeConfiguration : IEntityTypeConfiguration<Entities.CheckPoint>
{
public void Configure(EntityTypeBuilder<Entities.CheckPoint> builder)
{
builder.ToTable("CheckPoint");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class CheckPointTypeConfiguration : IEntityTypeConfiguration<Entities.CheckPoint>
{
public void Configure(EntityTypeBuilder<Entities.CheckPoint> builder)
{
builder.ToTable("CheckPoint");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
@@ -1,24 +1,24 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class DeviceMessageTypeConfiguration : IEntityTypeConfiguration<Entities.DeviceMessage>
{
public void Configure(EntityTypeBuilder<Entities.DeviceMessage> builder)
{
builder.ToTable("DeviceMessage");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
builder.HasIndex(e => e.DeviceIdTo)
.HasDatabaseName("IX_DeviceMessage_DeviceIdTo");
}
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class DeviceMessageTypeConfiguration : IEntityTypeConfiguration<Entities.DeviceMessage>
{
public void Configure(EntityTypeBuilder<Entities.DeviceMessage> builder)
{
builder.ToTable("DeviceMessage");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
builder.HasIndex(e => e.DeviceIdTo)
.HasDatabaseName("IX_DeviceMessage_DeviceIdTo");
}
}
}
@@ -1,21 +1,21 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class EquipmentTypeConfiguration : IEntityTypeConfiguration<Entities.Equipment>
{
public void Configure(EntityTypeBuilder<Entities.Equipment> builder)
{
builder.ToTable("Equipment");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class EquipmentTypeConfiguration : IEntityTypeConfiguration<Entities.Equipment>
{
public void Configure(EntityTypeBuilder<Entities.Equipment> builder)
{
builder.ToTable("Equipment");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
@@ -1,21 +1,21 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class FCMTokenTypeConfiguration : IEntityTypeConfiguration<Entities.FCMToken>
{
public void Configure(EntityTypeBuilder<Entities.FCMToken> builder)
{
builder.ToTable("FCMToken");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class FCMTokenTypeConfiguration : IEntityTypeConfiguration<Entities.FCMToken>
{
public void Configure(EntityTypeBuilder<Entities.FCMToken> builder)
{
builder.ToTable("FCMToken");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
@@ -1,21 +1,21 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class LocationTypeConfiguration : IEntityTypeConfiguration<Entities.Location>
{
public void Configure(EntityTypeBuilder<Entities.Location> builder)
{
builder.ToTable("Location");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class LocationTypeConfiguration : IEntityTypeConfiguration<Entities.Location>
{
public void Configure(EntityTypeBuilder<Entities.Location> builder)
{
builder.ToTable("Location");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
@@ -1,29 +1,29 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class NumberGeneratorTypeConfiguration : IEntityTypeConfiguration<Entities.NumberGeneratorTemplate>
{
public void Configure(EntityTypeBuilder<Entities.NumberGeneratorTemplate> builder)
{
builder.ToTable("NumberGeneratorTemplate");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
public class NumberGeneratorDateTypeConfiguration : IEntityTypeConfiguration<Entities.NumberGeneratorTemplateDate>
{
public void Configure(EntityTypeBuilder<Entities.NumberGeneratorTemplateDate> builder)
{
builder.ToTable("NumberGeneratorTemplateDate");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class NumberGeneratorTypeConfiguration : IEntityTypeConfiguration<Entities.NumberGeneratorTemplate>
{
public void Configure(EntityTypeBuilder<Entities.NumberGeneratorTemplate> builder)
{
builder.ToTable("NumberGeneratorTemplate");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
public class NumberGeneratorDateTypeConfiguration : IEntityTypeConfiguration<Entities.NumberGeneratorTemplateDate>
{
public void Configure(EntityTypeBuilder<Entities.NumberGeneratorTemplateDate> builder)
{
builder.ToTable("NumberGeneratorTemplateDate");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
@@ -1,21 +1,21 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class RoleCheckListTemplateHeaderTypeConfiguration : IEntityTypeConfiguration<Entities.RoleCheckListTemplateHeader>
{
public void Configure(EntityTypeBuilder<Entities.RoleCheckListTemplateHeader> builder)
{
builder.ToTable("RoleCheckListTemplateHeader");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class RoleCheckListTemplateHeaderTypeConfiguration : IEntityTypeConfiguration<Entities.RoleCheckListTemplateHeader>
{
public void Configure(EntityTypeBuilder<Entities.RoleCheckListTemplateHeader> builder)
{
builder.ToTable("RoleCheckListTemplateHeader");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
@@ -1,20 +1,20 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class RoleCheckPointTypeConfiguration : IEntityTypeConfiguration<Entities.RoleCheckPoint>
{
public void Configure(EntityTypeBuilder<Entities.RoleCheckPoint> builder)
{
builder.ToTable("RoleCheckPoint");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class RoleCheckPointTypeConfiguration : IEntityTypeConfiguration<Entities.RoleCheckPoint>
{
public void Configure(EntityTypeBuilder<Entities.RoleCheckPoint> builder)
{
builder.ToTable("RoleCheckPoint");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
@@ -1,25 +1,25 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class RoleTypeConfiguration : IEntityTypeConfiguration<Entities.Role>
{
public void Configure(EntityTypeBuilder<Entities.Role> builder)
{
builder.ToTable("Roles");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
builder.HasOne(r => r.Parent)
.WithMany(r => r.Children)
.HasForeignKey(r => r.ParentId)
.OnDelete(DeleteBehavior.Restrict);
}
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class RoleTypeConfiguration : IEntityTypeConfiguration<Entities.Role>
{
public void Configure(EntityTypeBuilder<Entities.Role> builder)
{
builder.ToTable("Roles");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
builder.HasOne(r => r.Parent)
.WithMany(r => r.Children)
.HasForeignKey(r => r.ParentId)
.OnDelete(DeleteBehavior.Restrict);
}
}
}
@@ -1,16 +1,16 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace WorkFlowCheck.DL.Configurations
{
public class UserRoleTypeConfiguration : IEntityTypeConfiguration<Entities.UserRole>
{
public void Configure(EntityTypeBuilder<Entities.UserRole> builder)
{
builder.ToTable("UserRoles");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace WorkFlowCheck.DL.Configurations
{
public class UserRoleTypeConfiguration : IEntityTypeConfiguration<Entities.UserRole>
{
public void Configure(EntityTypeBuilder<Entities.UserRole> builder)
{
builder.ToTable("UserRoles");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
@@ -1,21 +1,21 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class UserTypeConfiguration : IEntityTypeConfiguration<Entities.User>
{
public void Configure(EntityTypeBuilder<Entities.User> builder)
{
builder.ToTable("Users");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Configurations
{
public class UserTypeConfiguration : IEntityTypeConfiguration<Entities.User>
{
public void Configure(EntityTypeBuilder<Entities.User> builder)
{
builder.ToTable("Users");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedOnAdd();
}
}
}
@@ -1,36 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.Common.Enums;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class CheckListHeader : IAuditableEntity, ISoftDeletableEntity
{
public int Id { get; set; }
public int CheckListTemplateHeaderId { get; set; }
public virtual CheckListTemplateHeader CheckListTemplateHeader { get; set; }
public CheckStatus CheckStatus { get; set; }
public DateTime DateExecution { get; set; }
public int UserId { get; set; }
public virtual User User { get; set; }
public int? AcceptUserId { get; set; }
public virtual User? AcceptUser { get; set; }
public string ShortName { get; set; } = null!;
public string Description { get; set; } = null!;
public string DocumentNumber { get; set; } = null!;
public Guid GuidNumber { get; set; }
public bool IsStorno { get; set; }
public bool IsEditable { get; set; }
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; } = null!;
public bool IsDeleted { get; set; }
public virtual ICollection<CheckListRow> CheckListRows { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.Common.Enums;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class CheckListHeader : IAuditableEntity, ISoftDeletableEntity
{
public int Id { get; set; }
public int CheckListTemplateHeaderId { get; set; }
public virtual CheckListTemplateHeader CheckListTemplateHeader { get; set; }
public CheckStatus CheckStatus { get; set; }
public DateTime DateExecution { get; set; }
public int UserId { get; set; }
public virtual User User { get; set; }
public int? AcceptUserId { get; set; }
public virtual User? AcceptUser { get; set; }
public string ShortName { get; set; } = null!;
public string Description { get; set; } = null!;
public string DocumentNumber { get; set; } = null!;
public Guid GuidNumber { get; set; }
public bool IsStorno { get; set; }
public bool IsEditable { get; set; }
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; } = null!;
public bool IsDeleted { get; set; }
public virtual ICollection<CheckListRow> CheckListRows { get; set; }
}
}
+26 -26
View File
@@ -1,26 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class CheckListRow : ISoftDeletableEntity, IAuditableEntity
{
public int Id { get; set; }
public int CheckListHeaderId { get; set; }
public virtual CheckListHeader CheckListHeader { get; set; } = null!;
public int CheckListTemplateRowId { get; set; }
public virtual CheckListTemplateRow CheckListTemplateRow { get; set; } = null!;
public string Answer { get; set; } = null!;
public string PhotoFileName { get; set; }=null!;
public Guid GuidNumber { get; set; }
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; } = null!;
public bool IsDeleted { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class CheckListRow : ISoftDeletableEntity, IAuditableEntity
{
public int Id { get; set; }
public int CheckListHeaderId { get; set; }
public virtual CheckListHeader CheckListHeader { get; set; } = null!;
public int CheckListTemplateRowId { get; set; }
public virtual CheckListTemplateRow CheckListTemplateRow { get; set; } = null!;
public string Answer { get; set; } = null!;
public string PhotoFileName { get; set; }=null!;
public Guid GuidNumber { get; set; }
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; } = null!;
public bool IsDeleted { get; set; }
}
}
@@ -1,25 +1,25 @@
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class CheckListTemplateHeader : ISoftDeletableEntity, IAuditableEntity
{
public int Id { get; set; }
public string ShortName { get; set; } = null!;
public string Description { get; set; } = null!;
public bool IsDeleted { get; set; }
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; } = null!;
public int? NumberGenerator1Id { get; set; }
public int? NumberGenerator2Id { get; set; }
public NumberGeneratorTemplate NumberGenerator1 { get; set; }
public NumberGeneratorTemplate NumberGenerator2 { get; set; }
public virtual ICollection<CheckListTemplateRow> CheckListTemplateRows { get; set; } = new List<CheckListTemplateRow>();
}
}
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class CheckListTemplateHeader : ISoftDeletableEntity, IAuditableEntity
{
public int Id { get; set; }
public string ShortName { get; set; } = null!;
public string Description { get; set; } = null!;
public bool IsDeleted { get; set; }
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; } = null!;
public int? NumberGenerator1Id { get; set; }
public int? NumberGenerator2Id { get; set; }
public NumberGeneratorTemplate NumberGenerator1 { get; set; }
public NumberGeneratorTemplate NumberGenerator2 { get; set; }
public virtual ICollection<CheckListTemplateRow> CheckListTemplateRows { get; set; } = new List<CheckListTemplateRow>();
}
}
@@ -1,41 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class CheckListTemplateRow : ISoftDeletableEntity, IAuditableEntity
{
public int Id { get; set; }
public int RowIndex { get; set; }
public int CheckListTemplateHeaderId { get; set; }
public virtual CheckListTemplateHeader CheckListTemplateHeader { get; set; }
public int EquipmentId { get; set; }
public virtual Equipment Equipment { get; set; }
public int CheckPointId { get; set; }
public virtual CheckPoint CheckPoint { get; set; }
public string OperationDescription { get; set; } = null!;
/// <summary>
///
/// I-N (Igen, nem)
/// P (Fénykép készítése)
/// SI-N (Sárga igen,fehér nem)
/// I-SN (Fehér igen, sárga nem)
/// PI-N (Piros igen,fehér nem)
/// I-PN (Fehér igen, piros nem)
///
/// </summary>
public string AnswerType { get; set; } = null!;
public bool IsDeleted { get; set; }
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; } = null!;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class CheckListTemplateRow : ISoftDeletableEntity, IAuditableEntity
{
public int Id { get; set; }
public int RowIndex { get; set; }
public int CheckListTemplateHeaderId { get; set; }
public virtual CheckListTemplateHeader CheckListTemplateHeader { get; set; }
public int EquipmentId { get; set; }
public virtual Equipment Equipment { get; set; }
public int CheckPointId { get; set; }
public virtual CheckPoint CheckPoint { get; set; }
public string OperationDescription { get; set; } = null!;
/// <summary>
///
/// I-N (Igen, nem)
/// P (Fénykép készítése)
/// SI-N (Sárga igen,fehér nem)
/// I-SN (Fehér igen, sárga nem)
/// PI-N (Piros igen,fehér nem)
/// I-PN (Fehér igen, piros nem)
///
/// </summary>
public string AnswerType { get; set; } = null!;
public bool IsDeleted { get; set; }
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; } = null!;
}
}
+27 -27
View File
@@ -1,27 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class CheckPoint : ISoftDeletableEntity, IAuditableEntity
{
public int Id { get; set; }
public string ShortName { get; set; }
public string Code { get; set; }
public bool IsEnabled { get; set; }
public bool IsDeleted { get; set; }
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; } = null!;
public int RoleId { get; set; }
public virtual ICollection<CheckListTemplateRow> CheckListTemplateRows { get; set; } = new List<CheckListTemplateRow>();
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class CheckPoint : ISoftDeletableEntity, IAuditableEntity
{
public int Id { get; set; }
public string ShortName { get; set; }
public string Code { get; set; }
public bool IsEnabled { get; set; }
public bool IsDeleted { get; set; }
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; } = null!;
public int RoleId { get; set; }
public virtual ICollection<CheckListTemplateRow> CheckListTemplateRows { get; set; } = new List<CheckListTemplateRow>();
}
}
+23 -23
View File
@@ -1,23 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Entities
{
public class DeviceMessage
{
public int Id { get; set; }
public DateTime SendDate { get; set; }
public DateTime? ReceiveDate { get; set; }
public string DeviceIdFrom { get; set; } = null!;
public string DeviceIdTo { get; set; } = null!;
public string Message { get; set; } = null!;
public string ExtraDataJSON { get; set; } = null!;
public bool IsReaded { get; set; }
public int? RoleId { get; set; }
public virtual Role? Role { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Entities
{
public class DeviceMessage
{
public int Id { get; set; }
public DateTime SendDate { get; set; }
public DateTime? ReceiveDate { get; set; }
public string DeviceIdFrom { get; set; } = null!;
public string DeviceIdTo { get; set; } = null!;
public string Message { get; set; } = null!;
public string ExtraDataJSON { get; set; } = null!;
public bool IsReaded { get; set; }
public int? RoleId { get; set; }
public virtual Role? Role { get; set; }
}
}
+21 -21
View File
@@ -1,21 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class Equipment :ISoftDeletableEntity,IAuditableEntity
{
public int Id { get; set; }
public string ShortName { get; set; } = null!;
public string EquipmentNumber { get; set; } = null!;
public bool IsDeleted { get ; set ; }
public DateTime LastModAt { get ; set ; }
public string LastModBy { get ; set ; } = null!;
public DateTime CreatedAt { get ; set ; }
public string CreatedBy { get ; set ; } = null!;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class Equipment :ISoftDeletableEntity,IAuditableEntity
{
public int Id { get; set; }
public string ShortName { get; set; } = null!;
public string EquipmentNumber { get; set; } = null!;
public bool IsDeleted { get ; set ; }
public DateTime LastModAt { get ; set ; }
public string LastModBy { get ; set ; } = null!;
public DateTime CreatedAt { get ; set ; }
public string CreatedBy { get ; set ; } = null!;
}
}
+20 -20
View File
@@ -1,20 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class FCMToken:ISoftDeletableEntity, IAuditableEntity
{
public int Id { get; set; }
public string Token { get; set; } = null!;
public bool IsDeleted { get; set; }
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; } = null!;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class FCMToken:ISoftDeletableEntity, IAuditableEntity
{
public int Id { get; set; }
public string Token { get; set; } = null!;
public bool IsDeleted { get; set; }
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; } = null!;
}
}
+20 -20
View File
@@ -1,20 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class Location : ISoftDeletableEntity, IAuditableEntity
{
public int Id { get; set; }
public string FullName { get; set; } = null!;
public bool IsDeleted { get ; set ; }
public DateTime LastModAt { get ; set ; }
public string LastModBy { get ; set ; } = null!;
public DateTime CreatedAt { get ; set ; }
public string CreatedBy { get ; set ; } = null!;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class Location : ISoftDeletableEntity, IAuditableEntity
{
public int Id { get; set; }
public string FullName { get; set; } = null!;
public bool IsDeleted { get ; set ; }
public DateTime LastModAt { get ; set ; }
public string LastModBy { get ; set ; } = null!;
public DateTime CreatedAt { get ; set ; }
public string CreatedBy { get ; set ; } = null!;
}
}
@@ -1,30 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Entities
{
public enum GenerateType
{
OnlyYear = 0,
YearAndMonth = 1
}
public class NumberGeneratorTemplate
{
public int Id { get; set; }
public string ShortName { get; set; }
public string Prefix { get; set; }
public string PrefixSeparator { get; set; }
public string DigitFormat { get; set; }
public string SuffixSeparator { get; set; }
public string Suffix { get; set; }
public int CurrentNumber { get; set; }
public string LastGeneratedNumber { get; set; }
public GenerateType GenerateType { get; set; }
public virtual ICollection<NumberGeneratorTemplateDate> NumberGeneratorTemplateDates { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Entities
{
public enum GenerateType
{
OnlyYear = 0,
YearAndMonth = 1
}
public class NumberGeneratorTemplate
{
public int Id { get; set; }
public string ShortName { get; set; }
public string Prefix { get; set; }
public string PrefixSeparator { get; set; }
public string DigitFormat { get; set; }
public string SuffixSeparator { get; set; }
public string Suffix { get; set; }
public int CurrentNumber { get; set; }
public string LastGeneratedNumber { get; set; }
public GenerateType GenerateType { get; set; }
public virtual ICollection<NumberGeneratorTemplateDate> NumberGeneratorTemplateDates { get; set; }
}
}
@@ -1,23 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Entities
{
public class NumberGeneratorTemplateDate
{
public int Id { get; set; }
public int NumberGeneratorTemplateId { get; set; }
public virtual NumberGeneratorTemplate NumberGeneratorTemplate { get; set; }
public int Year { get; set; }
public int? Month { get; set; } // csak ha YearAndMonth
public int CurrentNumber { get; set; }
public string LastGeneratedNumber { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Entities
{
public class NumberGeneratorTemplateDate
{
public int Id { get; set; }
public int NumberGeneratorTemplateId { get; set; }
public virtual NumberGeneratorTemplate NumberGeneratorTemplate { get; set; }
public int Year { get; set; }
public int? Month { get; set; } // csak ha YearAndMonth
public int CurrentNumber { get; set; }
public string LastGeneratedNumber { get; set; }
}
}
+31 -31
View File
@@ -1,31 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class Role : ISoftDeletableEntity, IAuditableEntity
{
public int Id { get; set; }
public string RoleName { get; set; } = null!;
public int? ParentId { get; set; }
public virtual Role? Parent { get; set; }
public bool IsAdmin { get; set; }
public bool CanDownloadAPK { get; set; }
public bool CanEnableBlocked { get; set; }
public bool CanUseWebAdmin { get; set; }
public bool CanUseMobilApp { get; set; }
public virtual ICollection<Role> Children { get; set; } = new List<Role>();
public virtual ICollection<UserRole> UserRoles { get; set; } = new List<UserRole>();
public bool IsDeleted { get; set; }
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; } = null!;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class Role : ISoftDeletableEntity, IAuditableEntity
{
public int Id { get; set; }
public string RoleName { get; set; } = null!;
public int? ParentId { get; set; }
public virtual Role? Parent { get; set; }
public bool IsAdmin { get; set; }
public bool CanDownloadAPK { get; set; }
public bool CanEnableBlocked { get; set; }
public bool CanUseWebAdmin { get; set; }
public bool CanUseMobilApp { get; set; }
public virtual ICollection<Role> Children { get; set; } = new List<Role>();
public virtual ICollection<UserRole> UserRoles { get; set; } = new List<UserRole>();
public bool IsDeleted { get; set; }
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; } = null!;
}
}
@@ -1,14 +1,14 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace WorkFlowCheck.DL.Entities
{
public class RoleCheckListTemplateHeader
{
public int Id { get; set; }
public int RoleId { get; set; }
public virtual Role Role { get; set; } = null!;
public int CheckListTemplateHeaderId { get; set; }
public virtual CheckListTemplateHeader CheckListTemplateHeader { get; set; } = null!;
public bool Enabled { get; set; } = true;
}
}
using System.ComponentModel.DataAnnotations.Schema;
namespace WorkFlowCheck.DL.Entities
{
public class RoleCheckListTemplateHeader
{
public int Id { get; set; }
public int RoleId { get; set; }
public virtual Role Role { get; set; } = null!;
public int CheckListTemplateHeaderId { get; set; }
public virtual CheckListTemplateHeader CheckListTemplateHeader { get; set; } = null!;
public bool Enabled { get; set; } = true;
}
}
+18 -18
View File
@@ -1,18 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Entities
{
public class RoleCheckPoint
{
public int Id { get; set; }
public int RoleId { get; set; }
public virtual Role Role { get; set; } = null!;
public int CheckPointId { get; set; }
public virtual CheckPoint CheckPoint { get; set; } = null!;
public bool Enabled { get; set; } = true;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Entities
{
public class RoleCheckPoint
{
public int Id { get; set; }
public int RoleId { get; set; }
public virtual Role Role { get; set; } = null!;
public int CheckPointId { get; set; }
public virtual CheckPoint CheckPoint { get; set; } = null!;
public bool Enabled { get; set; } = true;
}
}
+28 -28
View File
@@ -1,28 +1,28 @@
using System.ComponentModel.DataAnnotations.Schema;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class User : IAuditableEntity, ISoftDeletableEntity
{
public int Id { get; set; }
public string Email { get; set; } = null!;
public string FirstName { get; set; } = null!;
public string LastName { get; set; } = null!;
public string UserName { get; set; } = null!;
public string? PasswordHash { get; set; } = null;
public string JwtToken { get; set; } = null!;
public string Token2FA { get; set; } = null!;
public bool Active { get; set; }
public bool NFCActive { get; set; }
public string NFCCode { get; set; } = null!;
public virtual ICollection<UserRole> UserRoles { get; set; } = new List<UserRole>();
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; } = null!;
public bool IsDeleted { get; set; }
}
}
using System.ComponentModel.DataAnnotations.Schema;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Entities
{
public class User : IAuditableEntity, ISoftDeletableEntity
{
public int Id { get; set; }
public string Email { get; set; } = null!;
public string FirstName { get; set; } = null!;
public string LastName { get; set; } = null!;
public string UserName { get; set; } = null!;
public string? PasswordHash { get; set; } = null;
public string JwtToken { get; set; } = null!;
public string Token2FA { get; set; } = null!;
public bool Active { get; set; }
public bool NFCActive { get; set; }
public string NFCCode { get; set; } = null!;
public virtual ICollection<UserRole> UserRoles { get; set; } = new List<UserRole>();
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; } = null!;
public bool IsDeleted { get; set; }
}
}
+17 -17
View File
@@ -1,17 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Entities
{
public class UserRole
{
public int Id { get; set; }
public int? RoleId { get; set; } = 0;
public virtual Role Role { get; set; } = null!;
public int UserId { get; set; }
public virtual User User { get; set; } = null!;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Entities
{
public class UserRole
{
public int Id { get; set; }
public int? RoleId { get; set; } = 0;
public virtual Role Role { get; set; } = null!;
public int UserId { get; set; }
public virtual User User { get; set; } = null!;
}
}
@@ -1,28 +1,28 @@
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Extensions
{
public static class DbContextExtensions
{
public static void RegisterSoftDeleteQueryFilters(this ModelBuilder modelBuilder)
{
foreach (var entityType in modelBuilder.Model.GetEntityTypes().Where(e => typeof(ISoftDeletableEntity).IsAssignableFrom(e.ClrType)))
{
var parameter = Expression.Parameter(entityType.ClrType);
var softDeletableProperty = Expression.Property(parameter, nameof(ISoftDeletableEntity.IsDeleted));
var compareExpression = Expression.MakeBinary(ExpressionType.Equal, softDeletableProperty, Expression.Constant(false));
var lambda = Expression.Lambda(compareExpression, parameter);
modelBuilder.Entity(entityType.ClrType).HasQueryFilter(lambda);
}
}
}
}
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.DL.Interfaces;
namespace WorkFlowCheck.DL.Extensions
{
public static class DbContextExtensions
{
public static void RegisterSoftDeleteQueryFilters(this ModelBuilder modelBuilder)
{
foreach (var entityType in modelBuilder.Model.GetEntityTypes().Where(e => typeof(ISoftDeletableEntity).IsAssignableFrom(e.ClrType)))
{
var parameter = Expression.Parameter(entityType.ClrType);
var softDeletableProperty = Expression.Property(parameter, nameof(ISoftDeletableEntity.IsDeleted));
var compareExpression = Expression.MakeBinary(ExpressionType.Equal, softDeletableProperty, Expression.Constant(false));
var lambda = Expression.Lambda(compareExpression, parameter);
modelBuilder.Entity(entityType.ClrType).HasQueryFilter(lambda);
}
}
}
}
@@ -1,16 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Interfaces
{
public interface IAuditableEntity
{
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; }
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Interfaces
{
public interface IAuditableEntity
{
public DateTime LastModAt { get; set; }
public string LastModBy { get; set; }
public DateTime CreatedAt { get; set; }
public string CreatedBy { get; set; }
}
}
@@ -1,13 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Interfaces
{
public interface ISoftDeletableEntity
{
public bool IsDeleted { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlowCheck.DL.Interfaces
{
public interface ISoftDeletableEntity
{
public bool IsDeleted { get; set; }
}
}
File diff suppressed because it is too large Load Diff
@@ -1,335 +1,335 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "CheckListHeader",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ShortName = table.Column<string>(type: "nvarchar(max)", nullable: false),
Description = table.Column<string>(type: "nvarchar(max)", nullable: false),
DocumentNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsStorno = table.Column<bool>(type: "bit", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CheckListHeader", x => x.Id);
});
migrationBuilder.CreateTable(
name: "CheckListTemplateHeader",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ShortName = table.Column<string>(type: "nvarchar(max)", nullable: false),
Description = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CheckListTemplateHeader", x => x.Id);
});
migrationBuilder.CreateTable(
name: "CheckPoint",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ShortName = table.Column<string>(type: "nvarchar(max)", nullable: false),
Code = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CheckPoint", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Equipment",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ShortName = table.Column<string>(type: "nvarchar(max)", nullable: false),
EquipmentNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Equipment", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Location",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
FullName = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Location", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Roles",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
RoleName = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Roles", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Users",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Email = table.Column<string>(type: "nvarchar(max)", nullable: false),
FirstName = table.Column<string>(type: "nvarchar(max)", nullable: false),
LastName = table.Column<string>(type: "nvarchar(max)", nullable: false),
UserName = table.Column<string>(type: "nvarchar(max)", nullable: false),
PasswordHash = table.Column<string>(type: "nvarchar(max)", nullable: true),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Users", x => x.Id);
});
migrationBuilder.CreateTable(
name: "CheckListTemplateRow",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
RowIndex = table.Column<int>(type: "int", nullable: false),
CheckListTemplateHeaderId = table.Column<int>(type: "int", nullable: false),
EquipmentId = table.Column<int>(type: "int", nullable: false),
CheckPointId = table.Column<int>(type: "int", nullable: false),
OperationDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CheckListHeaderId = table.Column<int>(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_CheckListTemplateRow", x => x.Id);
table.ForeignKey(
name: "FK_CheckListTemplateRow_CheckListHeader_CheckListHeaderId",
column: x => x.CheckListHeaderId,
principalTable: "CheckListHeader",
principalColumn: "Id");
table.ForeignKey(
name: "FK_CheckListTemplateRow_CheckListTemplateHeader_CheckListTemplateHeaderId",
column: x => x.CheckListTemplateHeaderId,
principalTable: "CheckListTemplateHeader",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_CheckListTemplateRow_CheckPoint_CheckPointId",
column: x => x.CheckPointId,
principalTable: "CheckPoint",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_CheckListTemplateRow_Equipment_EquipmentId",
column: x => x.EquipmentId,
principalTable: "Equipment",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "RoleCheckListTemplateHeader",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
RoleId = table.Column<int>(type: "int", nullable: false),
CheckListTemplateHeaderId = table.Column<int>(type: "int", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_RoleCheckListTemplateHeader", x => x.Id);
table.ForeignKey(
name: "FK_RoleCheckListTemplateHeader_CheckListTemplateHeader_CheckListTemplateHeaderId",
column: x => x.CheckListTemplateHeaderId,
principalTable: "CheckListTemplateHeader",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_RoleCheckListTemplateHeader_Roles_RoleId",
column: x => x.RoleId,
principalTable: "Roles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "UserRoles",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
RoleId = table.Column<int>(type: "int", nullable: false),
UserId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_UserRoles", x => x.Id);
table.ForeignKey(
name: "FK_UserRoles_Roles_RoleId",
column: x => x.RoleId,
principalTable: "Roles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_UserRoles_Users_UserId",
column: x => x.UserId,
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.InsertData(
table: "Users",
columns: new[] { "Id", "CreatedAt", "CreatedBy", "Email", "FirstName", "IsDeleted", "LastModAt", "LastModBy", "LastName", "PasswordHash", "UserName" },
values: new object[,]
{
{ 1, new DateTime(2025, 2, 19, 11, 10, 8, 377, DateTimeKind.Utc).AddTicks(26), "System", "admin@nuvolar.hu", "Administrator", false, new DateTime(2025, 2, 19, 11, 10, 8, 377, DateTimeKind.Utc).AddTicks(29), "System", "System", "eGM0NUREZnJ0ISFFRDIxMKE5TYwthDBuUsTUEO1fBnCR3VdSCmdz47ue0RoVvnkY", "admin" },
{ 2, new DateTime(2025, 2, 19, 11, 10, 8, 389, DateTimeKind.Utc).AddTicks(2814), "System", "user@nuvolar.hu", "User", false, new DateTime(2025, 2, 19, 11, 10, 8, 389, DateTimeKind.Utc).AddTicks(2817), "System", "System", "eGM0NUREZnJ0ISFFRDIxMPwM2D9sQSj7zmaSBIsOGe0I9hBFwCGPVbyrYMA5EnKG", "user" }
});
migrationBuilder.CreateIndex(
name: "IX_CheckListTemplateRow_CheckListHeaderId",
table: "CheckListTemplateRow",
column: "CheckListHeaderId");
migrationBuilder.CreateIndex(
name: "IX_CheckListTemplateRow_CheckListTemplateHeaderId",
table: "CheckListTemplateRow",
column: "CheckListTemplateHeaderId");
migrationBuilder.CreateIndex(
name: "IX_CheckListTemplateRow_CheckPointId",
table: "CheckListTemplateRow",
column: "CheckPointId");
migrationBuilder.CreateIndex(
name: "IX_CheckListTemplateRow_EquipmentId",
table: "CheckListTemplateRow",
column: "EquipmentId");
migrationBuilder.CreateIndex(
name: "IX_RoleCheckListTemplateHeader_CheckListTemplateHeaderId",
table: "RoleCheckListTemplateHeader",
column: "CheckListTemplateHeaderId");
migrationBuilder.CreateIndex(
name: "IX_RoleCheckListTemplateHeader_RoleId",
table: "RoleCheckListTemplateHeader",
column: "RoleId");
migrationBuilder.CreateIndex(
name: "IX_UserRoles_RoleId",
table: "UserRoles",
column: "RoleId");
migrationBuilder.CreateIndex(
name: "IX_UserRoles_UserId",
table: "UserRoles",
column: "UserId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CheckListTemplateRow");
migrationBuilder.DropTable(
name: "Location");
migrationBuilder.DropTable(
name: "RoleCheckListTemplateHeader");
migrationBuilder.DropTable(
name: "UserRoles");
migrationBuilder.DropTable(
name: "CheckListHeader");
migrationBuilder.DropTable(
name: "CheckPoint");
migrationBuilder.DropTable(
name: "Equipment");
migrationBuilder.DropTable(
name: "CheckListTemplateHeader");
migrationBuilder.DropTable(
name: "Roles");
migrationBuilder.DropTable(
name: "Users");
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "CheckListHeader",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ShortName = table.Column<string>(type: "nvarchar(max)", nullable: false),
Description = table.Column<string>(type: "nvarchar(max)", nullable: false),
DocumentNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsStorno = table.Column<bool>(type: "bit", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CheckListHeader", x => x.Id);
});
migrationBuilder.CreateTable(
name: "CheckListTemplateHeader",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ShortName = table.Column<string>(type: "nvarchar(max)", nullable: false),
Description = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CheckListTemplateHeader", x => x.Id);
});
migrationBuilder.CreateTable(
name: "CheckPoint",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ShortName = table.Column<string>(type: "nvarchar(max)", nullable: false),
Code = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CheckPoint", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Equipment",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ShortName = table.Column<string>(type: "nvarchar(max)", nullable: false),
EquipmentNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Equipment", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Location",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
FullName = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Location", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Roles",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
RoleName = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Roles", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Users",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Email = table.Column<string>(type: "nvarchar(max)", nullable: false),
FirstName = table.Column<string>(type: "nvarchar(max)", nullable: false),
LastName = table.Column<string>(type: "nvarchar(max)", nullable: false),
UserName = table.Column<string>(type: "nvarchar(max)", nullable: false),
PasswordHash = table.Column<string>(type: "nvarchar(max)", nullable: true),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Users", x => x.Id);
});
migrationBuilder.CreateTable(
name: "CheckListTemplateRow",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
RowIndex = table.Column<int>(type: "int", nullable: false),
CheckListTemplateHeaderId = table.Column<int>(type: "int", nullable: false),
EquipmentId = table.Column<int>(type: "int", nullable: false),
CheckPointId = table.Column<int>(type: "int", nullable: false),
OperationDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CheckListHeaderId = table.Column<int>(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_CheckListTemplateRow", x => x.Id);
table.ForeignKey(
name: "FK_CheckListTemplateRow_CheckListHeader_CheckListHeaderId",
column: x => x.CheckListHeaderId,
principalTable: "CheckListHeader",
principalColumn: "Id");
table.ForeignKey(
name: "FK_CheckListTemplateRow_CheckListTemplateHeader_CheckListTemplateHeaderId",
column: x => x.CheckListTemplateHeaderId,
principalTable: "CheckListTemplateHeader",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_CheckListTemplateRow_CheckPoint_CheckPointId",
column: x => x.CheckPointId,
principalTable: "CheckPoint",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_CheckListTemplateRow_Equipment_EquipmentId",
column: x => x.EquipmentId,
principalTable: "Equipment",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "RoleCheckListTemplateHeader",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
RoleId = table.Column<int>(type: "int", nullable: false),
CheckListTemplateHeaderId = table.Column<int>(type: "int", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_RoleCheckListTemplateHeader", x => x.Id);
table.ForeignKey(
name: "FK_RoleCheckListTemplateHeader_CheckListTemplateHeader_CheckListTemplateHeaderId",
column: x => x.CheckListTemplateHeaderId,
principalTable: "CheckListTemplateHeader",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_RoleCheckListTemplateHeader_Roles_RoleId",
column: x => x.RoleId,
principalTable: "Roles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "UserRoles",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
RoleId = table.Column<int>(type: "int", nullable: false),
UserId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_UserRoles", x => x.Id);
table.ForeignKey(
name: "FK_UserRoles_Roles_RoleId",
column: x => x.RoleId,
principalTable: "Roles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_UserRoles_Users_UserId",
column: x => x.UserId,
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.InsertData(
table: "Users",
columns: new[] { "Id", "CreatedAt", "CreatedBy", "Email", "FirstName", "IsDeleted", "LastModAt", "LastModBy", "LastName", "PasswordHash", "UserName" },
values: new object[,]
{
{ 1, new DateTime(2025, 2, 19, 11, 10, 8, 377, DateTimeKind.Utc).AddTicks(26), "System", "admin@nuvolar.hu", "Administrator", false, new DateTime(2025, 2, 19, 11, 10, 8, 377, DateTimeKind.Utc).AddTicks(29), "System", "System", "eGM0NUREZnJ0ISFFRDIxMKE5TYwthDBuUsTUEO1fBnCR3VdSCmdz47ue0RoVvnkY", "admin" },
{ 2, new DateTime(2025, 2, 19, 11, 10, 8, 389, DateTimeKind.Utc).AddTicks(2814), "System", "user@nuvolar.hu", "User", false, new DateTime(2025, 2, 19, 11, 10, 8, 389, DateTimeKind.Utc).AddTicks(2817), "System", "System", "eGM0NUREZnJ0ISFFRDIxMPwM2D9sQSj7zmaSBIsOGe0I9hBFwCGPVbyrYMA5EnKG", "user" }
});
migrationBuilder.CreateIndex(
name: "IX_CheckListTemplateRow_CheckListHeaderId",
table: "CheckListTemplateRow",
column: "CheckListHeaderId");
migrationBuilder.CreateIndex(
name: "IX_CheckListTemplateRow_CheckListTemplateHeaderId",
table: "CheckListTemplateRow",
column: "CheckListTemplateHeaderId");
migrationBuilder.CreateIndex(
name: "IX_CheckListTemplateRow_CheckPointId",
table: "CheckListTemplateRow",
column: "CheckPointId");
migrationBuilder.CreateIndex(
name: "IX_CheckListTemplateRow_EquipmentId",
table: "CheckListTemplateRow",
column: "EquipmentId");
migrationBuilder.CreateIndex(
name: "IX_RoleCheckListTemplateHeader_CheckListTemplateHeaderId",
table: "RoleCheckListTemplateHeader",
column: "CheckListTemplateHeaderId");
migrationBuilder.CreateIndex(
name: "IX_RoleCheckListTemplateHeader_RoleId",
table: "RoleCheckListTemplateHeader",
column: "RoleId");
migrationBuilder.CreateIndex(
name: "IX_UserRoles_RoleId",
table: "UserRoles",
column: "RoleId");
migrationBuilder.CreateIndex(
name: "IX_UserRoles_UserId",
table: "UserRoles",
column: "UserId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CheckListTemplateRow");
migrationBuilder.DropTable(
name: "Location");
migrationBuilder.DropTable(
name: "RoleCheckListTemplateHeader");
migrationBuilder.DropTable(
name: "UserRoles");
migrationBuilder.DropTable(
name: "CheckListHeader");
migrationBuilder.DropTable(
name: "CheckPoint");
migrationBuilder.DropTable(
name: "Equipment");
migrationBuilder.DropTable(
name: "CheckListTemplateHeader");
migrationBuilder.DropTable(
name: "Roles");
migrationBuilder.DropTable(
name: "Users");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,122 +1,122 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend001 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_CheckListTemplateRow_CheckListHeader_CheckListHeaderId",
table: "CheckListTemplateRow");
migrationBuilder.DropIndex(
name: "IX_CheckListTemplateRow_CheckListHeaderId",
table: "CheckListTemplateRow");
migrationBuilder.DropColumn(
name: "CheckListHeaderId",
table: "CheckListTemplateRow");
migrationBuilder.CreateTable(
name: "CheckListRow",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CheckListHeaderId = table.Column<int>(type: "int", nullable: false),
CheckListTemplateRowId = table.Column<int>(type: "int", nullable: false),
Answer = table.Column<string>(type: "nvarchar(max)", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CheckListRow", x => x.Id);
table.ForeignKey(
name: "FK_CheckListRow_CheckListHeader_CheckListHeaderId",
column: x => x.CheckListHeaderId,
principalTable: "CheckListHeader",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_CheckListRow_CheckListTemplateRow_CheckListTemplateRowId",
column: x => x.CheckListTemplateRowId,
principalTable: "CheckListTemplateRow",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 11, 59, 47, 916, DateTimeKind.Utc).AddTicks(948), new DateTime(2025, 2, 19, 11, 59, 47, 916, DateTimeKind.Utc).AddTicks(951) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 11, 59, 47, 927, DateTimeKind.Utc).AddTicks(3684), new DateTime(2025, 2, 19, 11, 59, 47, 927, DateTimeKind.Utc).AddTicks(3685) });
migrationBuilder.CreateIndex(
name: "IX_CheckListRow_CheckListHeaderId",
table: "CheckListRow",
column: "CheckListHeaderId");
migrationBuilder.CreateIndex(
name: "IX_CheckListRow_CheckListTemplateRowId",
table: "CheckListRow",
column: "CheckListTemplateRowId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CheckListRow");
migrationBuilder.AddColumn<int>(
name: "CheckListHeaderId",
table: "CheckListTemplateRow",
type: "int",
nullable: true);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 11, 10, 8, 377, DateTimeKind.Utc).AddTicks(26), new DateTime(2025, 2, 19, 11, 10, 8, 377, DateTimeKind.Utc).AddTicks(29) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 11, 10, 8, 389, DateTimeKind.Utc).AddTicks(2814), new DateTime(2025, 2, 19, 11, 10, 8, 389, DateTimeKind.Utc).AddTicks(2817) });
migrationBuilder.CreateIndex(
name: "IX_CheckListTemplateRow_CheckListHeaderId",
table: "CheckListTemplateRow",
column: "CheckListHeaderId");
migrationBuilder.AddForeignKey(
name: "FK_CheckListTemplateRow_CheckListHeader_CheckListHeaderId",
table: "CheckListTemplateRow",
column: "CheckListHeaderId",
principalTable: "CheckListHeader",
principalColumn: "Id");
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend001 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_CheckListTemplateRow_CheckListHeader_CheckListHeaderId",
table: "CheckListTemplateRow");
migrationBuilder.DropIndex(
name: "IX_CheckListTemplateRow_CheckListHeaderId",
table: "CheckListTemplateRow");
migrationBuilder.DropColumn(
name: "CheckListHeaderId",
table: "CheckListTemplateRow");
migrationBuilder.CreateTable(
name: "CheckListRow",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CheckListHeaderId = table.Column<int>(type: "int", nullable: false),
CheckListTemplateRowId = table.Column<int>(type: "int", nullable: false),
Answer = table.Column<string>(type: "nvarchar(max)", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CheckListRow", x => x.Id);
table.ForeignKey(
name: "FK_CheckListRow_CheckListHeader_CheckListHeaderId",
column: x => x.CheckListHeaderId,
principalTable: "CheckListHeader",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_CheckListRow_CheckListTemplateRow_CheckListTemplateRowId",
column: x => x.CheckListTemplateRowId,
principalTable: "CheckListTemplateRow",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 11, 59, 47, 916, DateTimeKind.Utc).AddTicks(948), new DateTime(2025, 2, 19, 11, 59, 47, 916, DateTimeKind.Utc).AddTicks(951) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 11, 59, 47, 927, DateTimeKind.Utc).AddTicks(3684), new DateTime(2025, 2, 19, 11, 59, 47, 927, DateTimeKind.Utc).AddTicks(3685) });
migrationBuilder.CreateIndex(
name: "IX_CheckListRow_CheckListHeaderId",
table: "CheckListRow",
column: "CheckListHeaderId");
migrationBuilder.CreateIndex(
name: "IX_CheckListRow_CheckListTemplateRowId",
table: "CheckListRow",
column: "CheckListTemplateRowId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CheckListRow");
migrationBuilder.AddColumn<int>(
name: "CheckListHeaderId",
table: "CheckListTemplateRow",
type: "int",
nullable: true);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 11, 10, 8, 377, DateTimeKind.Utc).AddTicks(26), new DateTime(2025, 2, 19, 11, 10, 8, 377, DateTimeKind.Utc).AddTicks(29) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 11, 10, 8, 389, DateTimeKind.Utc).AddTicks(2814), new DateTime(2025, 2, 19, 11, 10, 8, 389, DateTimeKind.Utc).AddTicks(2817) });
migrationBuilder.CreateIndex(
name: "IX_CheckListTemplateRow_CheckListHeaderId",
table: "CheckListTemplateRow",
column: "CheckListHeaderId");
migrationBuilder.AddForeignKey(
name: "FK_CheckListTemplateRow_CheckListHeader_CheckListHeaderId",
table: "CheckListTemplateRow",
column: "CheckListHeaderId",
principalTable: "CheckListHeader",
principalColumn: "Id");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,69 +1,69 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend002 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "AnswerType",
table: "CheckListTemplateRow",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<byte[]>(
name: "Photo",
table: "CheckListRow",
type: "varbinary(max)",
nullable: false,
defaultValue: new byte[0]);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 12, 52, 0, 186, DateTimeKind.Utc).AddTicks(2300), new DateTime(2025, 2, 19, 12, 52, 0, 186, DateTimeKind.Utc).AddTicks(2303) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 12, 52, 0, 197, DateTimeKind.Utc).AddTicks(6358), new DateTime(2025, 2, 19, 12, 52, 0, 197, DateTimeKind.Utc).AddTicks(6360) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "AnswerType",
table: "CheckListTemplateRow");
migrationBuilder.DropColumn(
name: "Photo",
table: "CheckListRow");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 11, 59, 47, 916, DateTimeKind.Utc).AddTicks(948), new DateTime(2025, 2, 19, 11, 59, 47, 916, DateTimeKind.Utc).AddTicks(951) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 11, 59, 47, 927, DateTimeKind.Utc).AddTicks(3684), new DateTime(2025, 2, 19, 11, 59, 47, 927, DateTimeKind.Utc).AddTicks(3685) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend002 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "AnswerType",
table: "CheckListTemplateRow",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<byte[]>(
name: "Photo",
table: "CheckListRow",
type: "varbinary(max)",
nullable: false,
defaultValue: new byte[0]);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 12, 52, 0, 186, DateTimeKind.Utc).AddTicks(2300), new DateTime(2025, 2, 19, 12, 52, 0, 186, DateTimeKind.Utc).AddTicks(2303) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 12, 52, 0, 197, DateTimeKind.Utc).AddTicks(6358), new DateTime(2025, 2, 19, 12, 52, 0, 197, DateTimeKind.Utc).AddTicks(6360) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "AnswerType",
table: "CheckListTemplateRow");
migrationBuilder.DropColumn(
name: "Photo",
table: "CheckListRow");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 11, 59, 47, 916, DateTimeKind.Utc).AddTicks(948), new DateTime(2025, 2, 19, 11, 59, 47, 916, DateTimeKind.Utc).AddTicks(951) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 11, 59, 47, 927, DateTimeKind.Utc).AddTicks(3684), new DateTime(2025, 2, 19, 11, 59, 47, 927, DateTimeKind.Utc).AddTicks(3685) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,101 +1,101 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend003 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "GuidNumber",
table: "CheckListRow",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AddColumn<int>(
name: "CheckListTemplateHeaderId",
table: "CheckListHeader",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<Guid>(
name: "GuidNumber",
table: "CheckListHeader",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 3, 15, 47, 43, 353, DateTimeKind.Utc).AddTicks(3654), new DateTime(2025, 3, 3, 15, 47, 43, 353, DateTimeKind.Utc).AddTicks(3659) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 3, 15, 47, 43, 364, DateTimeKind.Utc).AddTicks(9120), new DateTime(2025, 3, 3, 15, 47, 43, 364, DateTimeKind.Utc).AddTicks(9122) });
migrationBuilder.CreateIndex(
name: "IX_CheckListHeader_CheckListTemplateHeaderId",
table: "CheckListHeader",
column: "CheckListTemplateHeaderId");
migrationBuilder.AddForeignKey(
name: "FK_CheckListHeader_CheckListTemplateHeader_CheckListTemplateHeaderId",
table: "CheckListHeader",
column: "CheckListTemplateHeaderId",
principalTable: "CheckListTemplateHeader",
principalColumn: "Id",
onDelete: ReferentialAction.NoAction);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_CheckListHeader_CheckListTemplateHeader_CheckListTemplateHeaderId",
table: "CheckListHeader");
migrationBuilder.DropIndex(
name: "IX_CheckListHeader_CheckListTemplateHeaderId",
table: "CheckListHeader");
migrationBuilder.DropColumn(
name: "GuidNumber",
table: "CheckListRow");
migrationBuilder.DropColumn(
name: "CheckListTemplateHeaderId",
table: "CheckListHeader");
migrationBuilder.DropColumn(
name: "GuidNumber",
table: "CheckListHeader");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 12, 52, 0, 186, DateTimeKind.Utc).AddTicks(2300), new DateTime(2025, 2, 19, 12, 52, 0, 186, DateTimeKind.Utc).AddTicks(2303) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 12, 52, 0, 197, DateTimeKind.Utc).AddTicks(6358), new DateTime(2025, 2, 19, 12, 52, 0, 197, DateTimeKind.Utc).AddTicks(6360) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend003 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "GuidNumber",
table: "CheckListRow",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AddColumn<int>(
name: "CheckListTemplateHeaderId",
table: "CheckListHeader",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<Guid>(
name: "GuidNumber",
table: "CheckListHeader",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 3, 15, 47, 43, 353, DateTimeKind.Utc).AddTicks(3654), new DateTime(2025, 3, 3, 15, 47, 43, 353, DateTimeKind.Utc).AddTicks(3659) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 3, 15, 47, 43, 364, DateTimeKind.Utc).AddTicks(9120), new DateTime(2025, 3, 3, 15, 47, 43, 364, DateTimeKind.Utc).AddTicks(9122) });
migrationBuilder.CreateIndex(
name: "IX_CheckListHeader_CheckListTemplateHeaderId",
table: "CheckListHeader",
column: "CheckListTemplateHeaderId");
migrationBuilder.AddForeignKey(
name: "FK_CheckListHeader_CheckListTemplateHeader_CheckListTemplateHeaderId",
table: "CheckListHeader",
column: "CheckListTemplateHeaderId",
principalTable: "CheckListTemplateHeader",
principalColumn: "Id",
onDelete: ReferentialAction.NoAction);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_CheckListHeader_CheckListTemplateHeader_CheckListTemplateHeaderId",
table: "CheckListHeader");
migrationBuilder.DropIndex(
name: "IX_CheckListHeader_CheckListTemplateHeaderId",
table: "CheckListHeader");
migrationBuilder.DropColumn(
name: "GuidNumber",
table: "CheckListRow");
migrationBuilder.DropColumn(
name: "CheckListTemplateHeaderId",
table: "CheckListHeader");
migrationBuilder.DropColumn(
name: "GuidNumber",
table: "CheckListHeader");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 12, 52, 0, 186, DateTimeKind.Utc).AddTicks(2300), new DateTime(2025, 2, 19, 12, 52, 0, 186, DateTimeKind.Utc).AddTicks(2303) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 2, 19, 12, 52, 0, 197, DateTimeKind.Utc).AddTicks(6358), new DateTime(2025, 2, 19, 12, 52, 0, 197, DateTimeKind.Utc).AddTicks(6360) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,99 +1,99 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class UserRoleExtension : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_UserRoles_Roles_RoleId",
table: "UserRoles");
migrationBuilder.AddColumn<string>(
name: "JwtToken",
table: "Users",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.AlterColumn<int>(
name: "RoleId",
table: "UserRoles",
type: "int",
nullable: true,
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "JwtToken", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 12, 8, 8, 57, 555, DateTimeKind.Utc).AddTicks(6125), "", new DateTime(2025, 3, 12, 8, 8, 57, 555, DateTimeKind.Utc).AddTicks(6129) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "JwtToken", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 12, 8, 8, 57, 566, DateTimeKind.Utc).AddTicks(6128), "", new DateTime(2025, 3, 12, 8, 8, 57, 566, DateTimeKind.Utc).AddTicks(6129) });
migrationBuilder.AddForeignKey(
name: "FK_UserRoles_Roles_RoleId",
table: "UserRoles",
column: "RoleId",
principalTable: "Roles",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_UserRoles_Roles_RoleId",
table: "UserRoles");
migrationBuilder.DropColumn(
name: "JwtToken",
table: "Users");
migrationBuilder.AlterColumn<int>(
name: "RoleId",
table: "UserRoles",
type: "int",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "int",
oldNullable: true);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 3, 15, 47, 43, 353, DateTimeKind.Utc).AddTicks(3654), new DateTime(2025, 3, 3, 15, 47, 43, 353, DateTimeKind.Utc).AddTicks(3659) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 3, 15, 47, 43, 364, DateTimeKind.Utc).AddTicks(9120), new DateTime(2025, 3, 3, 15, 47, 43, 364, DateTimeKind.Utc).AddTicks(9122) });
migrationBuilder.AddForeignKey(
name: "FK_UserRoles_Roles_RoleId",
table: "UserRoles",
column: "RoleId",
principalTable: "Roles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class UserRoleExtension : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_UserRoles_Roles_RoleId",
table: "UserRoles");
migrationBuilder.AddColumn<string>(
name: "JwtToken",
table: "Users",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.AlterColumn<int>(
name: "RoleId",
table: "UserRoles",
type: "int",
nullable: true,
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "JwtToken", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 12, 8, 8, 57, 555, DateTimeKind.Utc).AddTicks(6125), "", new DateTime(2025, 3, 12, 8, 8, 57, 555, DateTimeKind.Utc).AddTicks(6129) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "JwtToken", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 12, 8, 8, 57, 566, DateTimeKind.Utc).AddTicks(6128), "", new DateTime(2025, 3, 12, 8, 8, 57, 566, DateTimeKind.Utc).AddTicks(6129) });
migrationBuilder.AddForeignKey(
name: "FK_UserRoles_Roles_RoleId",
table: "UserRoles",
column: "RoleId",
principalTable: "Roles",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_UserRoles_Roles_RoleId",
table: "UserRoles");
migrationBuilder.DropColumn(
name: "JwtToken",
table: "Users");
migrationBuilder.AlterColumn<int>(
name: "RoleId",
table: "UserRoles",
type: "int",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "int",
oldNullable: true);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 3, 15, 47, 43, 353, DateTimeKind.Utc).AddTicks(3654), new DateTime(2025, 3, 3, 15, 47, 43, 353, DateTimeKind.Utc).AddTicks(3659) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 3, 15, 47, 43, 364, DateTimeKind.Utc).AddTicks(9120), new DateTime(2025, 3, 3, 15, 47, 43, 364, DateTimeKind.Utc).AddTicks(9122) });
migrationBuilder.AddForeignKey(
name: "FK_UserRoles_Roles_RoleId",
table: "UserRoles",
column: "RoleId",
principalTable: "Roles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,69 +1,69 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend004 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "Active",
table: "Users",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<string>(
name: "Token2FA",
table: "Users",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "Active", "CreatedAt", "LastModAt", "Token2FA" },
values: new object[] { true, new DateTime(2025, 3, 18, 10, 48, 13, 634, DateTimeKind.Utc).AddTicks(7867), new DateTime(2025, 3, 18, 10, 48, 13, 634, DateTimeKind.Utc).AddTicks(7870), "" });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "Active", "CreatedAt", "LastModAt", "Token2FA" },
values: new object[] { true, new DateTime(2025, 3, 18, 10, 48, 13, 645, DateTimeKind.Utc).AddTicks(9210), new DateTime(2025, 3, 18, 10, 48, 13, 645, DateTimeKind.Utc).AddTicks(9212), "" });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Active",
table: "Users");
migrationBuilder.DropColumn(
name: "Token2FA",
table: "Users");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 12, 8, 8, 57, 555, DateTimeKind.Utc).AddTicks(6125), new DateTime(2025, 3, 12, 8, 8, 57, 555, DateTimeKind.Utc).AddTicks(6129) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 12, 8, 8, 57, 566, DateTimeKind.Utc).AddTicks(6128), new DateTime(2025, 3, 12, 8, 8, 57, 566, DateTimeKind.Utc).AddTicks(6129) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend004 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "Active",
table: "Users",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<string>(
name: "Token2FA",
table: "Users",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "Active", "CreatedAt", "LastModAt", "Token2FA" },
values: new object[] { true, new DateTime(2025, 3, 18, 10, 48, 13, 634, DateTimeKind.Utc).AddTicks(7867), new DateTime(2025, 3, 18, 10, 48, 13, 634, DateTimeKind.Utc).AddTicks(7870), "" });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "Active", "CreatedAt", "LastModAt", "Token2FA" },
values: new object[] { true, new DateTime(2025, 3, 18, 10, 48, 13, 645, DateTimeKind.Utc).AddTicks(9210), new DateTime(2025, 3, 18, 10, 48, 13, 645, DateTimeKind.Utc).AddTicks(9212), "" });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Active",
table: "Users");
migrationBuilder.DropColumn(
name: "Token2FA",
table: "Users");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 12, 8, 8, 57, 555, DateTimeKind.Utc).AddTicks(6125), new DateTime(2025, 3, 12, 8, 8, 57, 555, DateTimeKind.Utc).AddTicks(6129) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 12, 8, 8, 57, 566, DateTimeKind.Utc).AddTicks(6128), new DateTime(2025, 3, 12, 8, 8, 57, 566, DateTimeKind.Utc).AddTicks(6129) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,107 +1,107 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend005 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "NumberGeneratorTemplate",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ShortName = table.Column<string>(type: "nvarchar(max)", nullable: false),
Prefix = table.Column<string>(type: "nvarchar(max)", nullable: false),
PrefixSeparator = table.Column<string>(type: "nvarchar(max)", nullable: false),
DigitFormat = table.Column<string>(type: "nvarchar(max)", nullable: false),
SuffixSeparator = table.Column<string>(type: "nvarchar(max)", nullable: false),
Suffix = table.Column<string>(type: "nvarchar(max)", nullable: false),
CurrentNumber = table.Column<int>(type: "int", nullable: false),
LastGeneratedNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
GenerateType = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_NumberGeneratorTemplate", x => x.Id);
});
migrationBuilder.CreateTable(
name: "NumberGeneratorTemplateDate",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
NumberGeneratorTemplateId = table.Column<int>(type: "int", nullable: false),
Year = table.Column<int>(type: "int", nullable: false),
Month = table.Column<int>(type: "int", nullable: true),
CurrentNumber = table.Column<int>(type: "int", nullable: false),
LastGeneratedNumber = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_NumberGeneratorTemplateDate", x => x.Id);
table.ForeignKey(
name: "FK_NumberGeneratorTemplateDate_NumberGeneratorTemplate_NumberGeneratorTemplateId",
column: x => x.NumberGeneratorTemplateId,
principalTable: "NumberGeneratorTemplate",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.InsertData(
table: "NumberGeneratorTemplate",
columns: new[] { "Id", "CurrentNumber", "DigitFormat", "GenerateType", "LastGeneratedNumber", "Prefix", "PrefixSeparator", "ShortName", "Suffix", "SuffixSeparator" },
values: new object[] { 1, 0, "D4", 0, "", "CHK", "-", "Ellenőrzési dokumentum sorszámozása", "", "-" });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 19, 13, 25, 30, 814, DateTimeKind.Utc).AddTicks(9821), new DateTime(2025, 3, 19, 13, 25, 30, 814, DateTimeKind.Utc).AddTicks(9825) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 19, 13, 25, 30, 829, DateTimeKind.Utc).AddTicks(5779), new DateTime(2025, 3, 19, 13, 25, 30, 829, DateTimeKind.Utc).AddTicks(5783) });
migrationBuilder.CreateIndex(
name: "IX_NumberGeneratorTemplateDate_NumberGeneratorTemplateId",
table: "NumberGeneratorTemplateDate",
column: "NumberGeneratorTemplateId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "NumberGeneratorTemplateDate");
migrationBuilder.DropTable(
name: "NumberGeneratorTemplate");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 18, 10, 48, 13, 634, DateTimeKind.Utc).AddTicks(7867), new DateTime(2025, 3, 18, 10, 48, 13, 634, DateTimeKind.Utc).AddTicks(7870) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 18, 10, 48, 13, 645, DateTimeKind.Utc).AddTicks(9210), new DateTime(2025, 3, 18, 10, 48, 13, 645, DateTimeKind.Utc).AddTicks(9212) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend005 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "NumberGeneratorTemplate",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ShortName = table.Column<string>(type: "nvarchar(max)", nullable: false),
Prefix = table.Column<string>(type: "nvarchar(max)", nullable: false),
PrefixSeparator = table.Column<string>(type: "nvarchar(max)", nullable: false),
DigitFormat = table.Column<string>(type: "nvarchar(max)", nullable: false),
SuffixSeparator = table.Column<string>(type: "nvarchar(max)", nullable: false),
Suffix = table.Column<string>(type: "nvarchar(max)", nullable: false),
CurrentNumber = table.Column<int>(type: "int", nullable: false),
LastGeneratedNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
GenerateType = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_NumberGeneratorTemplate", x => x.Id);
});
migrationBuilder.CreateTable(
name: "NumberGeneratorTemplateDate",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
NumberGeneratorTemplateId = table.Column<int>(type: "int", nullable: false),
Year = table.Column<int>(type: "int", nullable: false),
Month = table.Column<int>(type: "int", nullable: true),
CurrentNumber = table.Column<int>(type: "int", nullable: false),
LastGeneratedNumber = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_NumberGeneratorTemplateDate", x => x.Id);
table.ForeignKey(
name: "FK_NumberGeneratorTemplateDate_NumberGeneratorTemplate_NumberGeneratorTemplateId",
column: x => x.NumberGeneratorTemplateId,
principalTable: "NumberGeneratorTemplate",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.InsertData(
table: "NumberGeneratorTemplate",
columns: new[] { "Id", "CurrentNumber", "DigitFormat", "GenerateType", "LastGeneratedNumber", "Prefix", "PrefixSeparator", "ShortName", "Suffix", "SuffixSeparator" },
values: new object[] { 1, 0, "D4", 0, "", "CHK", "-", "Ellenőrzési dokumentum sorszámozása", "", "-" });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 19, 13, 25, 30, 814, DateTimeKind.Utc).AddTicks(9821), new DateTime(2025, 3, 19, 13, 25, 30, 814, DateTimeKind.Utc).AddTicks(9825) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 19, 13, 25, 30, 829, DateTimeKind.Utc).AddTicks(5779), new DateTime(2025, 3, 19, 13, 25, 30, 829, DateTimeKind.Utc).AddTicks(5783) });
migrationBuilder.CreateIndex(
name: "IX_NumberGeneratorTemplateDate_NumberGeneratorTemplateId",
table: "NumberGeneratorTemplateDate",
column: "NumberGeneratorTemplateId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "NumberGeneratorTemplateDate");
migrationBuilder.DropTable(
name: "NumberGeneratorTemplate");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 18, 10, 48, 13, 634, DateTimeKind.Utc).AddTicks(7867), new DateTime(2025, 3, 18, 10, 48, 13, 634, DateTimeKind.Utc).AddTicks(7870) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 18, 10, 48, 13, 645, DateTimeKind.Utc).AddTicks(9210), new DateTime(2025, 3, 18, 10, 48, 13, 645, DateTimeKind.Utc).AddTicks(9212) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,58 +1,58 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend006 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsEditable",
table: "CheckListHeader",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 11, 39, 40, 269, DateTimeKind.Utc).AddTicks(5367), new DateTime(2025, 3, 21, 11, 39, 40, 269, DateTimeKind.Utc).AddTicks(5369) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 11, 39, 40, 280, DateTimeKind.Utc).AddTicks(6775), new DateTime(2025, 3, 21, 11, 39, 40, 280, DateTimeKind.Utc).AddTicks(6776) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsEditable",
table: "CheckListHeader");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 19, 13, 25, 30, 814, DateTimeKind.Utc).AddTicks(9821), new DateTime(2025, 3, 19, 13, 25, 30, 814, DateTimeKind.Utc).AddTicks(9825) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 19, 13, 25, 30, 829, DateTimeKind.Utc).AddTicks(5779), new DateTime(2025, 3, 19, 13, 25, 30, 829, DateTimeKind.Utc).AddTicks(5783) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend006 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsEditable",
table: "CheckListHeader",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 11, 39, 40, 269, DateTimeKind.Utc).AddTicks(5367), new DateTime(2025, 3, 21, 11, 39, 40, 269, DateTimeKind.Utc).AddTicks(5369) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 11, 39, 40, 280, DateTimeKind.Utc).AddTicks(6775), new DateTime(2025, 3, 21, 11, 39, 40, 280, DateTimeKind.Utc).AddTicks(6776) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsEditable",
table: "CheckListHeader");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 19, 13, 25, 30, 814, DateTimeKind.Utc).AddTicks(9821), new DateTime(2025, 3, 19, 13, 25, 30, 814, DateTimeKind.Utc).AddTicks(9825) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 19, 13, 25, 30, 829, DateTimeKind.Utc).AddTicks(5779), new DateTime(2025, 3, 19, 13, 25, 30, 829, DateTimeKind.Utc).AddTicks(5783) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,90 +1,90 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend007 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "DateExecution",
table: "CheckListHeader",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<int>(
name: "UserId",
table: "CheckListHeader",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 12, 14, 13, 195, DateTimeKind.Utc).AddTicks(5804), new DateTime(2025, 3, 21, 12, 14, 13, 195, DateTimeKind.Utc).AddTicks(5808) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 12, 14, 13, 206, DateTimeKind.Utc).AddTicks(9653), new DateTime(2025, 3, 21, 12, 14, 13, 206, DateTimeKind.Utc).AddTicks(9657) });
migrationBuilder.CreateIndex(
name: "IX_CheckListHeader_UserId",
table: "CheckListHeader",
column: "UserId");
migrationBuilder.AddForeignKey(
name: "FK_CheckListHeader_Users_UserId",
table: "CheckListHeader",
column: "UserId",
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_CheckListHeader_Users_UserId",
table: "CheckListHeader");
migrationBuilder.DropIndex(
name: "IX_CheckListHeader_UserId",
table: "CheckListHeader");
migrationBuilder.DropColumn(
name: "DateExecution",
table: "CheckListHeader");
migrationBuilder.DropColumn(
name: "UserId",
table: "CheckListHeader");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 11, 39, 40, 269, DateTimeKind.Utc).AddTicks(5367), new DateTime(2025, 3, 21, 11, 39, 40, 269, DateTimeKind.Utc).AddTicks(5369) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 11, 39, 40, 280, DateTimeKind.Utc).AddTicks(6775), new DateTime(2025, 3, 21, 11, 39, 40, 280, DateTimeKind.Utc).AddTicks(6776) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend007 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "DateExecution",
table: "CheckListHeader",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<int>(
name: "UserId",
table: "CheckListHeader",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 12, 14, 13, 195, DateTimeKind.Utc).AddTicks(5804), new DateTime(2025, 3, 21, 12, 14, 13, 195, DateTimeKind.Utc).AddTicks(5808) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 12, 14, 13, 206, DateTimeKind.Utc).AddTicks(9653), new DateTime(2025, 3, 21, 12, 14, 13, 206, DateTimeKind.Utc).AddTicks(9657) });
migrationBuilder.CreateIndex(
name: "IX_CheckListHeader_UserId",
table: "CheckListHeader",
column: "UserId");
migrationBuilder.AddForeignKey(
name: "FK_CheckListHeader_Users_UserId",
table: "CheckListHeader",
column: "UserId",
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_CheckListHeader_Users_UserId",
table: "CheckListHeader");
migrationBuilder.DropIndex(
name: "IX_CheckListHeader_UserId",
table: "CheckListHeader");
migrationBuilder.DropColumn(
name: "DateExecution",
table: "CheckListHeader");
migrationBuilder.DropColumn(
name: "UserId",
table: "CheckListHeader");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 11, 39, 40, 269, DateTimeKind.Utc).AddTicks(5367), new DateTime(2025, 3, 21, 11, 39, 40, 269, DateTimeKind.Utc).AddTicks(5369) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 11, 39, 40, 280, DateTimeKind.Utc).AddTicks(6775), new DateTime(2025, 3, 21, 11, 39, 40, 280, DateTimeKind.Utc).AddTicks(6776) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,117 +1,117 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend008 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "NumberGenerator1Id",
table: "CheckListTemplateHeader",
type: "int",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "NumberGenerator2Id",
table: "CheckListTemplateHeader",
type: "int",
nullable: true);
migrationBuilder.InsertData(
table: "NumberGeneratorTemplateDate",
columns: new[] { "Id", "CurrentNumber", "LastGeneratedNumber", "Month", "NumberGeneratorTemplateId", "Year" },
values: new object[] { 1, 0, "", 0, 1, 1 });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 15, 14, 11, 73, DateTimeKind.Utc).AddTicks(8912), new DateTime(2025, 3, 21, 15, 14, 11, 73, DateTimeKind.Utc).AddTicks(8916) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 15, 14, 11, 84, DateTimeKind.Utc).AddTicks(9869), new DateTime(2025, 3, 21, 15, 14, 11, 84, DateTimeKind.Utc).AddTicks(9870) });
migrationBuilder.CreateIndex(
name: "IX_CheckListTemplateHeader_NumberGenerator1Id",
table: "CheckListTemplateHeader",
column: "NumberGenerator1Id");
migrationBuilder.CreateIndex(
name: "IX_CheckListTemplateHeader_NumberGenerator2Id",
table: "CheckListTemplateHeader",
column: "NumberGenerator2Id");
migrationBuilder.AddForeignKey(
name: "FK_CheckListTemplateHeader_NumberGeneratorTemplate_NumberGenerator1Id",
table: "CheckListTemplateHeader",
column: "NumberGenerator1Id",
principalTable: "NumberGeneratorTemplate",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_CheckListTemplateHeader_NumberGeneratorTemplate_NumberGenerator2Id",
table: "CheckListTemplateHeader",
column: "NumberGenerator2Id",
principalTable: "NumberGeneratorTemplate",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_CheckListTemplateHeader_NumberGeneratorTemplate_NumberGenerator1Id",
table: "CheckListTemplateHeader");
migrationBuilder.DropForeignKey(
name: "FK_CheckListTemplateHeader_NumberGeneratorTemplate_NumberGenerator2Id",
table: "CheckListTemplateHeader");
migrationBuilder.DropIndex(
name: "IX_CheckListTemplateHeader_NumberGenerator1Id",
table: "CheckListTemplateHeader");
migrationBuilder.DropIndex(
name: "IX_CheckListTemplateHeader_NumberGenerator2Id",
table: "CheckListTemplateHeader");
migrationBuilder.DeleteData(
table: "NumberGeneratorTemplateDate",
keyColumn: "Id",
keyValue: 1);
migrationBuilder.DropColumn(
name: "NumberGenerator1Id",
table: "CheckListTemplateHeader");
migrationBuilder.DropColumn(
name: "NumberGenerator2Id",
table: "CheckListTemplateHeader");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 12, 14, 13, 195, DateTimeKind.Utc).AddTicks(5804), new DateTime(2025, 3, 21, 12, 14, 13, 195, DateTimeKind.Utc).AddTicks(5808) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 12, 14, 13, 206, DateTimeKind.Utc).AddTicks(9653), new DateTime(2025, 3, 21, 12, 14, 13, 206, DateTimeKind.Utc).AddTicks(9657) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend008 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "NumberGenerator1Id",
table: "CheckListTemplateHeader",
type: "int",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "NumberGenerator2Id",
table: "CheckListTemplateHeader",
type: "int",
nullable: true);
migrationBuilder.InsertData(
table: "NumberGeneratorTemplateDate",
columns: new[] { "Id", "CurrentNumber", "LastGeneratedNumber", "Month", "NumberGeneratorTemplateId", "Year" },
values: new object[] { 1, 0, "", 0, 1, 1 });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 15, 14, 11, 73, DateTimeKind.Utc).AddTicks(8912), new DateTime(2025, 3, 21, 15, 14, 11, 73, DateTimeKind.Utc).AddTicks(8916) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 15, 14, 11, 84, DateTimeKind.Utc).AddTicks(9869), new DateTime(2025, 3, 21, 15, 14, 11, 84, DateTimeKind.Utc).AddTicks(9870) });
migrationBuilder.CreateIndex(
name: "IX_CheckListTemplateHeader_NumberGenerator1Id",
table: "CheckListTemplateHeader",
column: "NumberGenerator1Id");
migrationBuilder.CreateIndex(
name: "IX_CheckListTemplateHeader_NumberGenerator2Id",
table: "CheckListTemplateHeader",
column: "NumberGenerator2Id");
migrationBuilder.AddForeignKey(
name: "FK_CheckListTemplateHeader_NumberGeneratorTemplate_NumberGenerator1Id",
table: "CheckListTemplateHeader",
column: "NumberGenerator1Id",
principalTable: "NumberGeneratorTemplate",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_CheckListTemplateHeader_NumberGeneratorTemplate_NumberGenerator2Id",
table: "CheckListTemplateHeader",
column: "NumberGenerator2Id",
principalTable: "NumberGeneratorTemplate",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_CheckListTemplateHeader_NumberGeneratorTemplate_NumberGenerator1Id",
table: "CheckListTemplateHeader");
migrationBuilder.DropForeignKey(
name: "FK_CheckListTemplateHeader_NumberGeneratorTemplate_NumberGenerator2Id",
table: "CheckListTemplateHeader");
migrationBuilder.DropIndex(
name: "IX_CheckListTemplateHeader_NumberGenerator1Id",
table: "CheckListTemplateHeader");
migrationBuilder.DropIndex(
name: "IX_CheckListTemplateHeader_NumberGenerator2Id",
table: "CheckListTemplateHeader");
migrationBuilder.DeleteData(
table: "NumberGeneratorTemplateDate",
keyColumn: "Id",
keyValue: 1);
migrationBuilder.DropColumn(
name: "NumberGenerator1Id",
table: "CheckListTemplateHeader");
migrationBuilder.DropColumn(
name: "NumberGenerator2Id",
table: "CheckListTemplateHeader");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 12, 14, 13, 195, DateTimeKind.Utc).AddTicks(5804), new DateTime(2025, 3, 21, 12, 14, 13, 195, DateTimeKind.Utc).AddTicks(5808) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 12, 14, 13, 206, DateTimeKind.Utc).AddTicks(9653), new DateTime(2025, 3, 21, 12, 14, 13, 206, DateTimeKind.Utc).AddTicks(9657) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,98 +1,98 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend009 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "CheckStatus",
table: "CheckListHeader",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.CreateTable(
name: "RoleCheckPoint",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
RoleId = table.Column<int>(type: "int", nullable: false),
CheckPointId = table.Column<int>(type: "int", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_RoleCheckPoint", x => x.Id);
table.ForeignKey(
name: "FK_RoleCheckPoint_CheckPoint_CheckPointId",
column: x => x.CheckPointId,
principalTable: "CheckPoint",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_RoleCheckPoint_Roles_RoleId",
column: x => x.RoleId,
principalTable: "Roles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 31, 9, 37, 40, 826, DateTimeKind.Utc).AddTicks(2914), new DateTime(2025, 3, 31, 9, 37, 40, 826, DateTimeKind.Utc).AddTicks(2918) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 31, 9, 37, 40, 838, DateTimeKind.Utc).AddTicks(1281), new DateTime(2025, 3, 31, 9, 37, 40, 838, DateTimeKind.Utc).AddTicks(1285) });
migrationBuilder.CreateIndex(
name: "IX_RoleCheckPoint_CheckPointId",
table: "RoleCheckPoint",
column: "CheckPointId");
migrationBuilder.CreateIndex(
name: "IX_RoleCheckPoint_RoleId",
table: "RoleCheckPoint",
column: "RoleId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "RoleCheckPoint");
migrationBuilder.DropColumn(
name: "CheckStatus",
table: "CheckListHeader");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 15, 14, 11, 73, DateTimeKind.Utc).AddTicks(8912), new DateTime(2025, 3, 21, 15, 14, 11, 73, DateTimeKind.Utc).AddTicks(8916) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 15, 14, 11, 84, DateTimeKind.Utc).AddTicks(9869), new DateTime(2025, 3, 21, 15, 14, 11, 84, DateTimeKind.Utc).AddTicks(9870) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend009 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "CheckStatus",
table: "CheckListHeader",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.CreateTable(
name: "RoleCheckPoint",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
RoleId = table.Column<int>(type: "int", nullable: false),
CheckPointId = table.Column<int>(type: "int", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_RoleCheckPoint", x => x.Id);
table.ForeignKey(
name: "FK_RoleCheckPoint_CheckPoint_CheckPointId",
column: x => x.CheckPointId,
principalTable: "CheckPoint",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_RoleCheckPoint_Roles_RoleId",
column: x => x.RoleId,
principalTable: "Roles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 31, 9, 37, 40, 826, DateTimeKind.Utc).AddTicks(2914), new DateTime(2025, 3, 31, 9, 37, 40, 826, DateTimeKind.Utc).AddTicks(2918) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 31, 9, 37, 40, 838, DateTimeKind.Utc).AddTicks(1281), new DateTime(2025, 3, 31, 9, 37, 40, 838, DateTimeKind.Utc).AddTicks(1285) });
migrationBuilder.CreateIndex(
name: "IX_RoleCheckPoint_CheckPointId",
table: "RoleCheckPoint",
column: "CheckPointId");
migrationBuilder.CreateIndex(
name: "IX_RoleCheckPoint_RoleId",
table: "RoleCheckPoint",
column: "RoleId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "RoleCheckPoint");
migrationBuilder.DropColumn(
name: "CheckStatus",
table: "CheckListHeader");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 15, 14, 11, 73, DateTimeKind.Utc).AddTicks(8912), new DateTime(2025, 3, 21, 15, 14, 11, 73, DateTimeKind.Utc).AddTicks(8916) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 21, 15, 14, 11, 84, DateTimeKind.Utc).AddTicks(9869), new DateTime(2025, 3, 21, 15, 14, 11, 84, DateTimeKind.Utc).AddTicks(9870) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,58 +1,58 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend010 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsEnabled",
table: "CheckPoint",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 31, 11, 21, 22, 452, DateTimeKind.Utc).AddTicks(5939), new DateTime(2025, 3, 31, 11, 21, 22, 452, DateTimeKind.Utc).AddTicks(5942) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 31, 11, 21, 22, 463, DateTimeKind.Utc).AddTicks(5859), new DateTime(2025, 3, 31, 11, 21, 22, 463, DateTimeKind.Utc).AddTicks(5860) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsEnabled",
table: "CheckPoint");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 31, 9, 37, 40, 826, DateTimeKind.Utc).AddTicks(2914), new DateTime(2025, 3, 31, 9, 37, 40, 826, DateTimeKind.Utc).AddTicks(2918) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 31, 9, 37, 40, 838, DateTimeKind.Utc).AddTicks(1281), new DateTime(2025, 3, 31, 9, 37, 40, 838, DateTimeKind.Utc).AddTicks(1285) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend010 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsEnabled",
table: "CheckPoint",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 31, 11, 21, 22, 452, DateTimeKind.Utc).AddTicks(5939), new DateTime(2025, 3, 31, 11, 21, 22, 452, DateTimeKind.Utc).AddTicks(5942) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 31, 11, 21, 22, 463, DateTimeKind.Utc).AddTicks(5859), new DateTime(2025, 3, 31, 11, 21, 22, 463, DateTimeKind.Utc).AddTicks(5860) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsEnabled",
table: "CheckPoint");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 31, 9, 37, 40, 826, DateTimeKind.Utc).AddTicks(2914), new DateTime(2025, 3, 31, 9, 37, 40, 826, DateTimeKind.Utc).AddTicks(2918) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 31, 9, 37, 40, 838, DateTimeKind.Utc).AddTicks(1281), new DateTime(2025, 3, 31, 9, 37, 40, 838, DateTimeKind.Utc).AddTicks(1285) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,58 +1,58 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend011 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "PhotoFileName",
table: "CheckListRow",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 1, 15, 16, 7, 535, DateTimeKind.Utc).AddTicks(5258), new DateTime(2025, 4, 1, 15, 16, 7, 535, DateTimeKind.Utc).AddTicks(5260) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 1, 15, 16, 7, 546, DateTimeKind.Utc).AddTicks(7925), new DateTime(2025, 4, 1, 15, 16, 7, 546, DateTimeKind.Utc).AddTicks(7926) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "PhotoFileName",
table: "CheckListRow");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 31, 11, 21, 22, 452, DateTimeKind.Utc).AddTicks(5939), new DateTime(2025, 3, 31, 11, 21, 22, 452, DateTimeKind.Utc).AddTicks(5942) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 31, 11, 21, 22, 463, DateTimeKind.Utc).AddTicks(5859), new DateTime(2025, 3, 31, 11, 21, 22, 463, DateTimeKind.Utc).AddTicks(5860) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend011 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "PhotoFileName",
table: "CheckListRow",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 1, 15, 16, 7, 535, DateTimeKind.Utc).AddTicks(5258), new DateTime(2025, 4, 1, 15, 16, 7, 535, DateTimeKind.Utc).AddTicks(5260) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 1, 15, 16, 7, 546, DateTimeKind.Utc).AddTicks(7925), new DateTime(2025, 4, 1, 15, 16, 7, 546, DateTimeKind.Utc).AddTicks(7926) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "PhotoFileName",
table: "CheckListRow");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 31, 11, 21, 22, 452, DateTimeKind.Utc).AddTicks(5939), new DateTime(2025, 3, 31, 11, 21, 22, 452, DateTimeKind.Utc).AddTicks(5942) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 3, 31, 11, 21, 22, 463, DateTimeKind.Utc).AddTicks(5859), new DateTime(2025, 3, 31, 11, 21, 22, 463, DateTimeKind.Utc).AddTicks(5860) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,58 +1,58 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend012 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Photo",
table: "CheckListRow");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 2, 8, 28, 48, 480, DateTimeKind.Utc).AddTicks(5537), new DateTime(2025, 4, 2, 8, 28, 48, 480, DateTimeKind.Utc).AddTicks(5540) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 2, 8, 28, 48, 491, DateTimeKind.Utc).AddTicks(9369), new DateTime(2025, 4, 2, 8, 28, 48, 491, DateTimeKind.Utc).AddTicks(9370) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<byte[]>(
name: "Photo",
table: "CheckListRow",
type: "varbinary(max)",
nullable: false,
defaultValue: new byte[0]);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 1, 15, 16, 7, 535, DateTimeKind.Utc).AddTicks(5258), new DateTime(2025, 4, 1, 15, 16, 7, 535, DateTimeKind.Utc).AddTicks(5260) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 1, 15, 16, 7, 546, DateTimeKind.Utc).AddTicks(7925), new DateTime(2025, 4, 1, 15, 16, 7, 546, DateTimeKind.Utc).AddTicks(7926) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend012 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Photo",
table: "CheckListRow");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 2, 8, 28, 48, 480, DateTimeKind.Utc).AddTicks(5537), new DateTime(2025, 4, 2, 8, 28, 48, 480, DateTimeKind.Utc).AddTicks(5540) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 2, 8, 28, 48, 491, DateTimeKind.Utc).AddTicks(9369), new DateTime(2025, 4, 2, 8, 28, 48, 491, DateTimeKind.Utc).AddTicks(9370) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<byte[]>(
name: "Photo",
table: "CheckListRow",
type: "varbinary(max)",
nullable: false,
defaultValue: new byte[0]);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 1, 15, 16, 7, 535, DateTimeKind.Utc).AddTicks(5258), new DateTime(2025, 4, 1, 15, 16, 7, 535, DateTimeKind.Utc).AddTicks(5260) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 1, 15, 16, 7, 546, DateTimeKind.Utc).AddTicks(7925), new DateTime(2025, 4, 1, 15, 16, 7, 546, DateTimeKind.Utc).AddTicks(7926) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,69 +1,69 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend013 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "NFCActive",
table: "Users",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<string>(
name: "NFCCode",
table: "Users",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt", "NFCActive", "NFCCode" },
values: new object[] { new DateTime(2025, 4, 4, 10, 41, 46, 227, DateTimeKind.Utc).AddTicks(5578), new DateTime(2025, 4, 4, 10, 41, 46, 227, DateTimeKind.Utc).AddTicks(5580), true, "00000000" });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt", "NFCActive", "NFCCode" },
values: new object[] { new DateTime(2025, 4, 4, 10, 41, 46, 239, DateTimeKind.Utc).AddTicks(1896), new DateTime(2025, 4, 4, 10, 41, 46, 239, DateTimeKind.Utc).AddTicks(1897), true, "00000000" });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "NFCActive",
table: "Users");
migrationBuilder.DropColumn(
name: "NFCCode",
table: "Users");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 2, 8, 28, 48, 480, DateTimeKind.Utc).AddTicks(5537), new DateTime(2025, 4, 2, 8, 28, 48, 480, DateTimeKind.Utc).AddTicks(5540) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 2, 8, 28, 48, 491, DateTimeKind.Utc).AddTicks(9369), new DateTime(2025, 4, 2, 8, 28, 48, 491, DateTimeKind.Utc).AddTicks(9370) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend013 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "NFCActive",
table: "Users",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<string>(
name: "NFCCode",
table: "Users",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt", "NFCActive", "NFCCode" },
values: new object[] { new DateTime(2025, 4, 4, 10, 41, 46, 227, DateTimeKind.Utc).AddTicks(5578), new DateTime(2025, 4, 4, 10, 41, 46, 227, DateTimeKind.Utc).AddTicks(5580), true, "00000000" });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt", "NFCActive", "NFCCode" },
values: new object[] { new DateTime(2025, 4, 4, 10, 41, 46, 239, DateTimeKind.Utc).AddTicks(1896), new DateTime(2025, 4, 4, 10, 41, 46, 239, DateTimeKind.Utc).AddTicks(1897), true, "00000000" });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "NFCActive",
table: "Users");
migrationBuilder.DropColumn(
name: "NFCCode",
table: "Users");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 2, 8, 28, 48, 480, DateTimeKind.Utc).AddTicks(5537), new DateTime(2025, 4, 2, 8, 28, 48, 480, DateTimeKind.Utc).AddTicks(5540) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 2, 8, 28, 48, 491, DateTimeKind.Utc).AddTicks(9369), new DateTime(2025, 4, 2, 8, 28, 48, 491, DateTimeKind.Utc).AddTicks(9370) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,74 +1,74 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend014 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "DeviceMessage",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
SendDate = table.Column<DateTime>(type: "datetime2", nullable: false),
ReceiveDate = table.Column<DateTime>(type: "datetime2", nullable: true),
DeviceIdFrom = table.Column<string>(type: "nvarchar(max)", nullable: false),
DeviceIdTo = table.Column<string>(type: "nvarchar(450)", nullable: false),
Message = table.Column<string>(type: "nvarchar(max)", nullable: false),
ExtraDataJSON = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsReaded = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DeviceMessage", x => x.Id);
});
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 5, 12, 18, 54, 939, DateTimeKind.Utc).AddTicks(1707), new DateTime(2025, 4, 5, 12, 18, 54, 939, DateTimeKind.Utc).AddTicks(1709) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 5, 12, 18, 54, 949, DateTimeKind.Utc).AddTicks(6682), new DateTime(2025, 4, 5, 12, 18, 54, 949, DateTimeKind.Utc).AddTicks(6683) });
migrationBuilder.CreateIndex(
name: "IX_DeviceMessage_DeviceIdTo",
table: "DeviceMessage",
column: "DeviceIdTo");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "DeviceMessage");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 4, 10, 41, 46, 227, DateTimeKind.Utc).AddTicks(5578), new DateTime(2025, 4, 4, 10, 41, 46, 227, DateTimeKind.Utc).AddTicks(5580) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 4, 10, 41, 46, 239, DateTimeKind.Utc).AddTicks(1896), new DateTime(2025, 4, 4, 10, 41, 46, 239, DateTimeKind.Utc).AddTicks(1897) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend014 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "DeviceMessage",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
SendDate = table.Column<DateTime>(type: "datetime2", nullable: false),
ReceiveDate = table.Column<DateTime>(type: "datetime2", nullable: true),
DeviceIdFrom = table.Column<string>(type: "nvarchar(max)", nullable: false),
DeviceIdTo = table.Column<string>(type: "nvarchar(450)", nullable: false),
Message = table.Column<string>(type: "nvarchar(max)", nullable: false),
ExtraDataJSON = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsReaded = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DeviceMessage", x => x.Id);
});
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 5, 12, 18, 54, 939, DateTimeKind.Utc).AddTicks(1707), new DateTime(2025, 4, 5, 12, 18, 54, 939, DateTimeKind.Utc).AddTicks(1709) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 5, 12, 18, 54, 949, DateTimeKind.Utc).AddTicks(6682), new DateTime(2025, 4, 5, 12, 18, 54, 949, DateTimeKind.Utc).AddTicks(6683) });
migrationBuilder.CreateIndex(
name: "IX_DeviceMessage_DeviceIdTo",
table: "DeviceMessage",
column: "DeviceIdTo");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "DeviceMessage");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 4, 10, 41, 46, 227, DateTimeKind.Utc).AddTicks(5578), new DateTime(2025, 4, 4, 10, 41, 46, 227, DateTimeKind.Utc).AddTicks(5580) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 4, 10, 41, 46, 239, DateTimeKind.Utc).AddTicks(1896), new DateTime(2025, 4, 4, 10, 41, 46, 239, DateTimeKind.Utc).AddTicks(1897) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,111 +1,111 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend015 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "CanDownloadAPK",
table: "Roles",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "CanEnableBlocked",
table: "Roles",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "IsAdmin",
table: "Roles",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<int>(
name: "ParentId",
table: "Roles",
type: "int",
nullable: true);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 6, 11, 24, 45, 650, DateTimeKind.Utc).AddTicks(7691), new DateTime(2025, 4, 6, 11, 24, 45, 650, DateTimeKind.Utc).AddTicks(7694) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 6, 11, 24, 45, 661, DateTimeKind.Utc).AddTicks(5371), new DateTime(2025, 4, 6, 11, 24, 45, 661, DateTimeKind.Utc).AddTicks(5373) });
migrationBuilder.CreateIndex(
name: "IX_Roles_ParentId",
table: "Roles",
column: "ParentId");
migrationBuilder.AddForeignKey(
name: "FK_Roles_Roles_ParentId",
table: "Roles",
column: "ParentId",
principalTable: "Roles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Roles_Roles_ParentId",
table: "Roles");
migrationBuilder.DropIndex(
name: "IX_Roles_ParentId",
table: "Roles");
migrationBuilder.DropColumn(
name: "CanDownloadAPK",
table: "Roles");
migrationBuilder.DropColumn(
name: "CanEnableBlocked",
table: "Roles");
migrationBuilder.DropColumn(
name: "IsAdmin",
table: "Roles");
migrationBuilder.DropColumn(
name: "ParentId",
table: "Roles");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 5, 12, 18, 54, 939, DateTimeKind.Utc).AddTicks(1707), new DateTime(2025, 4, 5, 12, 18, 54, 939, DateTimeKind.Utc).AddTicks(1709) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 5, 12, 18, 54, 949, DateTimeKind.Utc).AddTicks(6682), new DateTime(2025, 4, 5, 12, 18, 54, 949, DateTimeKind.Utc).AddTicks(6683) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend015 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "CanDownloadAPK",
table: "Roles",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "CanEnableBlocked",
table: "Roles",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "IsAdmin",
table: "Roles",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<int>(
name: "ParentId",
table: "Roles",
type: "int",
nullable: true);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 6, 11, 24, 45, 650, DateTimeKind.Utc).AddTicks(7691), new DateTime(2025, 4, 6, 11, 24, 45, 650, DateTimeKind.Utc).AddTicks(7694) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 6, 11, 24, 45, 661, DateTimeKind.Utc).AddTicks(5371), new DateTime(2025, 4, 6, 11, 24, 45, 661, DateTimeKind.Utc).AddTicks(5373) });
migrationBuilder.CreateIndex(
name: "IX_Roles_ParentId",
table: "Roles",
column: "ParentId");
migrationBuilder.AddForeignKey(
name: "FK_Roles_Roles_ParentId",
table: "Roles",
column: "ParentId",
principalTable: "Roles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Roles_Roles_ParentId",
table: "Roles");
migrationBuilder.DropIndex(
name: "IX_Roles_ParentId",
table: "Roles");
migrationBuilder.DropColumn(
name: "CanDownloadAPK",
table: "Roles");
migrationBuilder.DropColumn(
name: "CanEnableBlocked",
table: "Roles");
migrationBuilder.DropColumn(
name: "IsAdmin",
table: "Roles");
migrationBuilder.DropColumn(
name: "ParentId",
table: "Roles");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 5, 12, 18, 54, 939, DateTimeKind.Utc).AddTicks(1707), new DateTime(2025, 4, 5, 12, 18, 54, 939, DateTimeKind.Utc).AddTicks(1709) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 5, 12, 18, 54, 949, DateTimeKind.Utc).AddTicks(6682), new DateTime(2025, 4, 5, 12, 18, 54, 949, DateTimeKind.Utc).AddTicks(6683) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,58 +1,58 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend016 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "RoleId",
table: "CheckPoint",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 6, 19, 24, 51, 944, DateTimeKind.Utc).AddTicks(2145), new DateTime(2025, 4, 6, 19, 24, 51, 944, DateTimeKind.Utc).AddTicks(2148) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 6, 19, 24, 51, 956, DateTimeKind.Utc).AddTicks(5191), new DateTime(2025, 4, 6, 19, 24, 51, 956, DateTimeKind.Utc).AddTicks(5194) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "RoleId",
table: "CheckPoint");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 6, 11, 24, 45, 650, DateTimeKind.Utc).AddTicks(7691), new DateTime(2025, 4, 6, 11, 24, 45, 650, DateTimeKind.Utc).AddTicks(7694) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 6, 11, 24, 45, 661, DateTimeKind.Utc).AddTicks(5371), new DateTime(2025, 4, 6, 11, 24, 45, 661, DateTimeKind.Utc).AddTicks(5373) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend016 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "RoleId",
table: "CheckPoint",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 6, 19, 24, 51, 944, DateTimeKind.Utc).AddTicks(2145), new DateTime(2025, 4, 6, 19, 24, 51, 944, DateTimeKind.Utc).AddTicks(2148) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 6, 19, 24, 51, 956, DateTimeKind.Utc).AddTicks(5191), new DateTime(2025, 4, 6, 19, 24, 51, 956, DateTimeKind.Utc).AddTicks(5194) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "RoleId",
table: "CheckPoint");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 6, 11, 24, 45, 650, DateTimeKind.Utc).AddTicks(7691), new DateTime(2025, 4, 6, 11, 24, 45, 650, DateTimeKind.Utc).AddTicks(7694) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 6, 11, 24, 45, 661, DateTimeKind.Utc).AddTicks(5371), new DateTime(2025, 4, 6, 11, 24, 45, 661, DateTimeKind.Utc).AddTicks(5373) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,77 +1,77 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend017 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "AcceptUserId",
table: "CheckListHeader",
type: "int",
nullable: true);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 6, 55, 14, 155, DateTimeKind.Utc).AddTicks(149), new DateTime(2025, 4, 8, 6, 55, 14, 155, DateTimeKind.Utc).AddTicks(150) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 6, 55, 14, 166, DateTimeKind.Utc).AddTicks(5847), new DateTime(2025, 4, 8, 6, 55, 14, 166, DateTimeKind.Utc).AddTicks(5849) });
migrationBuilder.CreateIndex(
name: "IX_CheckListHeader_AcceptUserId",
table: "CheckListHeader",
column: "AcceptUserId");
migrationBuilder.AddForeignKey(
name: "FK_CheckListHeader_Users_AcceptUserId",
table: "CheckListHeader",
column: "AcceptUserId",
principalTable: "Users",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_CheckListHeader_Users_AcceptUserId",
table: "CheckListHeader");
migrationBuilder.DropIndex(
name: "IX_CheckListHeader_AcceptUserId",
table: "CheckListHeader");
migrationBuilder.DropColumn(
name: "AcceptUserId",
table: "CheckListHeader");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 6, 19, 24, 51, 944, DateTimeKind.Utc).AddTicks(2145), new DateTime(2025, 4, 6, 19, 24, 51, 944, DateTimeKind.Utc).AddTicks(2148) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 6, 19, 24, 51, 956, DateTimeKind.Utc).AddTicks(5191), new DateTime(2025, 4, 6, 19, 24, 51, 956, DateTimeKind.Utc).AddTicks(5194) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend017 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "AcceptUserId",
table: "CheckListHeader",
type: "int",
nullable: true);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 6, 55, 14, 155, DateTimeKind.Utc).AddTicks(149), new DateTime(2025, 4, 8, 6, 55, 14, 155, DateTimeKind.Utc).AddTicks(150) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 6, 55, 14, 166, DateTimeKind.Utc).AddTicks(5847), new DateTime(2025, 4, 8, 6, 55, 14, 166, DateTimeKind.Utc).AddTicks(5849) });
migrationBuilder.CreateIndex(
name: "IX_CheckListHeader_AcceptUserId",
table: "CheckListHeader",
column: "AcceptUserId");
migrationBuilder.AddForeignKey(
name: "FK_CheckListHeader_Users_AcceptUserId",
table: "CheckListHeader",
column: "AcceptUserId",
principalTable: "Users",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_CheckListHeader_Users_AcceptUserId",
table: "CheckListHeader");
migrationBuilder.DropIndex(
name: "IX_CheckListHeader_AcceptUserId",
table: "CheckListHeader");
migrationBuilder.DropColumn(
name: "AcceptUserId",
table: "CheckListHeader");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 6, 19, 24, 51, 944, DateTimeKind.Utc).AddTicks(2145), new DateTime(2025, 4, 6, 19, 24, 51, 944, DateTimeKind.Utc).AddTicks(2148) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 6, 19, 24, 51, 956, DateTimeKind.Utc).AddTicks(5191), new DateTime(2025, 4, 6, 19, 24, 51, 956, DateTimeKind.Utc).AddTicks(5194) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,77 +1,77 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend018 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "RoleId",
table: "DeviceMessage",
type: "int",
nullable: true);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 7, 29, 26, 543, DateTimeKind.Utc).AddTicks(8649), new DateTime(2025, 4, 8, 7, 29, 26, 543, DateTimeKind.Utc).AddTicks(8652) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 7, 29, 26, 556, DateTimeKind.Utc).AddTicks(264), new DateTime(2025, 4, 8, 7, 29, 26, 556, DateTimeKind.Utc).AddTicks(270) });
migrationBuilder.CreateIndex(
name: "IX_DeviceMessage_RoleId",
table: "DeviceMessage",
column: "RoleId");
migrationBuilder.AddForeignKey(
name: "FK_DeviceMessage_Roles_RoleId",
table: "DeviceMessage",
column: "RoleId",
principalTable: "Roles",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_DeviceMessage_Roles_RoleId",
table: "DeviceMessage");
migrationBuilder.DropIndex(
name: "IX_DeviceMessage_RoleId",
table: "DeviceMessage");
migrationBuilder.DropColumn(
name: "RoleId",
table: "DeviceMessage");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 6, 55, 14, 155, DateTimeKind.Utc).AddTicks(149), new DateTime(2025, 4, 8, 6, 55, 14, 155, DateTimeKind.Utc).AddTicks(150) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 6, 55, 14, 166, DateTimeKind.Utc).AddTicks(5847), new DateTime(2025, 4, 8, 6, 55, 14, 166, DateTimeKind.Utc).AddTicks(5849) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend018 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "RoleId",
table: "DeviceMessage",
type: "int",
nullable: true);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 7, 29, 26, 543, DateTimeKind.Utc).AddTicks(8649), new DateTime(2025, 4, 8, 7, 29, 26, 543, DateTimeKind.Utc).AddTicks(8652) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 7, 29, 26, 556, DateTimeKind.Utc).AddTicks(264), new DateTime(2025, 4, 8, 7, 29, 26, 556, DateTimeKind.Utc).AddTicks(270) });
migrationBuilder.CreateIndex(
name: "IX_DeviceMessage_RoleId",
table: "DeviceMessage",
column: "RoleId");
migrationBuilder.AddForeignKey(
name: "FK_DeviceMessage_Roles_RoleId",
table: "DeviceMessage",
column: "RoleId",
principalTable: "Roles",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_DeviceMessage_Roles_RoleId",
table: "DeviceMessage");
migrationBuilder.DropIndex(
name: "IX_DeviceMessage_RoleId",
table: "DeviceMessage");
migrationBuilder.DropColumn(
name: "RoleId",
table: "DeviceMessage");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 6, 55, 14, 155, DateTimeKind.Utc).AddTicks(149), new DateTime(2025, 4, 8, 6, 55, 14, 155, DateTimeKind.Utc).AddTicks(150) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 6, 55, 14, 166, DateTimeKind.Utc).AddTicks(5847), new DateTime(2025, 4, 8, 6, 55, 14, 166, DateTimeKind.Utc).AddTicks(5849) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,70 +1,70 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend019 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_CheckListHeader_Users_AcceptUserId",
table: "CheckListHeader");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 10, 50, 38, 70, DateTimeKind.Utc).AddTicks(7907), new DateTime(2025, 4, 8, 10, 50, 38, 70, DateTimeKind.Utc).AddTicks(7910) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 10, 50, 38, 83, DateTimeKind.Utc).AddTicks(1759), new DateTime(2025, 4, 8, 10, 50, 38, 83, DateTimeKind.Utc).AddTicks(1761) });
migrationBuilder.AddForeignKey(
name: "FK_CheckListHeader_Users_AcceptUserId",
table: "CheckListHeader",
column: "AcceptUserId",
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_CheckListHeader_Users_AcceptUserId",
table: "CheckListHeader");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 7, 29, 26, 543, DateTimeKind.Utc).AddTicks(8649), new DateTime(2025, 4, 8, 7, 29, 26, 543, DateTimeKind.Utc).AddTicks(8652) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 7, 29, 26, 556, DateTimeKind.Utc).AddTicks(264), new DateTime(2025, 4, 8, 7, 29, 26, 556, DateTimeKind.Utc).AddTicks(270) });
migrationBuilder.AddForeignKey(
name: "FK_CheckListHeader_Users_AcceptUserId",
table: "CheckListHeader",
column: "AcceptUserId",
principalTable: "Users",
principalColumn: "Id");
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend019 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_CheckListHeader_Users_AcceptUserId",
table: "CheckListHeader");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 10, 50, 38, 70, DateTimeKind.Utc).AddTicks(7907), new DateTime(2025, 4, 8, 10, 50, 38, 70, DateTimeKind.Utc).AddTicks(7910) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 10, 50, 38, 83, DateTimeKind.Utc).AddTicks(1759), new DateTime(2025, 4, 8, 10, 50, 38, 83, DateTimeKind.Utc).AddTicks(1761) });
migrationBuilder.AddForeignKey(
name: "FK_CheckListHeader_Users_AcceptUserId",
table: "CheckListHeader",
column: "AcceptUserId",
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_CheckListHeader_Users_AcceptUserId",
table: "CheckListHeader");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 7, 29, 26, 543, DateTimeKind.Utc).AddTicks(8649), new DateTime(2025, 4, 8, 7, 29, 26, 543, DateTimeKind.Utc).AddTicks(8652) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 7, 29, 26, 556, DateTimeKind.Utc).AddTicks(264), new DateTime(2025, 4, 8, 7, 29, 26, 556, DateTimeKind.Utc).AddTicks(270) });
migrationBuilder.AddForeignKey(
name: "FK_CheckListHeader_Users_AcceptUserId",
table: "CheckListHeader",
column: "AcceptUserId",
principalTable: "Users",
principalColumn: "Id");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,69 +1,69 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend020 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "CanUseMobilApp",
table: "Roles",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "CanUseWebAdmin",
table: "Roles",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 10, 9, 50, 12, 488, DateTimeKind.Utc).AddTicks(1377), new DateTime(2025, 4, 10, 9, 50, 12, 488, DateTimeKind.Utc).AddTicks(1382) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 10, 9, 50, 12, 499, DateTimeKind.Utc).AddTicks(4095), new DateTime(2025, 4, 10, 9, 50, 12, 499, DateTimeKind.Utc).AddTicks(4096) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CanUseMobilApp",
table: "Roles");
migrationBuilder.DropColumn(
name: "CanUseWebAdmin",
table: "Roles");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 10, 50, 38, 70, DateTimeKind.Utc).AddTicks(7907), new DateTime(2025, 4, 8, 10, 50, 38, 70, DateTimeKind.Utc).AddTicks(7910) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 10, 50, 38, 83, DateTimeKind.Utc).AddTicks(1759), new DateTime(2025, 4, 8, 10, 50, 38, 83, DateTimeKind.Utc).AddTicks(1761) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend020 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "CanUseMobilApp",
table: "Roles",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "CanUseWebAdmin",
table: "Roles",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 10, 9, 50, 12, 488, DateTimeKind.Utc).AddTicks(1377), new DateTime(2025, 4, 10, 9, 50, 12, 488, DateTimeKind.Utc).AddTicks(1382) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 10, 9, 50, 12, 499, DateTimeKind.Utc).AddTicks(4095), new DateTime(2025, 4, 10, 9, 50, 12, 499, DateTimeKind.Utc).AddTicks(4096) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CanUseMobilApp",
table: "Roles");
migrationBuilder.DropColumn(
name: "CanUseWebAdmin",
table: "Roles");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 10, 50, 38, 70, DateTimeKind.Utc).AddTicks(7907), new DateTime(2025, 4, 8, 10, 50, 38, 70, DateTimeKind.Utc).AddTicks(7910) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 8, 10, 50, 38, 83, DateTimeKind.Utc).AddTicks(1759), new DateTime(2025, 4, 8, 10, 50, 38, 83, DateTimeKind.Utc).AddTicks(1761) });
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,68 +1,68 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend021 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "FCMToken",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Token = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_FCMToken", x => x.Id);
});
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 5, 15, 12, 36, 12, 645, DateTimeKind.Utc).AddTicks(5079), new DateTime(2025, 5, 15, 12, 36, 12, 645, DateTimeKind.Utc).AddTicks(5082) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 5, 15, 12, 36, 12, 656, DateTimeKind.Utc).AddTicks(8830), new DateTime(2025, 5, 15, 12, 36, 12, 656, DateTimeKind.Utc).AddTicks(8834) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "FCMToken");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 10, 9, 50, 12, 488, DateTimeKind.Utc).AddTicks(1377), new DateTime(2025, 4, 10, 9, 50, 12, 488, DateTimeKind.Utc).AddTicks(1382) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 10, 9, 50, 12, 499, DateTimeKind.Utc).AddTicks(4095), new DateTime(2025, 4, 10, 9, 50, 12, 499, DateTimeKind.Utc).AddTicks(4096) });
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WorkFlowCheck.DL.Migrations
{
/// <inheritdoc />
public partial class Extend021 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "FCMToken",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Token = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
LastModAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModBy = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_FCMToken", x => x.Id);
});
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 5, 15, 12, 36, 12, 645, DateTimeKind.Utc).AddTicks(5079), new DateTime(2025, 5, 15, 12, 36, 12, 645, DateTimeKind.Utc).AddTicks(5082) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 5, 15, 12, 36, 12, 656, DateTimeKind.Utc).AddTicks(8830), new DateTime(2025, 5, 15, 12, 36, 12, 656, DateTimeKind.Utc).AddTicks(8834) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "FCMToken");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 10, 9, 50, 12, 488, DateTimeKind.Utc).AddTicks(1377), new DateTime(2025, 4, 10, 9, 50, 12, 488, DateTimeKind.Utc).AddTicks(1382) });
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedAt", "LastModAt" },
values: new object[] { new DateTime(2025, 4, 10, 9, 50, 12, 499, DateTimeKind.Utc).AddTicks(4095), new DateTime(2025, 4, 10, 9, 50, 12, 499, DateTimeKind.Utc).AddTicks(4096) });
}
}
}
File diff suppressed because it is too large Load Diff
+23 -23
View File
@@ -1,23 +1,23 @@
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.Common.Security;
namespace WorkFlowCheck.DL.Seed
{
public static class DBInitializer
{
public static void Seed(AppDbContext dbContext)
{
var user = dbContext.Users.Where(w => w.Email == "info@wfcapi.hu").FirstOrDefault();
if (user != null && user.PasswordHash == null)
{
user.PasswordHash = PasswordHasher.HashPassword("861354");
dbContext.SaveChanges();
}
}
}
}
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.Common.Security;
namespace WorkFlowCheck.DL.Seed
{
public static class DBInitializer
{
public static void Seed(AppDbContext dbContext)
{
var user = dbContext.Users.Where(w => w.Email == "info@wfcapi.hu").FirstOrDefault();
if (user != null && user.PasswordHash == null)
{
user.PasswordHash = PasswordHasher.HashPassword("861354");
dbContext.SaveChanges();
}
}
}
}
+22 -22
View File
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.12">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WorkFlowCheck.Common\WorkFlowCheck.Common.csproj" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.12">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WorkFlowCheck.Common\WorkFlowCheck.Common.csproj" />
</ItemGroup>
</Project>