Blokkolás, feloldás
This commit is contained in:
@@ -47,7 +47,7 @@ namespace WorkFlowCheck.API.Controllers
|
|||||||
IsSuccess = true,
|
IsSuccess = true,
|
||||||
};
|
};
|
||||||
var checkListHeader = await _checkListService.GetCheckListHeaderAsync(id);
|
var checkListHeader = await _checkListService.GetCheckListHeaderAsync(id);
|
||||||
var response = await _checkListService.CreatePDF(id);
|
var response = await _checkListService.CreateCheckListHeaderPDFAsync(id);
|
||||||
|
|
||||||
if (response != null)
|
if (response != null)
|
||||||
{
|
{
|
||||||
@@ -132,6 +132,68 @@ namespace WorkFlowCheck.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[HttpGet("AcceptCheckListHeader/{id}/{userId}")]
|
||||||
|
public async Task<ApiResponseDTO<bool>> AcceptCheckListHeader(int id, int userId)
|
||||||
|
{
|
||||||
|
var retVal = new ApiResponseDTO<bool> { IsSuccess = false };
|
||||||
|
|
||||||
|
var response = await _checkListService.AcceptCheckListHeaderAsync(id, userId);
|
||||||
|
|
||||||
|
if (response)
|
||||||
|
{
|
||||||
|
retVal.IsSuccess = true;
|
||||||
|
retVal.Data = response;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
retVal.IsSuccess = false;
|
||||||
|
retVal.Errors.Add("No data!");
|
||||||
|
}
|
||||||
|
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
[HttpGet("BlockCheckListHeader/{id}/{userId}")]
|
||||||
|
public async Task<ApiResponseDTO<bool>> BlockCheckListHeader(int id, int userId)
|
||||||
|
{
|
||||||
|
var retVal = new ApiResponseDTO<bool> { IsSuccess = false };
|
||||||
|
|
||||||
|
var response = await _checkListService.BlockCheckListHeaderAsync(id, userId);
|
||||||
|
|
||||||
|
if (response)
|
||||||
|
{
|
||||||
|
retVal.IsSuccess = true;
|
||||||
|
retVal.Data = response;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
retVal.IsSuccess = false;
|
||||||
|
retVal.Errors.Add("No data!");
|
||||||
|
}
|
||||||
|
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
[HttpGet("UnBlockCheckListHeader/{id}/{userId}")]
|
||||||
|
public async Task<ApiResponseDTO<bool>> UnBlockCheckListHeader(int id, int userId)
|
||||||
|
{
|
||||||
|
var retVal = new ApiResponseDTO<bool> { IsSuccess = false };
|
||||||
|
|
||||||
|
var response = await _checkListService.UnBlockCheckListHeaderAsync(id, userId);
|
||||||
|
|
||||||
|
if (response)
|
||||||
|
{
|
||||||
|
retVal.IsSuccess = true;
|
||||||
|
retVal.Data = response;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
retVal.IsSuccess = false;
|
||||||
|
retVal.Errors.Add("No data!");
|
||||||
|
}
|
||||||
|
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[HttpGet("GetCheckListTemplateHeader/{id}")]
|
[HttpGet("GetCheckListTemplateHeader/{id}")]
|
||||||
public async Task<ApiResponseDTO<CheckListTemplateHeaderDTO>> GetCheckListTemplateHeader(int id)
|
public async Task<ApiResponseDTO<CheckListTemplateHeaderDTO>> GetCheckListTemplateHeader(int id)
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
@@ -216,7 +216,11 @@ namespace WorkFlowCheck.BL.DocumentGenerator
|
|||||||
|
|
||||||
foreach (var headerPart in Doc.MainDocumentPart.HeaderParts)
|
foreach (var headerPart in Doc.MainDocumentPart.HeaderParts)
|
||||||
SimpleReplace2(headerPart.Header, key, value);
|
SimpleReplace2(headerPart.Header, key, value);
|
||||||
|
|
||||||
SimpleReplace2(Doc.MainDocumentPart.Document.Body, key, value);
|
SimpleReplace2(Doc.MainDocumentPart.Document.Body, key, value);
|
||||||
|
|
||||||
|
foreach (var footerPart in Doc.MainDocumentPart.FooterParts)
|
||||||
|
SimpleReplace2(footerPart.Footer, key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void SimpleReplace(OpenXmlCompositeElement target, string key, string value)
|
protected void SimpleReplace(OpenXmlCompositeElement target, string key, string value)
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ namespace WorkFlowCheck.BL.Mappings
|
|||||||
|
|
||||||
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.AcceptUserId, opt => opt.MapFrom(src => src.AcceptUser != null ? src.AcceptUser.Id : (int?)null))
|
||||||
|
.ForMember(dest => dest.AcceptUserDTO, opt => opt.MapFrom(src => src.AcceptUser))
|
||||||
.ForMember(dest => dest.CheckListRowDTO, opt => opt.MapFrom(src => src.CheckListRows));
|
.ForMember(dest => dest.CheckListRowDTO, opt => opt.MapFrom(src => src.CheckListRows));
|
||||||
|
|
||||||
CreateMap<CheckListRow, CheckListRowDTO>()
|
CreateMap<CheckListRow, CheckListRowDTO>()
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using DocumentFormat.OpenXml.Office.CustomUI;
|
using DocumentFormat.OpenXml.Office.CustomUI;
|
||||||
|
using DocumentFormat.OpenXml.Spreadsheet;
|
||||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
@@ -8,6 +9,7 @@ using System.Collections.Generic;
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using WorkFlowCheck.BL.DocumentGenerator;
|
using WorkFlowCheck.BL.DocumentGenerator;
|
||||||
@@ -25,7 +27,10 @@ namespace WorkFlowCheck.BL.Services
|
|||||||
private readonly IMapper _mapper;
|
private readonly IMapper _mapper;
|
||||||
private readonly INumberGeneratorService _numberGeneratorService;
|
private readonly INumberGeneratorService _numberGeneratorService;
|
||||||
|
|
||||||
public CheckListService(AppDbContext dbContext, IMapper mapper, INumberGeneratorService numberGeneratorService)
|
public CheckListService(AppDbContext dbContext,
|
||||||
|
IMapper mapper,
|
||||||
|
INumberGeneratorService numberGeneratorService,
|
||||||
|
IUserService userService)
|
||||||
{
|
{
|
||||||
_dbContext = dbContext;
|
_dbContext = dbContext;
|
||||||
_mapper = mapper;
|
_mapper = mapper;
|
||||||
@@ -43,6 +48,8 @@ namespace WorkFlowCheck.BL.Services
|
|||||||
{
|
{
|
||||||
var res = await _dbContext.CheckListHeaders
|
var res = await _dbContext.CheckListHeaders
|
||||||
.Where(w => w.Id == Id)
|
.Where(w => w.Id == Id)
|
||||||
|
.Include(i => i.User)
|
||||||
|
.Include(i => i.AcceptUser)
|
||||||
.Include(i => i.CheckListRows)
|
.Include(i => i.CheckListRows)
|
||||||
.ThenInclude(r => r.CheckListTemplateRow)
|
.ThenInclude(r => r.CheckListTemplateRow)
|
||||||
.ThenInclude(r => r.CheckPoint)
|
.ThenInclude(r => r.CheckPoint)
|
||||||
@@ -78,14 +85,15 @@ namespace WorkFlowCheck.BL.Services
|
|||||||
var retVal = new List<CheckListHeaderDTO>();
|
var retVal = new List<CheckListHeaderDTO>();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var roles = await _dbContext.CheckListHeaders
|
var checkListHeaders = await _dbContext.CheckListHeaders
|
||||||
.Include(i => i.CheckListRows)
|
.Include(i => i.CheckListRows)
|
||||||
.Include(i => i.User)
|
.Include(i => i.User)
|
||||||
|
.Include(i => i.AcceptUser)
|
||||||
.AsNoTracking()
|
.AsNoTracking()
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
if (roles != null)
|
if (checkListHeaders != null)
|
||||||
{
|
{
|
||||||
retVal = _mapper.Map<List<CheckListHeaderDTO>>(roles);
|
retVal = _mapper.Map<List<CheckListHeaderDTO>>(checkListHeaders);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -202,6 +210,148 @@ namespace WorkFlowCheck.BL.Services
|
|||||||
}
|
}
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
public async Task<bool> AcceptCheckListHeaderAsync(int id, int userid)
|
||||||
|
{
|
||||||
|
var retVal = false;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var checkListHeader = await _dbContext.CheckListHeaders
|
||||||
|
.Where(w => w.Id == id && w.CheckStatus == CheckStatus.Sent)
|
||||||
|
.FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
if (checkListHeader != null)
|
||||||
|
{
|
||||||
|
checkListHeader.CheckStatus = CheckStatus.Signed;
|
||||||
|
checkListHeader.IsEditable = false;
|
||||||
|
checkListHeader.AcceptUserId = userid;
|
||||||
|
Log.Warning($"Ellenőrzési lap státuszváltozása: Ellenőrzés:{id}, Felhasználó:{userid}");
|
||||||
|
await _dbContext.SaveChangesAsync();
|
||||||
|
|
||||||
|
var pdf = await CreateCheckListHeaderPDFAsync(id);
|
||||||
|
if (pdf != null && pdf.Length > 0)
|
||||||
|
{
|
||||||
|
string pdfDirectory = Path.Combine(Directory.GetCurrentDirectory(), "Pdf");
|
||||||
|
var timestamp = DateTime.Now.ToString("yyyyMMdd_HHmmss");
|
||||||
|
var fileName = $"CD_{timestamp}_{checkListHeader.GuidNumber.ToString().ToUpper()}.pdf";
|
||||||
|
|
||||||
|
var filePath = Path.Combine(pdfDirectory, fileName);
|
||||||
|
await File.WriteAllBytesAsync(filePath, pdf);
|
||||||
|
|
||||||
|
retVal = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
|
||||||
|
Log.Error(ex.Message);
|
||||||
|
}
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
public async Task<byte[]> CreateCheckListHeaderPDFAsync(int checkListHeaderId)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var checkListHeader = await this.GetCheckListHeaderAsync(checkListHeaderId);
|
||||||
|
|
||||||
|
string pdfDirectory = Path.Combine(Directory.GetCurrentDirectory(), "Pdf");
|
||||||
|
|
||||||
|
byte[] byteArray = File.ReadAllBytes(Path.Combine(pdfDirectory, "CheckList_Template_V1.docx"));
|
||||||
|
SablonGenerator gen = new SablonGenerator(byteArray);
|
||||||
|
|
||||||
|
gen.SimpleReplace("#DocumentNumber#", checkListHeader.DocumentNumber);
|
||||||
|
gen.SimpleReplace("#DateExecution#", checkListHeader.DateExecution.ToString("yyyy.MM.dd HH:mm"));
|
||||||
|
gen.SimpleReplace("#WorkUser#", $"{checkListHeader.UserDTO?.LastName} {checkListHeader.UserDTO?.FirstName}");
|
||||||
|
gen.SimpleReplace("#AcceptUser#", $"{checkListHeader.AcceptUserDTO?.LastName} {checkListHeader.AcceptUserDTO?.FirstName}");
|
||||||
|
gen.SimpleReplace("#Guid#", checkListHeader.GuidNumber.ToString());
|
||||||
|
|
||||||
|
if (checkListHeader.CheckListRowDTO != null && checkListHeader.CheckListRowDTO.Count > 0)
|
||||||
|
{
|
||||||
|
var elements = new List<List<string>>();
|
||||||
|
foreach (var item in checkListHeader.CheckListRowDTO)
|
||||||
|
{
|
||||||
|
if (item.CheckListTemplateRowDTO != null)
|
||||||
|
{
|
||||||
|
var cells = new List<string>
|
||||||
|
{
|
||||||
|
$"{item.CheckListTemplateRowDTO.RowIndex.ToString()}.",
|
||||||
|
item.CheckListTemplateRowDTO.OperationDescription,
|
||||||
|
item.Answer
|
||||||
|
};
|
||||||
|
elements.Add(cells);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gen.SetTable(elements, "#rowindex");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
byte[] content = gen.CloseAndGetDocument();
|
||||||
|
|
||||||
|
return DokumentumGenerator.DocxToPdfL(content);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.Error(ex.Message);
|
||||||
|
}
|
||||||
|
return new byte[0];
|
||||||
|
}
|
||||||
|
public async Task<bool> BlockCheckListHeaderAsync(int id, int userid)
|
||||||
|
{
|
||||||
|
var retVal = false;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var checkListHeader = await _dbContext.CheckListHeaders
|
||||||
|
.Where(w => w.Id == id && w.CheckStatus == CheckStatus.Sent)
|
||||||
|
.FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
if (checkListHeader != null && checkListHeader.CheckStatus == CheckStatus.InProgress)
|
||||||
|
{
|
||||||
|
checkListHeader.CheckStatus = CheckStatus.Blocked;
|
||||||
|
checkListHeader.IsEditable = false;
|
||||||
|
|
||||||
|
Log.Warning($"Ellenőrzési lap blokkolva: Ellenőrzés:{id}, Felhasználó:{userid}");
|
||||||
|
|
||||||
|
await _dbContext.SaveChangesAsync();
|
||||||
|
retVal = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
retVal = false;
|
||||||
|
Log.Error(ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
public async Task<bool> UnBlockCheckListHeaderAsync(int id, int userid)
|
||||||
|
{
|
||||||
|
var retVal = false;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var checkListHeader = await _dbContext.CheckListHeaders
|
||||||
|
.Where(w => w.Id == id && w.CheckStatus == CheckStatus.Sent)
|
||||||
|
.FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
if (checkListHeader != null && checkListHeader.CheckStatus == CheckStatus.Blocked)
|
||||||
|
{
|
||||||
|
checkListHeader.CheckStatus = CheckStatus.InProgress;
|
||||||
|
checkListHeader.IsEditable = true;
|
||||||
|
|
||||||
|
Log.Warning($"Ellenőrzési lap feloldva: Ellenőrzés:{id}, Felhasználó:{userid}");
|
||||||
|
|
||||||
|
await _dbContext.SaveChangesAsync();
|
||||||
|
retVal = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
retVal = false;
|
||||||
|
Log.Error(ex.Message);
|
||||||
|
}
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<CheckListTemplateHeaderDTO> GetCheckListTemplateHeaderAsync(int Id)
|
public async Task<CheckListTemplateHeaderDTO> GetCheckListTemplateHeaderAsync(int Id)
|
||||||
{
|
{
|
||||||
@@ -425,46 +575,6 @@ namespace WorkFlowCheck.BL.Services
|
|||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<byte[]> CreatePDF(int checkListHeaderId)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var checkListHeader = await this.GetCheckListHeaderAsync(checkListHeaderId);
|
|
||||||
|
|
||||||
string pdfDirectory = Path.Combine(Directory.GetCurrentDirectory(), "Pdf");
|
|
||||||
|
|
||||||
byte[] byteArray = File.ReadAllBytes(Path.Combine(pdfDirectory, "CheckList_Template_V1.docx"));
|
|
||||||
SablonGenerator gen = new SablonGenerator(byteArray);
|
|
||||||
|
|
||||||
if (checkListHeader.CheckListRowDTO != null && checkListHeader.CheckListRowDTO.Count > 0)
|
|
||||||
{
|
|
||||||
var elements = new List<List<string>>();
|
|
||||||
foreach (var item in checkListHeader.CheckListRowDTO)
|
|
||||||
{
|
|
||||||
if (item.CheckListTemplateRowDTO != null)
|
|
||||||
{
|
|
||||||
var cells = new List<string>
|
|
||||||
{
|
|
||||||
$"{item.CheckListTemplateRowDTO.RowIndex.ToString()}.",
|
|
||||||
item.CheckListTemplateRowDTO.OperationDescription,
|
|
||||||
item.Answer
|
|
||||||
};
|
|
||||||
elements.Add(cells);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gen.SetTable(elements, "#rowindex");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
byte[] content = gen.CloseAndGetDocument();
|
|
||||||
|
|
||||||
return DokumentumGenerator.DocxToPdfL(content);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Log.Error(ex.Message);
|
|
||||||
}
|
|
||||||
return new byte[0];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,10 @@ namespace WorkFlowCheck.BL.Services.Interfaces
|
|||||||
Task<CheckListHeaderDTO> GetCheckListHeaderAsync(int Id);
|
Task<CheckListHeaderDTO> GetCheckListHeaderAsync(int Id);
|
||||||
Task<List<CheckListHeaderDTO>> GetAllCheckListHeaderAsync();
|
Task<List<CheckListHeaderDTO>> GetAllCheckListHeaderAsync();
|
||||||
Task<CheckListHeaderDTO> UpdateCheckListHeaderAsync(CheckListHeaderDTO checkListHeaderDTO);
|
Task<CheckListHeaderDTO> UpdateCheckListHeaderAsync(CheckListHeaderDTO checkListHeaderDTO);
|
||||||
|
Task<bool> AcceptCheckListHeaderAsync(int id, int userid);
|
||||||
|
Task<bool> BlockCheckListHeaderAsync(int id, int userid);
|
||||||
|
Task<bool> UnBlockCheckListHeaderAsync(int id, int userid);
|
||||||
|
Task<byte[]> CreateCheckListHeaderPDFAsync(int checkListHeaderId);
|
||||||
Task<CheckListHeaderDTO> StartNewCheckListAsync(CheckListHeaderNewDTO checkListHeaderNewDTO);
|
Task<CheckListHeaderDTO> StartNewCheckListAsync(CheckListHeaderNewDTO checkListHeaderNewDTO);
|
||||||
|
|
||||||
|
|
||||||
@@ -23,7 +26,6 @@ namespace WorkFlowCheck.BL.Services.Interfaces
|
|||||||
Task<CheckListRowDTO> UpdateCheckListRowAsync(CheckListRowDTO checkListRowDTO);
|
Task<CheckListRowDTO> UpdateCheckListRowAsync(CheckListRowDTO checkListRowDTO);
|
||||||
|
|
||||||
|
|
||||||
Task<byte[]> CreatePDF(int checkListHeaderId);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -12,16 +13,39 @@ namespace WorkFlowCheck.Common.DTO
|
|||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
public int CheckListTemplateHeaderId { get; set; }
|
public int CheckListTemplateHeaderId { get; set; }
|
||||||
public CheckListTemplateHeaderDTO? CheckListTemplateHeaderDTO { get; set; }
|
public CheckListTemplateHeaderDTO? CheckListTemplateHeaderDTO { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Státusz")]
|
||||||
public CheckStatus CheckStatus { get; set; }
|
public CheckStatus CheckStatus { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Dátum")]
|
||||||
public DateTime DateExecution { get; set; }
|
public DateTime DateExecution { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Ellenőrző")]
|
||||||
public int UserId { get; set; }
|
public int UserId { get; set; }
|
||||||
public UserDTO? UserDTO { get; set; }
|
public UserDTO? UserDTO { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Jóváhagyó")]
|
||||||
|
public int? AcceptUserId { get; set; }
|
||||||
|
public UserDTO? AcceptUserDTO { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Megnevezés")]
|
||||||
public string ShortName { get; set; } = null!;
|
public string ShortName { get; set; } = null!;
|
||||||
|
|
||||||
|
[DisplayName("Leírás")]
|
||||||
public string Description { get; set; } = null!;
|
public string Description { get; set; } = null!;
|
||||||
|
|
||||||
|
[DisplayName("Sorszám")]
|
||||||
public string DocumentNumber { get; set; } = null!;
|
public string DocumentNumber { get; set; } = null!;
|
||||||
|
|
||||||
|
[DisplayName("Azonosító")]
|
||||||
public Guid GuidNumber { get; set; }
|
public Guid GuidNumber { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Stornózva")]
|
||||||
public bool IsStorno { get; set; }
|
public bool IsStorno { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Szerkeszthető")]
|
||||||
public bool IsEditable { get; set; }
|
public bool IsEditable { get; set; }
|
||||||
|
|
||||||
public ICollection<CheckListRowDTO>? CheckListRowDTO { get; set; } = new List<CheckListRowDTO>();
|
public ICollection<CheckListRowDTO>? CheckListRowDTO { get; set; } = new List<CheckListRowDTO>();
|
||||||
|
|
||||||
public CheckListHeaderDTO()
|
public CheckListHeaderDTO()
|
||||||
|
|||||||
@@ -3,8 +3,10 @@ using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Reflection.Emit;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using WorkFlowCheck.DL.Entities;
|
||||||
|
|
||||||
namespace WorkFlowCheck.DL.Configurations
|
namespace WorkFlowCheck.DL.Configurations
|
||||||
{
|
{
|
||||||
@@ -15,7 +17,11 @@ namespace WorkFlowCheck.DL.Configurations
|
|||||||
builder.ToTable("CheckListHeader");
|
builder.ToTable("CheckListHeader");
|
||||||
builder.HasKey(e => e.Id);
|
builder.HasKey(e => e.Id);
|
||||||
builder.Property(e => e.Id).ValueGeneratedOnAdd();
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ namespace WorkFlowCheck.DL.Entities
|
|||||||
public DateTime DateExecution { get; set; }
|
public DateTime DateExecution { get; set; }
|
||||||
public int UserId { get; set; }
|
public int UserId { get; set; }
|
||||||
public virtual User User { 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 ShortName { get; set; } = null!;
|
||||||
public string Description { get; set; } = null!;
|
public string Description { get; set; } = null!;
|
||||||
public string DocumentNumber { get; set; } = null!;
|
public string DocumentNumber { get; set; } = null!;
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ namespace WorkFlowCheck.DL.Entities
|
|||||||
public string Message { get; set; } = null!;
|
public string Message { get; set; } = null!;
|
||||||
public string ExtraDataJSON { get; set; } = null!;
|
public string ExtraDataJSON { get; set; } = null!;
|
||||||
public bool IsReaded { get; set; }
|
public bool IsReaded { get; set; }
|
||||||
|
public int? RoleId { get; set; }
|
||||||
|
public virtual Role? Role { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,942 @@
|
|||||||
|
// <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("20250408065515_Extend017")]
|
||||||
|
partial class Extend017
|
||||||
|
{
|
||||||
|
/// <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?>("AcceptUserId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
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("AcceptUserId");
|
||||||
|
|
||||||
|
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<int>("RoleId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
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<bool>("CanDownloadAPK")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<bool>("CanEnableBlocked")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreatedAt")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("CreatedBy")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsAdmin")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<DateTime>("LastModAt")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("LastModBy")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int?>("ParentId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("RoleName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ParentId");
|
||||||
|
|
||||||
|
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, 8, 6, 55, 14, 155, DateTimeKind.Utc).AddTicks(149),
|
||||||
|
CreatedBy = "System",
|
||||||
|
Email = "admin@nuvolar.hu",
|
||||||
|
FirstName = "Administrator",
|
||||||
|
IsDeleted = false,
|
||||||
|
JwtToken = "",
|
||||||
|
LastModAt = new DateTime(2025, 4, 8, 6, 55, 14, 155, DateTimeKind.Utc).AddTicks(150),
|
||||||
|
LastModBy = "System",
|
||||||
|
LastName = "System",
|
||||||
|
NFCActive = true,
|
||||||
|
NFCCode = "00000000",
|
||||||
|
PasswordHash = "eGM0NUREZnJ0ISFFRDIxMKE5TYwthDBuUsTUEO1fBnCR3VdSCmdz47ue0RoVvnkY",
|
||||||
|
Token2FA = "",
|
||||||
|
UserName = "admin"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 2,
|
||||||
|
Active = true,
|
||||||
|
CreatedAt = new DateTime(2025, 4, 8, 6, 55, 14, 166, DateTimeKind.Utc).AddTicks(5847),
|
||||||
|
CreatedBy = "System",
|
||||||
|
Email = "user@nuvolar.hu",
|
||||||
|
FirstName = "User",
|
||||||
|
IsDeleted = false,
|
||||||
|
JwtToken = "",
|
||||||
|
LastModAt = new DateTime(2025, 4, 8, 6, 55, 14, 166, DateTimeKind.Utc).AddTicks(5849),
|
||||||
|
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.User", "AcceptUser")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("AcceptUserId");
|
||||||
|
|
||||||
|
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("AcceptUser");
|
||||||
|
|
||||||
|
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.Role", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("WorkFlowCheck.DL.Entities.Role", "Parent")
|
||||||
|
.WithMany("Children")
|
||||||
|
.HasForeignKey("ParentId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
|
||||||
|
b.Navigation("Parent");
|
||||||
|
});
|
||||||
|
|
||||||
|
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("Children");
|
||||||
|
|
||||||
|
b.Navigation("UserRoles");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("WorkFlowCheck.DL.Entities.User", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("UserRoles");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +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) });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,956 @@
|
|||||||
|
// <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("20250408072927_Extend018")]
|
||||||
|
partial class Extend018
|
||||||
|
{
|
||||||
|
/// <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?>("AcceptUserId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
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("AcceptUserId");
|
||||||
|
|
||||||
|
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<int>("RoleId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
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<int?>("RoleId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<DateTime>("SendDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("DeviceIdTo")
|
||||||
|
.HasDatabaseName("IX_DeviceMessage_DeviceIdTo");
|
||||||
|
|
||||||
|
b.HasIndex("RoleId");
|
||||||
|
|
||||||
|
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<bool>("CanDownloadAPK")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<bool>("CanEnableBlocked")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreatedAt")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("CreatedBy")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsAdmin")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<DateTime>("LastModAt")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("LastModBy")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int?>("ParentId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("RoleName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ParentId");
|
||||||
|
|
||||||
|
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, 8, 7, 29, 26, 543, DateTimeKind.Utc).AddTicks(8649),
|
||||||
|
CreatedBy = "System",
|
||||||
|
Email = "admin@nuvolar.hu",
|
||||||
|
FirstName = "Administrator",
|
||||||
|
IsDeleted = false,
|
||||||
|
JwtToken = "",
|
||||||
|
LastModAt = new DateTime(2025, 4, 8, 7, 29, 26, 543, DateTimeKind.Utc).AddTicks(8652),
|
||||||
|
LastModBy = "System",
|
||||||
|
LastName = "System",
|
||||||
|
NFCActive = true,
|
||||||
|
NFCCode = "00000000",
|
||||||
|
PasswordHash = "eGM0NUREZnJ0ISFFRDIxMKE5TYwthDBuUsTUEO1fBnCR3VdSCmdz47ue0RoVvnkY",
|
||||||
|
Token2FA = "",
|
||||||
|
UserName = "admin"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 2,
|
||||||
|
Active = true,
|
||||||
|
CreatedAt = new DateTime(2025, 4, 8, 7, 29, 26, 556, DateTimeKind.Utc).AddTicks(264),
|
||||||
|
CreatedBy = "System",
|
||||||
|
Email = "user@nuvolar.hu",
|
||||||
|
FirstName = "User",
|
||||||
|
IsDeleted = false,
|
||||||
|
JwtToken = "",
|
||||||
|
LastModAt = new DateTime(2025, 4, 8, 7, 29, 26, 556, DateTimeKind.Utc).AddTicks(270),
|
||||||
|
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.User", "AcceptUser")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("AcceptUserId");
|
||||||
|
|
||||||
|
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("AcceptUser");
|
||||||
|
|
||||||
|
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.DeviceMessage", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("WorkFlowCheck.DL.Entities.Role", "Role")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("RoleId");
|
||||||
|
|
||||||
|
b.Navigation("Role");
|
||||||
|
});
|
||||||
|
|
||||||
|
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.Role", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("WorkFlowCheck.DL.Entities.Role", "Parent")
|
||||||
|
.WithMany("Children")
|
||||||
|
.HasForeignKey("ParentId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
|
||||||
|
b.Navigation("Parent");
|
||||||
|
});
|
||||||
|
|
||||||
|
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("Children");
|
||||||
|
|
||||||
|
b.Navigation("UserRoles");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("WorkFlowCheck.DL.Entities.User", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("UserRoles");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +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) });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,957 @@
|
|||||||
|
// <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("20250408105039_Extend019")]
|
||||||
|
partial class Extend019
|
||||||
|
{
|
||||||
|
/// <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?>("AcceptUserId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
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("AcceptUserId");
|
||||||
|
|
||||||
|
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<int>("RoleId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
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<int?>("RoleId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<DateTime>("SendDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("DeviceIdTo")
|
||||||
|
.HasDatabaseName("IX_DeviceMessage_DeviceIdTo");
|
||||||
|
|
||||||
|
b.HasIndex("RoleId");
|
||||||
|
|
||||||
|
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<bool>("CanDownloadAPK")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<bool>("CanEnableBlocked")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreatedAt")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("CreatedBy")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsAdmin")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<DateTime>("LastModAt")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("LastModBy")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int?>("ParentId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("RoleName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ParentId");
|
||||||
|
|
||||||
|
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, 8, 10, 50, 38, 70, DateTimeKind.Utc).AddTicks(7907),
|
||||||
|
CreatedBy = "System",
|
||||||
|
Email = "admin@nuvolar.hu",
|
||||||
|
FirstName = "Administrator",
|
||||||
|
IsDeleted = false,
|
||||||
|
JwtToken = "",
|
||||||
|
LastModAt = new DateTime(2025, 4, 8, 10, 50, 38, 70, DateTimeKind.Utc).AddTicks(7910),
|
||||||
|
LastModBy = "System",
|
||||||
|
LastName = "System",
|
||||||
|
NFCActive = true,
|
||||||
|
NFCCode = "00000000",
|
||||||
|
PasswordHash = "eGM0NUREZnJ0ISFFRDIxMKE5TYwthDBuUsTUEO1fBnCR3VdSCmdz47ue0RoVvnkY",
|
||||||
|
Token2FA = "",
|
||||||
|
UserName = "admin"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 2,
|
||||||
|
Active = true,
|
||||||
|
CreatedAt = new DateTime(2025, 4, 8, 10, 50, 38, 83, DateTimeKind.Utc).AddTicks(1759),
|
||||||
|
CreatedBy = "System",
|
||||||
|
Email = "user@nuvolar.hu",
|
||||||
|
FirstName = "User",
|
||||||
|
IsDeleted = false,
|
||||||
|
JwtToken = "",
|
||||||
|
LastModAt = new DateTime(2025, 4, 8, 10, 50, 38, 83, DateTimeKind.Utc).AddTicks(1761),
|
||||||
|
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.User", "AcceptUser")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("AcceptUserId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
|
||||||
|
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("AcceptUser");
|
||||||
|
|
||||||
|
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.DeviceMessage", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("WorkFlowCheck.DL.Entities.Role", "Role")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("RoleId");
|
||||||
|
|
||||||
|
b.Navigation("Role");
|
||||||
|
});
|
||||||
|
|
||||||
|
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.Role", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("WorkFlowCheck.DL.Entities.Role", "Parent")
|
||||||
|
.WithMany("Children")
|
||||||
|
.HasForeignKey("ParentId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
|
||||||
|
b.Navigation("Parent");
|
||||||
|
});
|
||||||
|
|
||||||
|
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("Children");
|
||||||
|
|
||||||
|
b.Navigation("UserRoles");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("WorkFlowCheck.DL.Entities.User", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("UserRoles");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -30,6 +30,9 @@ namespace WorkFlowCheck.DL.Migrations
|
|||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int?>("AcceptUserId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("CheckListTemplateHeaderId")
|
b.Property<int>("CheckListTemplateHeaderId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
@@ -82,6 +85,8 @@ namespace WorkFlowCheck.DL.Migrations
|
|||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("AcceptUserId");
|
||||||
|
|
||||||
b.HasIndex("CheckListTemplateHeaderId");
|
b.HasIndex("CheckListTemplateHeaderId");
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
b.HasIndex("UserId");
|
||||||
@@ -318,6 +323,9 @@ namespace WorkFlowCheck.DL.Migrations
|
|||||||
b.Property<DateTime?>("ReceiveDate")
|
b.Property<DateTime?>("ReceiveDate")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<int?>("RoleId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<DateTime>("SendDate")
|
b.Property<DateTime>("SendDate")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
@@ -326,6 +334,8 @@ namespace WorkFlowCheck.DL.Migrations
|
|||||||
b.HasIndex("DeviceIdTo")
|
b.HasIndex("DeviceIdTo")
|
||||||
.HasDatabaseName("IX_DeviceMessage_DeviceIdTo");
|
.HasDatabaseName("IX_DeviceMessage_DeviceIdTo");
|
||||||
|
|
||||||
|
b.HasIndex("RoleId");
|
||||||
|
|
||||||
b.ToTable("DeviceMessage", (string)null);
|
b.ToTable("DeviceMessage", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -676,13 +686,13 @@ namespace WorkFlowCheck.DL.Migrations
|
|||||||
{
|
{
|
||||||
Id = 1,
|
Id = 1,
|
||||||
Active = true,
|
Active = true,
|
||||||
CreatedAt = new DateTime(2025, 4, 6, 19, 24, 51, 944, DateTimeKind.Utc).AddTicks(2145),
|
CreatedAt = new DateTime(2025, 4, 8, 10, 50, 38, 70, DateTimeKind.Utc).AddTicks(7907),
|
||||||
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, 6, 19, 24, 51, 944, DateTimeKind.Utc).AddTicks(2148),
|
LastModAt = new DateTime(2025, 4, 8, 10, 50, 38, 70, DateTimeKind.Utc).AddTicks(7910),
|
||||||
LastModBy = "System",
|
LastModBy = "System",
|
||||||
LastName = "System",
|
LastName = "System",
|
||||||
NFCActive = true,
|
NFCActive = true,
|
||||||
@@ -695,13 +705,13 @@ namespace WorkFlowCheck.DL.Migrations
|
|||||||
{
|
{
|
||||||
Id = 2,
|
Id = 2,
|
||||||
Active = true,
|
Active = true,
|
||||||
CreatedAt = new DateTime(2025, 4, 6, 19, 24, 51, 956, DateTimeKind.Utc).AddTicks(5191),
|
CreatedAt = new DateTime(2025, 4, 8, 10, 50, 38, 83, DateTimeKind.Utc).AddTicks(1759),
|
||||||
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, 6, 19, 24, 51, 956, DateTimeKind.Utc).AddTicks(5194),
|
LastModAt = new DateTime(2025, 4, 8, 10, 50, 38, 83, DateTimeKind.Utc).AddTicks(1761),
|
||||||
LastModBy = "System",
|
LastModBy = "System",
|
||||||
LastName = "System",
|
LastName = "System",
|
||||||
NFCActive = true,
|
NFCActive = true,
|
||||||
@@ -737,6 +747,11 @@ namespace WorkFlowCheck.DL.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListHeader", b =>
|
modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListHeader", b =>
|
||||||
{
|
{
|
||||||
|
b.HasOne("WorkFlowCheck.DL.Entities.User", "AcceptUser")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("AcceptUserId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
|
||||||
b.HasOne("WorkFlowCheck.DL.Entities.CheckListTemplateHeader", "CheckListTemplateHeader")
|
b.HasOne("WorkFlowCheck.DL.Entities.CheckListTemplateHeader", "CheckListTemplateHeader")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("CheckListTemplateHeaderId")
|
.HasForeignKey("CheckListTemplateHeaderId")
|
||||||
@@ -749,6 +764,8 @@ namespace WorkFlowCheck.DL.Migrations
|
|||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("AcceptUser");
|
||||||
|
|
||||||
b.Navigation("CheckListTemplateHeader");
|
b.Navigation("CheckListTemplateHeader");
|
||||||
|
|
||||||
b.Navigation("User");
|
b.Navigation("User");
|
||||||
@@ -815,6 +832,15 @@ namespace WorkFlowCheck.DL.Migrations
|
|||||||
b.Navigation("Equipment");
|
b.Navigation("Equipment");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("WorkFlowCheck.DL.Entities.DeviceMessage", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("WorkFlowCheck.DL.Entities.Role", "Role")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("RoleId");
|
||||||
|
|
||||||
|
b.Navigation("Role");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("WorkFlowCheck.DL.Entities.NumberGeneratorTemplateDate", b =>
|
modelBuilder.Entity("WorkFlowCheck.DL.Entities.NumberGeneratorTemplateDate", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("WorkFlowCheck.DL.Entities.NumberGeneratorTemplate", "NumberGeneratorTemplate")
|
b.HasOne("WorkFlowCheck.DL.Entities.NumberGeneratorTemplate", "NumberGeneratorTemplate")
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
@page
|
@page
|
||||||
@model WorkFlowCheck.Web.Pages.CheckList.CheckListHeader.CheckListHeaderPageModel
|
@model WorkFlowCheck.Web.Pages.CheckList.CheckListHeader.CheckListHeaderPageModel
|
||||||
|
@using WorkFlowCheck.Common.Helper
|
||||||
|
@using WorkFlowCheck.Common.DTO
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = "Ellenőrzések";
|
ViewData["Title"] = "Ellenőrzések";
|
||||||
}
|
}
|
||||||
@@ -15,26 +17,28 @@
|
|||||||
<thead class="table-primary">
|
<thead class="table-primary">
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Status</th>
|
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListHeaderDTO.CheckStatus), typeof(CheckListHeaderDTO))</th>
|
||||||
<th>IsEditable</th>
|
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListHeaderDTO.IsEditable), typeof(CheckListHeaderDTO))</th>
|
||||||
<th>DocumentNumber</th>
|
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListHeaderDTO.DocumentNumber), typeof(CheckListHeaderDTO))</th>
|
||||||
<th>DateExecution</th>
|
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListHeaderDTO.DateExecution), typeof(CheckListHeaderDTO))</th>
|
||||||
<th>ShortName</th>
|
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListHeaderDTO.ShortName), typeof(CheckListHeaderDTO))</th>
|
||||||
<th>Description</th>
|
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListHeaderDTO.Description), typeof(CheckListHeaderDTO))</th>
|
||||||
<th>User</th>
|
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListHeaderDTO.UserId), typeof(CheckListHeaderDTO))</th>
|
||||||
|
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListHeaderDTO.AcceptUserId), typeof(CheckListHeaderDTO))</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>Status</th>
|
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListHeaderDTO.CheckStatus), typeof(CheckListHeaderDTO))</th>
|
||||||
<th>IsEditable</th>
|
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListHeaderDTO.IsEditable), typeof(CheckListHeaderDTO))</th>
|
||||||
<th>DocumentNumber</th>
|
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListHeaderDTO.DocumentNumber), typeof(CheckListHeaderDTO))</th>
|
||||||
<th>DateExecution</th>
|
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListHeaderDTO.DateExecution), typeof(CheckListHeaderDTO))</th>
|
||||||
<th>ShortName</th>
|
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListHeaderDTO.ShortName), typeof(CheckListHeaderDTO))</th>
|
||||||
<th>Description</th>
|
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListHeaderDTO.Description), typeof(CheckListHeaderDTO))</th>
|
||||||
<th>User</th>
|
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListHeaderDTO.UserId), typeof(CheckListHeaderDTO))</th>
|
||||||
|
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListHeaderDTO.AcceptUserId), typeof(CheckListHeaderDTO))</th>
|
||||||
<th class="text-center">Action</th>
|
<th class="text-center">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
@@ -80,6 +84,7 @@
|
|||||||
{ data: "shortName" },
|
{ data: "shortName" },
|
||||||
{ data: "description" },
|
{ data: "description" },
|
||||||
{ data: "userDTO.userName" },
|
{ data: "userDTO.userName" },
|
||||||
|
{ data: "acceptUserDTO.userName" },
|
||||||
{ data: "checkStatus", render: function (data, type, row) {
|
{ data: "checkStatus", render: function (data, type, row) {
|
||||||
return renderActionButtonsforCheckListHeader(data, row.id);
|
return renderActionButtonsforCheckListHeader(data, row.id);
|
||||||
}}
|
}}
|
||||||
@@ -90,7 +95,7 @@
|
|||||||
"visible": false
|
"visible": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": 8,
|
"targets": 9,
|
||||||
"className": "text-center",
|
"className": "text-center",
|
||||||
"width": "10%"
|
"width": "10%"
|
||||||
}
|
}
|
||||||
@@ -119,10 +124,53 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#tbCheckListHeadersPage').on('click', '.accept-btn', function ()
|
||||||
|
{
|
||||||
|
const row = table.row($(this).closest('tr')).data();
|
||||||
|
const url = `@Url.Page("./CheckListHeaderPage")?handler=Accept&id=${row.id}`
|
||||||
|
|
||||||
|
showConfirmModal({
|
||||||
|
title: 'Jóváhagyás megerősítése',
|
||||||
|
message: 'Biztosan jóváhagyod a folyamatot?',
|
||||||
|
okText: 'Jóváhagyás',
|
||||||
|
cancelText: 'Mégsem'
|
||||||
|
}).then(function(result){
|
||||||
|
if(result === 'ok'){
|
||||||
|
$.ajax({
|
||||||
|
url: url,
|
||||||
|
type: 'GET',
|
||||||
|
success: function(data) {
|
||||||
|
if (data) {
|
||||||
|
showMessageModal({
|
||||||
|
title: 'Információ',
|
||||||
|
message: 'A jóváhagyás sikerült!',
|
||||||
|
okText: 'Értettem'
|
||||||
|
});
|
||||||
|
table.ajax.reload();
|
||||||
|
} else {
|
||||||
|
showMessageModal({
|
||||||
|
title: 'Hiba!',
|
||||||
|
message: 'A jóváhagyás NEM sikerült!',
|
||||||
|
okText: 'Értettem'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
showMessageModal({
|
||||||
|
title: 'Hiba!',
|
||||||
|
message: 'A jóváhagyás NEM sikerült!',
|
||||||
|
okText: 'Értettem'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
$('#tbCheckListHeadersPage').on('click', '.delete-btn', function ()
|
$('#tbCheckListHeadersPage').on('click', '.delete-btn', function ()
|
||||||
{
|
{
|
||||||
const row = table.row($(this).closest('tr')).data();
|
const row = table.row($(this).closest('tr')).data();
|
||||||
console.log(row);
|
|
||||||
showConfirmModal({
|
showConfirmModal({
|
||||||
title: 'Törlés megerősítése',
|
title: 'Törlés megerősítése',
|
||||||
message: 'Biztosan törölni szeretnéd ezt az elemet?',
|
message: 'Biztosan törölni szeretnéd ezt az elemet?',
|
||||||
|
|||||||
+43
-1
@@ -5,7 +5,7 @@ using System.ComponentModel.DataAnnotations;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using WorkFlowCheck.Common.Enums;
|
using WorkFlowCheck.Common.Enums;
|
||||||
using WorkFlowCheck.Web.Services.Interfaces;
|
using WorkFlowCheck.Web.Services.Interfaces;
|
||||||
|
using System.Security.Claims;
|
||||||
namespace WorkFlowCheck.Web.Pages.CheckList.CheckListHeader
|
namespace WorkFlowCheck.Web.Pages.CheckList.CheckListHeader
|
||||||
{
|
{
|
||||||
public class CheckListHeaderPageModel : PageModel
|
public class CheckListHeaderPageModel : PageModel
|
||||||
@@ -54,5 +54,47 @@ namespace WorkFlowCheck.Web.Pages.CheckList.CheckListHeader
|
|||||||
return new JsonResult(new { success = false });
|
return new JsonResult(new { success = false });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public async Task<IActionResult> OnGetAccept(int id)
|
||||||
|
{
|
||||||
|
var userid = User.FindFirstValue(ClaimTypes.NameIdentifier);
|
||||||
|
var response = await _checkListService.AcceptCheckListHeader(id, int.Parse(userid));
|
||||||
|
|
||||||
|
if (response.IsSuccess)
|
||||||
|
{
|
||||||
|
return new JsonResult(new { success = response.Data });
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new JsonResult(new { success = false });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public async Task<IActionResult> OnGetBlock(int id)
|
||||||
|
{
|
||||||
|
var userid = User.FindFirstValue(ClaimTypes.NameIdentifier);
|
||||||
|
var response = await _checkListService.AcceptCheckListHeader(id, int.Parse(userid));
|
||||||
|
|
||||||
|
if (response.IsSuccess)
|
||||||
|
{
|
||||||
|
return new JsonResult(new { success = response.Data });
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new JsonResult(new { success = false });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public async Task<IActionResult> OnGetUnBlock(int id)
|
||||||
|
{
|
||||||
|
var userid = User.FindFirstValue(ClaimTypes.NameIdentifier);
|
||||||
|
var response = await _checkListService.AcceptCheckListHeader(id, int.Parse(userid));
|
||||||
|
|
||||||
|
if (response.IsSuccess)
|
||||||
|
{
|
||||||
|
return new JsonResult(new { success = response.Data });
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new JsonResult(new { success = false });
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,70 @@ namespace WorkFlowCheck.Web.Services
|
|||||||
}
|
}
|
||||||
public async Task<ApiResponseDTO<CheckListHeaderDTO>> UpdateCheckListHeader(CheckListHeaderDTO checkListHeaderDTO) => throw new NotImplementedException();
|
public async Task<ApiResponseDTO<CheckListHeaderDTO>> UpdateCheckListHeader(CheckListHeaderDTO checkListHeaderDTO) => throw new NotImplementedException();
|
||||||
|
|
||||||
|
public async Task<ApiResponseDTO<bool>> AcceptCheckListHeader(int id, int userid)
|
||||||
|
{
|
||||||
|
var retVal = new ApiResponseDTO<bool>();
|
||||||
|
var endpoint = $"{_httpClient.BaseAddress}api/CheckList/AcceptCheckListHeader/{id}/{userid}";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var response = await _httpClient.GetFromJsonAsync<ApiResponseDTO<bool>>(endpoint);
|
||||||
|
if (response != null)
|
||||||
|
{
|
||||||
|
if (response.IsSuccess)
|
||||||
|
{
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.Error(ex.Message);
|
||||||
|
}
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
public async Task<ApiResponseDTO<bool>> BlockCheckListHeader(int id, int userid)
|
||||||
|
{
|
||||||
|
var retVal = new ApiResponseDTO<bool>();
|
||||||
|
var endpoint = $"{_httpClient.BaseAddress}api/CheckList/BlockCheckListHeader/{id}/{userid}";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var response = await _httpClient.GetFromJsonAsync<ApiResponseDTO<bool>>(endpoint);
|
||||||
|
if (response != null)
|
||||||
|
{
|
||||||
|
if (response.IsSuccess)
|
||||||
|
{
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.Error(ex.Message);
|
||||||
|
}
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
public async Task<ApiResponseDTO<bool>> UnBlockCheckListHeader(int id, int userid)
|
||||||
|
{
|
||||||
|
var retVal = new ApiResponseDTO<bool>();
|
||||||
|
var endpoint = $"{_httpClient.BaseAddress}api/CheckList/UnBlockCheckListHeader/{id}/{userid}";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var response = await _httpClient.GetFromJsonAsync<ApiResponseDTO<bool>>(endpoint);
|
||||||
|
if (response != null)
|
||||||
|
{
|
||||||
|
if (response.IsSuccess)
|
||||||
|
{
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.Error(ex.Message);
|
||||||
|
}
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<ApiResponseDTO<byte[]>> CreatePDF(int id)
|
public async Task<ApiResponseDTO<byte[]>> CreatePDF(int id)
|
||||||
{
|
{
|
||||||
var retVal = new ApiResponseDTO<byte[]>();
|
var retVal = new ApiResponseDTO<byte[]>();
|
||||||
|
|||||||
@@ -9,17 +9,24 @@ namespace WorkFlowCheck.Web.Services.Interfaces
|
|||||||
Task<List<CheckListHeaderDTO>> GetAllCheckListHeaderAsync();
|
Task<List<CheckListHeaderDTO>> GetAllCheckListHeaderAsync();
|
||||||
Task<ApiResponseDTO<CheckListHeaderDTO>> UpdateCheckListHeader(CheckListHeaderDTO checkListHeaderDTO);
|
Task<ApiResponseDTO<CheckListHeaderDTO>> UpdateCheckListHeader(CheckListHeaderDTO checkListHeaderDTO);
|
||||||
Task<ApiResponseDTO<byte[]>> CreatePDF(int id);
|
Task<ApiResponseDTO<byte[]>> CreatePDF(int id);
|
||||||
|
Task<ApiResponseDTO<bool>> AcceptCheckListHeader(int id, int userid);
|
||||||
|
Task<ApiResponseDTO<bool>> BlockCheckListHeader(int id, int userid);
|
||||||
|
Task<ApiResponseDTO<bool>> UnBlockCheckListHeader(int id, int userid);
|
||||||
|
|
||||||
|
|
||||||
Task<CheckListTemplateHeaderDTO> GetCheckListTemplateHeader(int id);
|
Task<CheckListTemplateHeaderDTO> GetCheckListTemplateHeader(int id);
|
||||||
Task<List<CheckListTemplateHeaderDTO>> GetAllCheckListTemplateHeaderAsync();
|
Task<List<CheckListTemplateHeaderDTO>> GetAllCheckListTemplateHeaderAsync();
|
||||||
Task<ApiResponseDTO<CheckListTemplateHeaderDTO>> UpdateCheckListTemplateHeader(CheckListTemplateHeaderDTO checkListTemplateHeaderDTO);
|
Task<ApiResponseDTO<CheckListTemplateHeaderDTO>> UpdateCheckListTemplateHeader(CheckListTemplateHeaderDTO checkListTemplateHeaderDTO);
|
||||||
|
|
||||||
|
|
||||||
Task<CheckListTemplateRowDTO> GetCheckListTemplateRow(int id);
|
Task<CheckListTemplateRowDTO> GetCheckListTemplateRow(int id);
|
||||||
Task<ApiResponseDTO<CheckListTemplateRowDTO>> UpdateCheckListTemplateRow(CheckListTemplateRowDTO checkListTemplateRowDTO);
|
Task<ApiResponseDTO<CheckListTemplateRowDTO>> UpdateCheckListTemplateRow(CheckListTemplateRowDTO checkListTemplateRowDTO);
|
||||||
|
|
||||||
|
|
||||||
Task<CheckListRowDTO> GetCheckListRow(int id);
|
Task<CheckListRowDTO> GetCheckListRow(int id);
|
||||||
Task<ApiResponseDTO<CheckListRowDTO>> UpdateCheckListRow(CheckListRowDTO checkListRowDTO);
|
Task<ApiResponseDTO<CheckListRowDTO>> UpdateCheckListRow(CheckListRowDTO checkListRowDTO);
|
||||||
|
|
||||||
|
|
||||||
List<SelectListItem> GetCheckStatus();
|
List<SelectListItem> GetCheckStatus();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,20 +111,39 @@ function renderActionButtonsforCheckListHeader(data, rowId) {
|
|||||||
<button class="btn btn-primary edit-btn btn-sm" data-id="${rowId}">
|
<button class="btn btn-primary edit-btn btn-sm" data-id="${rowId}">
|
||||||
<i class="bi bi-pencil-fill"></i>
|
<i class="bi bi-pencil-fill"></i>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-secondary pdf-btn btn-sm" data-id="${rowId}">
|
<button class="btn btn-warning accept-btn btn-sm" data-id="${rowId}">
|
||||||
|
<i class="bi bi-save2"></i>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-danger pdf-btn btn-sm" data-id="${rowId}">
|
||||||
<i class="bi bi-file-earmark-pdf-fill"></i>
|
<i class="bi bi-file-earmark-pdf-fill"></i>
|
||||||
</button>`;
|
</button>`;
|
||||||
}
|
}
|
||||||
else {
|
if (data === 2) {
|
||||||
|
|
||||||
return `
|
return `
|
||||||
<button class="btn btn-primary edit-btn btn-sm" data-id="${rowId}">
|
<button class="btn btn-primary edit-btn btn-sm" data-id="${rowId}">
|
||||||
<i class="bi bi-pencil-fill"></i>
|
<i class="bi bi-pencil-fill"></i>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-danger delete-btn btn-sm" data-id="${rowId}">
|
<button class="btn btn-success unblock-btn btn-sm" data-id="${rowId}">
|
||||||
<i class="bi bi-trash-fill"></i>
|
<i class="bi bi-arrow-clockwise"></i>
|
||||||
</button>`;
|
</button>`;
|
||||||
}
|
}
|
||||||
|
if (data === 5) {
|
||||||
|
return `
|
||||||
|
<button class="btn btn-danger pdf-btn btn-sm" data-id="${rowId}">
|
||||||
|
<i class="bi bi-file-earmark-pdf-fill"></i>
|
||||||
|
</button>`;
|
||||||
|
}
|
||||||
|
if (data === 3) {
|
||||||
|
return ``;
|
||||||
|
}
|
||||||
|
return `
|
||||||
|
<button class="btn btn-primary edit-btn btn-sm" data-id="${rowId}">
|
||||||
|
<i class="bi bi-pencil-fill"></i>
|
||||||
|
</button>`;
|
||||||
|
//<button class="btn btn-danger delete-btn btn-sm" data-id="${rowId}">
|
||||||
|
// <i class="bi bi-trash-fill"></i>
|
||||||
|
//</button>`;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderCheckStatus(data) {
|
function renderCheckStatus(data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user