Elég sok minden ...
This commit is contained in:
@@ -158,6 +158,21 @@ namespace WorkFlowCheck.DL
|
||||
Token2FA = ""
|
||||
}
|
||||
);
|
||||
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 = "-",
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +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; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +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; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,744 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using WorkFlowCheck.DL;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WorkFlowCheck.DL.Migrations
|
||||
{
|
||||
[DbContext(typeof(AppDbContext))]
|
||||
[Migration("20250319132531_Extend005")]
|
||||
partial class Extend005
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "8.0.12")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListHeader", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("CheckListTemplateHeaderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DocumentNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<Guid>("GuidNumber")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsStorno")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("LastModAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("LastModBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ShortName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CheckListTemplateHeaderId");
|
||||
|
||||
b.ToTable("CheckListHeader", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListRow", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Answer")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("CheckListHeaderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("CheckListTemplateRowId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<Guid>("GuidNumber")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("LastModAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("LastModBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<byte[]>("Photo")
|
||||
.IsRequired()
|
||||
.HasColumnType("varbinary(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CheckListHeaderId");
|
||||
|
||||
b.HasIndex("CheckListTemplateRowId");
|
||||
|
||||
b.ToTable("CheckListRow", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListTemplateHeader", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("LastModAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("LastModBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ShortName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("CheckListTemplateHeader", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListTemplateRow", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("AnswerType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("CheckListTemplateHeaderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("CheckPointId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("EquipmentId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("LastModAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("LastModBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OperationDescription")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("RowIndex")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CheckListTemplateHeaderId");
|
||||
|
||||
b.HasIndex("CheckPointId");
|
||||
|
||||
b.HasIndex("EquipmentId");
|
||||
|
||||
b.ToTable("CheckListTemplateRow", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckPoint", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Code")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("LastModAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("LastModBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ShortName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("CheckPoint", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.Equipment", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("EquipmentNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("LastModAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("LastModBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ShortName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Equipment", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.Location", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("LastModAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("LastModBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Location", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.NumberGeneratorTemplate", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("CurrentNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("DigitFormat")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("GenerateType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("LastGeneratedNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Prefix")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PrefixSeparator")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ShortName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Suffix")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SuffixSeparator")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("NumberGeneratorTemplate");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
CurrentNumber = 0,
|
||||
DigitFormat = "D4",
|
||||
GenerateType = 0,
|
||||
LastGeneratedNumber = "",
|
||||
Prefix = "CHK",
|
||||
PrefixSeparator = "-",
|
||||
ShortName = "Ellenőrzési dokumentum sorszámozása",
|
||||
Suffix = "",
|
||||
SuffixSeparator = "-"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.NumberGeneratorTemplateDate", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("CurrentNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("LastGeneratedNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int?>("Month")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumberGeneratorTemplateId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Year")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NumberGeneratorTemplateId");
|
||||
|
||||
b.ToTable("NumberGeneratorTemplateDate");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.Role", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("LastModAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("LastModBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("RoleName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Roles", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.RoleCheckListTemplateHeader", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("CheckListTemplateHeaderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Enabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("RoleId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CheckListTemplateHeaderId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("RoleCheckListTemplateHeader", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("JwtToken")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("LastModAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("LastModBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PasswordHash")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Token2FA")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users", (string)null);
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
Active = true,
|
||||
CreatedAt = new DateTime(2025, 3, 19, 13, 25, 30, 814, DateTimeKind.Utc).AddTicks(9821),
|
||||
CreatedBy = "System",
|
||||
Email = "admin@nuvolar.hu",
|
||||
FirstName = "Administrator",
|
||||
IsDeleted = false,
|
||||
JwtToken = "",
|
||||
LastModAt = new DateTime(2025, 3, 19, 13, 25, 30, 814, DateTimeKind.Utc).AddTicks(9825),
|
||||
LastModBy = "System",
|
||||
LastName = "System",
|
||||
PasswordHash = "eGM0NUREZnJ0ISFFRDIxMKE5TYwthDBuUsTUEO1fBnCR3VdSCmdz47ue0RoVvnkY",
|
||||
Token2FA = "",
|
||||
UserName = "admin"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 2,
|
||||
Active = true,
|
||||
CreatedAt = new DateTime(2025, 3, 19, 13, 25, 30, 829, DateTimeKind.Utc).AddTicks(5779),
|
||||
CreatedBy = "System",
|
||||
Email = "user@nuvolar.hu",
|
||||
FirstName = "User",
|
||||
IsDeleted = false,
|
||||
JwtToken = "",
|
||||
LastModAt = new DateTime(2025, 3, 19, 13, 25, 30, 829, DateTimeKind.Utc).AddTicks(5783),
|
||||
LastModBy = "System",
|
||||
LastName = "System",
|
||||
PasswordHash = "eGM0NUREZnJ0ISFFRDIxMPwM2D9sQSj7zmaSBIsOGe0I9hBFwCGPVbyrYMA5EnKG",
|
||||
Token2FA = "",
|
||||
UserName = "user"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.UserRole", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("RoleId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("UserRoles", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListHeader", b =>
|
||||
{
|
||||
b.HasOne("WorkFlowCheck.DL.Entities.CheckListTemplateHeader", "CheckListTemplateHeader")
|
||||
.WithMany()
|
||||
.HasForeignKey("CheckListTemplateHeaderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CheckListTemplateHeader");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListRow", b =>
|
||||
{
|
||||
b.HasOne("WorkFlowCheck.DL.Entities.CheckListHeader", "CheckListHeader")
|
||||
.WithMany("CheckListRows")
|
||||
.HasForeignKey("CheckListHeaderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WorkFlowCheck.DL.Entities.CheckListTemplateRow", "CheckListTemplateRow")
|
||||
.WithMany()
|
||||
.HasForeignKey("CheckListTemplateRowId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CheckListHeader");
|
||||
|
||||
b.Navigation("CheckListTemplateRow");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListTemplateRow", b =>
|
||||
{
|
||||
b.HasOne("WorkFlowCheck.DL.Entities.CheckListTemplateHeader", "CheckListTemplateHeader")
|
||||
.WithMany("CheckListTemplateRows")
|
||||
.HasForeignKey("CheckListTemplateHeaderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WorkFlowCheck.DL.Entities.CheckPoint", "CheckPoint")
|
||||
.WithMany("CheckListTemplateRows")
|
||||
.HasForeignKey("CheckPointId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WorkFlowCheck.DL.Entities.Equipment", "Equipment")
|
||||
.WithMany()
|
||||
.HasForeignKey("EquipmentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CheckListTemplateHeader");
|
||||
|
||||
b.Navigation("CheckPoint");
|
||||
|
||||
b.Navigation("Equipment");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.NumberGeneratorTemplateDate", b =>
|
||||
{
|
||||
b.HasOne("WorkFlowCheck.DL.Entities.NumberGeneratorTemplate", "NumberGeneratorTemplate")
|
||||
.WithMany("NumberGeneratorTemplateDates")
|
||||
.HasForeignKey("NumberGeneratorTemplateId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("NumberGeneratorTemplate");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.RoleCheckListTemplateHeader", b =>
|
||||
{
|
||||
b.HasOne("WorkFlowCheck.DL.Entities.CheckListTemplateHeader", "CheckListTemplateHeader")
|
||||
.WithMany()
|
||||
.HasForeignKey("CheckListTemplateHeaderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WorkFlowCheck.DL.Entities.Role", "Role")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CheckListTemplateHeader");
|
||||
|
||||
b.Navigation("Role");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.UserRole", b =>
|
||||
{
|
||||
b.HasOne("WorkFlowCheck.DL.Entities.Role", "Role")
|
||||
.WithMany("UserRoles")
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("WorkFlowCheck.DL.Entities.User", "User")
|
||||
.WithMany("UserRoles")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Role");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListHeader", b =>
|
||||
{
|
||||
b.Navigation("CheckListRows");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListTemplateHeader", b =>
|
||||
{
|
||||
b.Navigation("CheckListTemplateRows");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckPoint", b =>
|
||||
{
|
||||
b.Navigation("CheckListTemplateRows");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.NumberGeneratorTemplate", b =>
|
||||
{
|
||||
b.Navigation("NumberGeneratorTemplateDates");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.Role", b =>
|
||||
{
|
||||
b.Navigation("UserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.User", b =>
|
||||
{
|
||||
b.Navigation("UserRoles");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +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) });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -330,6 +330,99 @@ namespace WorkFlowCheck.DL.Migrations
|
||||
b.ToTable("Location", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.NumberGeneratorTemplate", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("CurrentNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("DigitFormat")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("GenerateType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("LastGeneratedNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Prefix")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PrefixSeparator")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ShortName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Suffix")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SuffixSeparator")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("NumberGeneratorTemplate");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
CurrentNumber = 0,
|
||||
DigitFormat = "D4",
|
||||
GenerateType = 0,
|
||||
LastGeneratedNumber = "",
|
||||
Prefix = "CHK",
|
||||
PrefixSeparator = "-",
|
||||
ShortName = "Ellenőrzési dokumentum sorszámozása",
|
||||
Suffix = "",
|
||||
SuffixSeparator = "-"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.NumberGeneratorTemplateDate", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("CurrentNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("LastGeneratedNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int?>("Month")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumberGeneratorTemplateId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Year")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NumberGeneratorTemplateId");
|
||||
|
||||
b.ToTable("NumberGeneratorTemplateDate");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.Role", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -454,13 +547,13 @@ namespace WorkFlowCheck.DL.Migrations
|
||||
{
|
||||
Id = 1,
|
||||
Active = true,
|
||||
CreatedAt = new DateTime(2025, 3, 18, 10, 48, 13, 634, DateTimeKind.Utc).AddTicks(7867),
|
||||
CreatedAt = new DateTime(2025, 3, 19, 13, 25, 30, 814, DateTimeKind.Utc).AddTicks(9821),
|
||||
CreatedBy = "System",
|
||||
Email = "admin@nuvolar.hu",
|
||||
FirstName = "Administrator",
|
||||
IsDeleted = false,
|
||||
JwtToken = "",
|
||||
LastModAt = new DateTime(2025, 3, 18, 10, 48, 13, 634, DateTimeKind.Utc).AddTicks(7870),
|
||||
LastModAt = new DateTime(2025, 3, 19, 13, 25, 30, 814, DateTimeKind.Utc).AddTicks(9825),
|
||||
LastModBy = "System",
|
||||
LastName = "System",
|
||||
PasswordHash = "eGM0NUREZnJ0ISFFRDIxMKE5TYwthDBuUsTUEO1fBnCR3VdSCmdz47ue0RoVvnkY",
|
||||
@@ -471,13 +564,13 @@ namespace WorkFlowCheck.DL.Migrations
|
||||
{
|
||||
Id = 2,
|
||||
Active = true,
|
||||
CreatedAt = new DateTime(2025, 3, 18, 10, 48, 13, 645, DateTimeKind.Utc).AddTicks(9210),
|
||||
CreatedAt = new DateTime(2025, 3, 19, 13, 25, 30, 829, DateTimeKind.Utc).AddTicks(5779),
|
||||
CreatedBy = "System",
|
||||
Email = "user@nuvolar.hu",
|
||||
FirstName = "User",
|
||||
IsDeleted = false,
|
||||
JwtToken = "",
|
||||
LastModAt = new DateTime(2025, 3, 18, 10, 48, 13, 645, DateTimeKind.Utc).AddTicks(9212),
|
||||
LastModAt = new DateTime(2025, 3, 19, 13, 25, 30, 829, DateTimeKind.Utc).AddTicks(5783),
|
||||
LastModBy = "System",
|
||||
LastName = "System",
|
||||
PasswordHash = "eGM0NUREZnJ0ISFFRDIxMPwM2D9sQSj7zmaSBIsOGe0I9hBFwCGPVbyrYMA5EnKG",
|
||||
@@ -566,6 +659,17 @@ namespace WorkFlowCheck.DL.Migrations
|
||||
b.Navigation("Equipment");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.NumberGeneratorTemplateDate", b =>
|
||||
{
|
||||
b.HasOne("WorkFlowCheck.DL.Entities.NumberGeneratorTemplate", "NumberGeneratorTemplate")
|
||||
.WithMany("NumberGeneratorTemplateDates")
|
||||
.HasForeignKey("NumberGeneratorTemplateId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("NumberGeneratorTemplate");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.RoleCheckListTemplateHeader", b =>
|
||||
{
|
||||
b.HasOne("WorkFlowCheck.DL.Entities.CheckListTemplateHeader", "CheckListTemplateHeader")
|
||||
@@ -617,6 +721,11 @@ namespace WorkFlowCheck.DL.Migrations
|
||||
b.Navigation("CheckListTemplateRows");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.NumberGeneratorTemplate", b =>
|
||||
{
|
||||
b.Navigation("NumberGeneratorTemplateDates");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.Role", b =>
|
||||
{
|
||||
b.Navigation("UserRoles");
|
||||
|
||||
Reference in New Issue
Block a user