Merge branch 'master' of https://tfs.nuvolar.hu:8443/tfs/AtomERP/_git/WorkFlowCheck
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
using System.Text;
|
||||||
using WorkFlowCheck.BL.Services;
|
using WorkFlowCheck.BL.Services;
|
||||||
using WorkFlowCheck.BL.Services.Interfaces;
|
using WorkFlowCheck.BL.Services.Interfaces;
|
||||||
using WorkFlowCheck.Common.DTO;
|
using WorkFlowCheck.Common.DTO;
|
||||||
@@ -410,6 +411,56 @@ namespace WorkFlowCheck.API.Controllers
|
|||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[HttpPost("DeviceMessageSend")]
|
||||||
|
public async Task<ApiResponseDTO<bool>> DeviceMessageSend([FromBody] DeviceMessageDTO deviceMessageDTO)
|
||||||
|
{
|
||||||
|
var retVal = new ApiResponseDTO<bool>()
|
||||||
|
{
|
||||||
|
IsSuccess = true
|
||||||
|
};
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var result = await _syncService.DeviceMessageSend(deviceMessageDTO);
|
||||||
|
retVal.Data = true;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
retVal.IsSuccess = false;
|
||||||
|
retVal.Errors.Add(ex.Message);
|
||||||
|
Log.Error(ex.Message);
|
||||||
|
}
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet("DeviceMessageReadUnreaded/{deviceIdBase64}")]
|
||||||
|
public async Task<ApiResponseDTO<List<DeviceMessageDTO>>> DeviceMessageReadUnreaded(string deviceIdBase64)
|
||||||
|
{
|
||||||
|
var retVal = new ApiResponseDTO<List<DeviceMessageDTO>>()
|
||||||
|
{
|
||||||
|
IsSuccess = true,
|
||||||
|
};
|
||||||
|
|
||||||
|
byte[] byteArray = Convert.FromBase64String(deviceIdBase64);
|
||||||
|
string deviceId = Encoding.UTF8.GetString(byteArray);
|
||||||
|
|
||||||
|
|
||||||
|
var response = await _syncService.DeviceMessageReadUnreaded(deviceId);
|
||||||
|
|
||||||
|
if (response != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
retVal.IsSuccess = true;
|
||||||
|
retVal.Data = response;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
retVal.IsSuccess = false;
|
||||||
|
retVal.Errors.Add("No data!");
|
||||||
|
}
|
||||||
|
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,9 @@ namespace WorkFlowCheck.BL.Mappings
|
|||||||
CreateMap<Equipment, EquipmentDTO>();
|
CreateMap<Equipment, EquipmentDTO>();
|
||||||
CreateMap<EquipmentDTO, Equipment>();
|
CreateMap<EquipmentDTO, Equipment>();
|
||||||
|
|
||||||
|
CreateMap<DeviceMessage, DeviceMessageDTO>();
|
||||||
|
CreateMap<DeviceMessageDTO, DeviceMessage>();
|
||||||
|
|
||||||
CreateMap<CheckListHeader, CheckListHeaderDTO>()
|
CreateMap<CheckListHeader, CheckListHeaderDTO>()
|
||||||
.ForMember(dest => dest.UserDTO, opt => opt.MapFrom(src => src.User))
|
.ForMember(dest => dest.UserDTO, opt => opt.MapFrom(src => src.User))
|
||||||
.ForMember(dest => dest.CheckListRowDTO, opt => opt.MapFrom(src => src.CheckListRows));
|
.ForMember(dest => dest.CheckListRowDTO, opt => opt.MapFrom(src => src.CheckListRows));
|
||||||
|
|||||||
@@ -24,5 +24,7 @@ namespace WorkFlowCheck.BL.Services.Interfaces
|
|||||||
|
|
||||||
|
|
||||||
Task<byte[]> CreatePDF(int checkListHeaderId);
|
Task<byte[]> CreatePDF(int checkListHeaderId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,5 +28,8 @@ namespace WorkFlowCheck.BL.Services.Interfaces
|
|||||||
Task<List<CheckListHeaderDTO>> GetAllCheckListAsync(int userId);
|
Task<List<CheckListHeaderDTO>> GetAllCheckListAsync(int userId);
|
||||||
|
|
||||||
Task<CheckListHeaderDTO> UpdateCheckListHeaderAsync(CheckListHeaderDTO checkListHeaderDTO);
|
Task<CheckListHeaderDTO> UpdateCheckListHeaderAsync(CheckListHeaderDTO checkListHeaderDTO);
|
||||||
|
|
||||||
|
Task<bool> DeviceMessageSend(DeviceMessageDTO deviceMessageDTO);
|
||||||
|
Task<List<DeviceMessageDTO>> DeviceMessageReadUnreaded(string deviceId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using DocumentFormat.OpenXml.InkML;
|
using DocumentFormat.OpenXml.InkML;
|
||||||
|
using DocumentFormat.OpenXml.Spreadsheet;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -172,7 +173,7 @@ namespace WorkFlowCheck.BL.Services
|
|||||||
}
|
}
|
||||||
public async Task<bool> DeleteLocationAsync(int id)
|
public async Task<bool> DeleteLocationAsync(int id)
|
||||||
{
|
{
|
||||||
return await DeleteEntityByIdAsync<Location>(id);
|
return await DeleteEntityByIdAsync<DL.Entities.Location>(id);
|
||||||
}
|
}
|
||||||
public async Task<LocationDTO> UpdateLocationAsync(LocationDTO LocationDTO)
|
public async Task<LocationDTO> UpdateLocationAsync(LocationDTO LocationDTO)
|
||||||
{
|
{
|
||||||
@@ -182,7 +183,7 @@ namespace WorkFlowCheck.BL.Services
|
|||||||
{
|
{
|
||||||
if (LocationDTO.Id == 0) //Hozzáadás, ha Id == 0
|
if (LocationDTO.Id == 0) //Hozzáadás, ha Id == 0
|
||||||
{
|
{
|
||||||
var Location = _mapper.Map<Location>(LocationDTO);
|
var Location = _mapper.Map<DL.Entities.Location>(LocationDTO);
|
||||||
_dbContext.Locations.Add(Location);
|
_dbContext.Locations.Add(Location);
|
||||||
await _dbContext.SaveChangesAsync();
|
await _dbContext.SaveChangesAsync();
|
||||||
|
|
||||||
@@ -193,7 +194,7 @@ namespace WorkFlowCheck.BL.Services
|
|||||||
var res = await _dbContext.Locations.Where(w => w.Id == LocationDTO.Id).FirstOrDefaultAsync();
|
var res = await _dbContext.Locations.Where(w => w.Id == LocationDTO.Id).FirstOrDefaultAsync();
|
||||||
if (res != null)
|
if (res != null)
|
||||||
{
|
{
|
||||||
res = _mapper.Map<Location>(LocationDTO);
|
res = _mapper.Map<DL.Entities.Location>(LocationDTO);
|
||||||
|
|
||||||
await _dbContext.SaveChangesAsync();
|
await _dbContext.SaveChangesAsync();
|
||||||
|
|
||||||
@@ -408,5 +409,51 @@ namespace WorkFlowCheck.BL.Services
|
|||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public async Task<bool> DeviceMessageSend(DeviceMessageDTO deviceMessageDTO)
|
||||||
|
{
|
||||||
|
var retVal = false;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var deviceMessage = _mapper.Map<DeviceMessage>(deviceMessageDTO);
|
||||||
|
deviceMessage.SendDate = DateTime.UtcNow;
|
||||||
|
deviceMessage.IsReaded = false;
|
||||||
|
_dbContext.DeviceMessages.Add(deviceMessage);
|
||||||
|
await _dbContext.SaveChangesAsync(true);
|
||||||
|
retVal = true;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.Error(ex.Message);
|
||||||
|
}
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
public async Task<List<DeviceMessageDTO>> DeviceMessageReadUnreaded(string deviceId)
|
||||||
|
{
|
||||||
|
var retVal = new List<DeviceMessageDTO>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var res = await _dbContext.DeviceMessages
|
||||||
|
.Where(w => w.DeviceIdTo == deviceId && w.IsReaded != true)
|
||||||
|
.ToListAsync();
|
||||||
|
|
||||||
|
if (res != null)
|
||||||
|
{
|
||||||
|
retVal = _mapper.Map<List<DeviceMessageDTO>>(res);
|
||||||
|
foreach (var deviceMessage in res)
|
||||||
|
{
|
||||||
|
deviceMessage.IsReaded = true;
|
||||||
|
deviceMessage.ReceiveDate = DateTime.UtcNow;
|
||||||
|
}
|
||||||
|
await _dbContext.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.Error(ex.Message);
|
||||||
|
}
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace WorkFlowCheck.Common.DTO
|
||||||
|
{
|
||||||
|
public class DeviceMessageDTO
|
||||||
|
{
|
||||||
|
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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,14 @@
|
|||||||
namespace WorkFlowCheck.Common.DTO
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
|
namespace WorkFlowCheck.Common.DTO
|
||||||
{
|
{
|
||||||
public class RoleDTO
|
public class RoleDTO
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "A szabály megnevezésének megadása kötelező.")]
|
||||||
|
[DisplayName("Megnevezés")]
|
||||||
public string RoleName { get; set; } = null!;
|
public string RoleName { get; set; } = null!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ namespace WorkFlowCheck.DL
|
|||||||
public DbSet<Entities.CheckListTemplateHeader> CheckListTemplateHeaders { get; set; } = null!;
|
public DbSet<Entities.CheckListTemplateHeader> CheckListTemplateHeaders { get; set; } = null!;
|
||||||
public DbSet<Entities.CheckListTemplateRow> CheckListTemplateRows { get; set; } = null!;
|
public DbSet<Entities.CheckListTemplateRow> CheckListTemplateRows { get; set; } = null!;
|
||||||
public DbSet<Entities.CheckPoint> CheckPoints { 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.Equipment> Equipments { get; set; } = null!;
|
||||||
public DbSet<Entities.Location> Locations { get; set; } = null!;
|
public DbSet<Entities.Location> Locations { get; set; } = null!;
|
||||||
public DbSet<Entities.NumberGeneratorTemplate> NumberGeneratorTemplates { get; set; } = null!;
|
public DbSet<Entities.NumberGeneratorTemplate> NumberGeneratorTemplates { get; set; } = null!;
|
||||||
@@ -45,6 +46,7 @@ namespace WorkFlowCheck.DL
|
|||||||
modelBuilder.ApplyConfiguration(new CheckListTemplateHeaderTypeConfiguration());
|
modelBuilder.ApplyConfiguration(new CheckListTemplateHeaderTypeConfiguration());
|
||||||
modelBuilder.ApplyConfiguration(new CheckListTemplateRowTypeConfiguration());
|
modelBuilder.ApplyConfiguration(new CheckListTemplateRowTypeConfiguration());
|
||||||
modelBuilder.ApplyConfiguration(new CheckPointTypeConfiguration());
|
modelBuilder.ApplyConfiguration(new CheckPointTypeConfiguration());
|
||||||
|
modelBuilder.ApplyConfiguration(new DeviceMessageTypeConfiguration());
|
||||||
modelBuilder.ApplyConfiguration(new EquipmentTypeConfiguration());
|
modelBuilder.ApplyConfiguration(new EquipmentTypeConfiguration());
|
||||||
modelBuilder.ApplyConfiguration(new LocationTypeConfiguration());
|
modelBuilder.ApplyConfiguration(new LocationTypeConfiguration());
|
||||||
modelBuilder.ApplyConfiguration(new NumberGeneratorTypeConfiguration());
|
modelBuilder.ApplyConfiguration(new NumberGeneratorTypeConfiguration());
|
||||||
|
|||||||
@@ -0,0 +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");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
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; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,902 @@
|
|||||||
|
// <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("20250405121855_Extend014")]
|
||||||
|
partial class Extend014
|
||||||
|
{
|
||||||
|
/// <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<int>("CheckStatus")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreatedAt")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("CreatedBy")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DateExecution")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
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>("IsEditable")
|
||||||
|
.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.Property<int>("UserId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("CheckListTemplateHeaderId");
|
||||||
|
|
||||||
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
|
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<string>("PhotoFileName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(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<int?>("NumberGenerator1Id")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int?>("NumberGenerator2Id")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("ShortName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("NumberGenerator1Id");
|
||||||
|
|
||||||
|
b.HasIndex("NumberGenerator2Id");
|
||||||
|
|
||||||
|
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<bool>("IsEnabled")
|
||||||
|
.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.DeviceMessage", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("DeviceIdFrom")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("DeviceIdTo")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(450)");
|
||||||
|
|
||||||
|
b.Property<string>("ExtraDataJSON")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsReaded")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Message")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("ReceiveDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("SendDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("DeviceIdTo")
|
||||||
|
.HasDatabaseName("IX_DeviceMessage_DeviceIdTo");
|
||||||
|
|
||||||
|
b.ToTable("DeviceMessage", (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", (string)null);
|
||||||
|
|
||||||
|
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", (string)null);
|
||||||
|
|
||||||
|
b.HasData(
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 1,
|
||||||
|
CurrentNumber = 0,
|
||||||
|
LastGeneratedNumber = "",
|
||||||
|
Month = 0,
|
||||||
|
NumberGeneratorTemplateId = 1,
|
||||||
|
Year = 1
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
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.RoleCheckPoint", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("CheckPointId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<bool>("Enabled")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<int>("RoleId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("CheckPointId");
|
||||||
|
|
||||||
|
b.HasIndex("RoleId");
|
||||||
|
|
||||||
|
b.ToTable("RoleCheckPoint", (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<bool>("NFCActive")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("NFCCode")
|
||||||
|
.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, 4, 5, 12, 18, 54, 939, DateTimeKind.Utc).AddTicks(1707),
|
||||||
|
CreatedBy = "System",
|
||||||
|
Email = "admin@nuvolar.hu",
|
||||||
|
FirstName = "Administrator",
|
||||||
|
IsDeleted = false,
|
||||||
|
JwtToken = "",
|
||||||
|
LastModAt = new DateTime(2025, 4, 5, 12, 18, 54, 939, DateTimeKind.Utc).AddTicks(1709),
|
||||||
|
LastModBy = "System",
|
||||||
|
LastName = "System",
|
||||||
|
NFCActive = true,
|
||||||
|
NFCCode = "00000000",
|
||||||
|
PasswordHash = "eGM0NUREZnJ0ISFFRDIxMKE5TYwthDBuUsTUEO1fBnCR3VdSCmdz47ue0RoVvnkY",
|
||||||
|
Token2FA = "",
|
||||||
|
UserName = "admin"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 2,
|
||||||
|
Active = true,
|
||||||
|
CreatedAt = new DateTime(2025, 4, 5, 12, 18, 54, 949, DateTimeKind.Utc).AddTicks(6682),
|
||||||
|
CreatedBy = "System",
|
||||||
|
Email = "user@nuvolar.hu",
|
||||||
|
FirstName = "User",
|
||||||
|
IsDeleted = false,
|
||||||
|
JwtToken = "",
|
||||||
|
LastModAt = new DateTime(2025, 4, 5, 12, 18, 54, 949, DateTimeKind.Utc).AddTicks(6683),
|
||||||
|
LastModBy = "System",
|
||||||
|
LastName = "System",
|
||||||
|
NFCActive = true,
|
||||||
|
NFCCode = "00000000",
|
||||||
|
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.HasOne("WorkFlowCheck.DL.Entities.User", "User")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("CheckListTemplateHeader");
|
||||||
|
|
||||||
|
b.Navigation("User");
|
||||||
|
});
|
||||||
|
|
||||||
|
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.CheckListTemplateHeader", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("WorkFlowCheck.DL.Entities.NumberGeneratorTemplate", "NumberGenerator1")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("NumberGenerator1Id");
|
||||||
|
|
||||||
|
b.HasOne("WorkFlowCheck.DL.Entities.NumberGeneratorTemplate", "NumberGenerator2")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("NumberGenerator2Id");
|
||||||
|
|
||||||
|
b.Navigation("NumberGenerator1");
|
||||||
|
|
||||||
|
b.Navigation("NumberGenerator2");
|
||||||
|
});
|
||||||
|
|
||||||
|
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.RoleCheckPoint", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("WorkFlowCheck.DL.Entities.CheckPoint", "CheckPoint")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("CheckPointId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("WorkFlowCheck.DL.Entities.Role", "Role")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("RoleId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("CheckPoint");
|
||||||
|
|
||||||
|
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,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) });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -285,6 +285,47 @@ namespace WorkFlowCheck.DL.Migrations
|
|||||||
b.ToTable("CheckPoint", (string)null);
|
b.ToTable("CheckPoint", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("WorkFlowCheck.DL.Entities.DeviceMessage", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("DeviceIdFrom")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("DeviceIdTo")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(450)");
|
||||||
|
|
||||||
|
b.Property<string>("ExtraDataJSON")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsReaded")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Message")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("ReceiveDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("SendDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("DeviceIdTo")
|
||||||
|
.HasDatabaseName("IX_DeviceMessage_DeviceIdTo");
|
||||||
|
|
||||||
|
b.ToTable("DeviceMessage", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.Equipment", b =>
|
modelBuilder.Entity("WorkFlowCheck.DL.Entities.Equipment", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
@@ -618,13 +659,13 @@ namespace WorkFlowCheck.DL.Migrations
|
|||||||
{
|
{
|
||||||
Id = 1,
|
Id = 1,
|
||||||
Active = true,
|
Active = true,
|
||||||
CreatedAt = new DateTime(2025, 4, 4, 10, 41, 46, 227, DateTimeKind.Utc).AddTicks(5578),
|
CreatedAt = new DateTime(2025, 4, 5, 12, 18, 54, 939, DateTimeKind.Utc).AddTicks(1707),
|
||||||
CreatedBy = "System",
|
CreatedBy = "System",
|
||||||
Email = "admin@nuvolar.hu",
|
Email = "admin@nuvolar.hu",
|
||||||
FirstName = "Administrator",
|
FirstName = "Administrator",
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
JwtToken = "",
|
JwtToken = "",
|
||||||
LastModAt = new DateTime(2025, 4, 4, 10, 41, 46, 227, DateTimeKind.Utc).AddTicks(5580),
|
LastModAt = new DateTime(2025, 4, 5, 12, 18, 54, 939, DateTimeKind.Utc).AddTicks(1709),
|
||||||
LastModBy = "System",
|
LastModBy = "System",
|
||||||
LastName = "System",
|
LastName = "System",
|
||||||
NFCActive = true,
|
NFCActive = true,
|
||||||
@@ -637,13 +678,13 @@ namespace WorkFlowCheck.DL.Migrations
|
|||||||
{
|
{
|
||||||
Id = 2,
|
Id = 2,
|
||||||
Active = true,
|
Active = true,
|
||||||
CreatedAt = new DateTime(2025, 4, 4, 10, 41, 46, 239, DateTimeKind.Utc).AddTicks(1896),
|
CreatedAt = new DateTime(2025, 4, 5, 12, 18, 54, 949, DateTimeKind.Utc).AddTicks(6682),
|
||||||
CreatedBy = "System",
|
CreatedBy = "System",
|
||||||
Email = "user@nuvolar.hu",
|
Email = "user@nuvolar.hu",
|
||||||
FirstName = "User",
|
FirstName = "User",
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
JwtToken = "",
|
JwtToken = "",
|
||||||
LastModAt = new DateTime(2025, 4, 4, 10, 41, 46, 239, DateTimeKind.Utc).AddTicks(1897),
|
LastModAt = new DateTime(2025, 4, 5, 12, 18, 54, 949, DateTimeKind.Utc).AddTicks(6683),
|
||||||
LastModBy = "System",
|
LastModBy = "System",
|
||||||
LastName = "System",
|
LastName = "System",
|
||||||
NFCActive = true,
|
NFCActive = true,
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
@page
|
@page
|
||||||
@model WorkFlowCheck.Web.Pages.Account.LoginModel
|
@model WorkFlowCheck.Web.Pages.Account.LoginModel
|
||||||
|
@using WorkFlowCheck.Common.Helper
|
||||||
|
@using WorkFlowCheck.Common.DTO
|
||||||
@{
|
@{
|
||||||
Layout = null;
|
Layout = null;
|
||||||
ViewData["Title"] = "Bejelentkezés";
|
ViewData["Title"] = "Bejelentkezés";
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
@page
|
@page
|
||||||
@model WorkFlowCheck.Web.Pages.UserAndRole.RolePageModel
|
@model WorkFlowCheck.Web.Pages.UserAndRole.RolePageModel
|
||||||
|
@using WorkFlowCheck.Common.Helper
|
||||||
|
@using WorkFlowCheck.Common.DTO
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = "Szabályok";
|
ViewData["Title"] = "Szabályok";
|
||||||
}
|
}
|
||||||
@@ -15,14 +18,14 @@
|
|||||||
<thead class="table-primary">
|
<thead class="table-primary">
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Role Name</th>
|
<th>@DisplayNameHelper.GetDisplayName("RoleName", typeof(RoleDTO))</th>
|
||||||
<th class="text-center">Action</th>
|
<th class="text-center">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tfoot class="table-light">
|
<tfoot class="table-light">
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Role Name</th>
|
<th>@DisplayNameHelper.GetDisplayName("RoleName", typeof(RoleDTO))</th>
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
|
|||||||
Reference in New Issue
Block a user