| | |||||
| namespace Diligent.WebAPI.Business.MappingProfiles | |||||
| namespace Diligent.WebAPI.Business.MappingProfiles | |||||
| { | { | ||||
| public class AdMappingProfile : Profile | public class AdMappingProfile : Profile | ||||
| { | { |
| | |||||
| using Diligent.WebAPI.Contracts.DTOs.SelectionLevel; | |||||
| namespace Diligent.WebAPI.Business.MappingProfiles | |||||
| { | |||||
| public class SelectionLevelMappingProfile : Profile | |||||
| { | |||||
| public SelectionLevelMappingProfile() | |||||
| { | |||||
| #region Model to DTO | |||||
| CreateMap<SelectionLevel, SelectionLevelResposneDto>(); | |||||
| CreateMap<SelectionLevel, SelectionLevelResponseWithDataDto>(); | |||||
| #endregion | |||||
| } | |||||
| } | |||||
| } |
| using Diligent.WebAPI.Contracts.DTOs.SelectionProcess; | |||||
| namespace Diligent.WebAPI.Business.MappingProfiles | |||||
| { | |||||
| public class SelectionProcessMappingProfile : Profile | |||||
| { | |||||
| public SelectionProcessMappingProfile() | |||||
| { | |||||
| #region DTO to Model | |||||
| CreateMap<SelectionProcessCreateDto, SelectionProcess>(); | |||||
| #endregion | |||||
| #region Model to DTO | |||||
| CreateMap<SelectionProcess, SelectionProcessResposneDto>(); | |||||
| #endregion | |||||
| } | |||||
| } | |||||
| } |
| | |||||
| namespace Diligent.WebAPI.Business.Services.Interfaces | |||||
| namespace Diligent.WebAPI.Business.Services.Interfaces | |||||
| { | { | ||||
| public interface IAdService | public interface IAdService | ||||
| { | { |
| | |||||
| namespace Diligent.WebAPI.Business.Services.Interfaces | |||||
| namespace Diligent.WebAPI.Business.Services.Interfaces | |||||
| { | { | ||||
| public interface IApplicantService | public interface IApplicantService | ||||
| { | { |
| | |||||
| using Diligent.WebAPI.Contracts.DTOs.SelectionLevel; | |||||
| using Diligent.WebAPI.Contracts.DTOs.SelectionProcess; | |||||
| namespace Diligent.WebAPI.Business.Services.Interfaces | |||||
| { | |||||
| public interface ISelectionLevelService | |||||
| { | |||||
| Task<List<SelectionLevelResponseWithDataDto>> GetAllAsync(); | |||||
| Task<SelectionProcessResposneDto> GetByIdAsync(int id); | |||||
| } | |||||
| } |
| | |||||
| using Diligent.WebAPI.Contracts.DTOs.SelectionProcess; | |||||
| namespace Diligent.WebAPI.Business.Services.Interfaces | |||||
| { | |||||
| public interface ISelectionProcessService | |||||
| { | |||||
| Task CreateAsync(SelectionProcessCreateDto model); | |||||
| Task DeleteAsync(int id); | |||||
| Task<List<SelectionProcessResposneDto>> GetAllAsync(); | |||||
| Task<SelectionProcessResposneDto> GetByIdAsync(int id); | |||||
| Task UpdateAsync(int id, SelectionProcessCreateDto model); | |||||
| } | |||||
| } |
| using Diligent.WebAPI.Contracts.DTOs.SelectionLevel; | |||||
| using Diligent.WebAPI.Contracts.DTOs.SelectionProcess; | |||||
| namespace Diligent.WebAPI.Business.Services | |||||
| { | |||||
| public class SelectionLevelService : ISelectionLevelService | |||||
| { | |||||
| private readonly DatabaseContext _context; | |||||
| private readonly IMapper _mapper; | |||||
| public SelectionLevelService(DatabaseContext context, IMapper mapper) | |||||
| { | |||||
| _context = context; | |||||
| _mapper = mapper; | |||||
| } | |||||
| public async Task<List<SelectionLevelResponseWithDataDto>> GetAllAsync() => | |||||
| _mapper.Map<List<SelectionLevelResponseWithDataDto>>(await _context.SelectionLevels.Include(sl => sl.SelectionProcesses).ToListAsync()); | |||||
| public async Task<SelectionProcessResposneDto> GetByIdAsync(int id) | |||||
| { | |||||
| var sl = await _context.SelectionLevels.FindAsync(id); | |||||
| if (sl is null) | |||||
| throw new EntityNotFoundException("Selection level not found"); | |||||
| return _mapper.Map<SelectionProcessResposneDto>(sl); | |||||
| } | |||||
| } | |||||
| } |
| using Diligent.WebAPI.Contracts.DTOs.SelectionProcess; | |||||
| namespace Diligent.WebAPI.Business.Services | |||||
| { | |||||
| public class SelectionProcessService : ISelectionProcessService | |||||
| { | |||||
| private readonly DatabaseContext _context; | |||||
| private readonly IMapper _mapper; | |||||
| public SelectionProcessService(DatabaseContext context, IMapper mapper) | |||||
| { | |||||
| _context = context; | |||||
| _mapper = mapper; | |||||
| } | |||||
| public async Task<List<SelectionProcessResposneDto>> GetAllAsync() => | |||||
| _mapper.Map<List<SelectionProcessResposneDto>>(await _context.SelectionProcesses.ToListAsync()); | |||||
| public async Task<SelectionProcessResposneDto> GetByIdAsync(int id) | |||||
| { | |||||
| var sp = await _context.SelectionProcesses.FindAsync(id); | |||||
| if (sp is null) | |||||
| throw new EntityNotFoundException("Selection process not found"); | |||||
| return _mapper.Map<SelectionProcessResposneDto>(sp); | |||||
| } | |||||
| public async Task CreateAsync(SelectionProcessCreateDto model) | |||||
| { | |||||
| await _context.SelectionProcesses.AddAsync(_mapper.Map<SelectionProcess>(model)); | |||||
| await _context.SaveChangesAsync(); | |||||
| } | |||||
| public async Task UpdateAsync(int id, SelectionProcessCreateDto model) | |||||
| { | |||||
| var sp = await _context.SelectionProcesses.FindAsync(id); | |||||
| if (sp is null) | |||||
| throw new EntityNotFoundException("Selection process not found"); | |||||
| _mapper.Map(model, sp); | |||||
| _context.Entry(sp).State = EntityState.Modified; | |||||
| await _context.SaveChangesAsync(); | |||||
| } | |||||
| public async Task DeleteAsync(int id) | |||||
| { | |||||
| var sp = await _context.SelectionProcesses.FindAsync(id); | |||||
| if (sp is null) | |||||
| throw new EntityNotFoundException("Ad not found"); | |||||
| _context.SelectionProcesses.Remove(sp); | |||||
| await _context.SaveChangesAsync(); | |||||
| } | |||||
| } | |||||
| } |
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using System.Threading.Tasks; | |||||
| namespace Diligent.WebAPI.Contracts.DTOs.Ad | |||||
| namespace Diligent.WebAPI.Contracts.DTOs.Ad | |||||
| { | { | ||||
| public class AdCreateDto | public class AdCreateDto | ||||
| { | { |
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using System.Threading.Tasks; | |||||
| namespace Diligent.WebAPI.Contracts.DTOs.Ad | |||||
| namespace Diligent.WebAPI.Contracts.DTOs.Ad | |||||
| { | { | ||||
| public class AdResponseDto | public class AdResponseDto | ||||
| { | { |
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using System.Threading.Tasks; | |||||
| namespace Diligent.WebAPI.Contracts.DTOs.Ad | |||||
| namespace Diligent.WebAPI.Contracts.DTOs.Ad | |||||
| { | { | ||||
| public class AdUpdateDto | public class AdUpdateDto | ||||
| { | { |
| using Diligent.WebAPI.Contracts.DTOs.SelectionProcess; | |||||
| namespace Diligent.WebAPI.Contracts.DTOs.SelectionLevel | |||||
| { | |||||
| public class SelectionLevelResponseWithDataDto | |||||
| { | |||||
| public int LevelId { get; set; } | |||||
| public string Name { get; set; } | |||||
| public SelectionProcessResposneDto SelectionProcesses { get; set; } | |||||
| } | |||||
| } |
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using System.Threading.Tasks; | |||||
| namespace Diligent.WebAPI.Contracts.DTOs.SelectionLevel | |||||
| { | |||||
| public class SelectionLevelResposneDto | |||||
| { | |||||
| public int LevelId { get; set; } | |||||
| public string Name { get; set; } | |||||
| } | |||||
| } |
| namespace Diligent.WebAPI.Contracts.DTOs.SelectionProcess | |||||
| { | |||||
| public class SelectionProcessCreateDto | |||||
| { | |||||
| public string Name { get; set; } | |||||
| public string Status { get; set; } | |||||
| public DateTime? Date { get; set; } | |||||
| public string? Link { get; set; } | |||||
| public int? SchedulerId { get; set; } | |||||
| public int SelectionLevelId { get; set; } | |||||
| public int ApplicantId { get; set; } | |||||
| } | |||||
| } |
| using Diligent.WebAPI.Contracts.DTOs.Applicant; | |||||
| using Diligent.WebAPI.Contracts.DTOs.SelectionLevel; | |||||
| namespace Diligent.WebAPI.Contracts.DTOs.SelectionProcess | |||||
| { | |||||
| public class SelectionProcessResposneDto | |||||
| { | |||||
| public int Id { get; set; } | |||||
| public string Name { get; set; } | |||||
| public string Status { get; set; } | |||||
| public DateTime? Date { get; set; } | |||||
| public string? Link { get; set; } | |||||
| public ApplicantViewDto Applicant { get; set; } | |||||
| } | |||||
| } |
| public DbSet<Applicant> Applicants { get; set; } | public DbSet<Applicant> Applicants { get; set; } | ||||
| public DbSet<Technology> Technologies { get; set; } | public DbSet<Technology> Technologies { get; set; } | ||||
| public DbSet<ApplicantTechnology> ApplicantTechnologies { get; set; } | public DbSet<ApplicantTechnology> ApplicantTechnologies { get; set; } | ||||
| public DbSet<SelectionLevel> SelectionLevels { get; set; } | |||||
| public DbSet<SelectionProcess> SelectionProcesses { get; set; } | |||||
| public DatabaseContext(DbContextOptions<DatabaseContext> options) : base(options) { } | public DatabaseContext(DbContextOptions<DatabaseContext> options) : base(options) { } | ||||
| protected override void OnModelCreating(ModelBuilder modelBuilder) | protected override void OnModelCreating(ModelBuilder modelBuilder) | ||||
| { | { | ||||
| base.OnModelCreating(modelBuilder); | base.OnModelCreating(modelBuilder); | ||||
| modelBuilder.Entity<SelectionLevel>().HasData( | |||||
| new List<SelectionLevel>{ | |||||
| new SelectionLevel{ Id = 1, Name = "HR intervju"}, | |||||
| new SelectionLevel{ Id = 2, Name = "Screening test"}, | |||||
| new SelectionLevel{ Id = 3, Name = "Tehnicki intervju"}, | |||||
| new SelectionLevel{ Id = 4, Name = "Konacna odluka"}, | |||||
| }); | |||||
| modelBuilder.ApplyConfiguration(new ApplicantConfiguration()); | modelBuilder.ApplyConfiguration(new ApplicantConfiguration()); | ||||
| modelBuilder.ApplyConfiguration(new TechnologyConfiguration()); | modelBuilder.ApplyConfiguration(new TechnologyConfiguration()); | ||||
| } | } |
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using System.Threading.Tasks; | |||||
| namespace Diligent.WebAPI.Data.Entities | |||||
| { | |||||
| public class SelectionLevel | |||||
| { | |||||
| public int Id { get; set; } | |||||
| public string Name { get; set; } | |||||
| public List<SelectionProcess> SelectionProcesses { get; set; } | |||||
| } | |||||
| } |
| namespace Diligent.WebAPI.Data.Entities | |||||
| { | |||||
| public class SelectionProcess | |||||
| { | |||||
| public int Id { get; set; } | |||||
| public string Name { get; set; } | |||||
| public string Status { get; set; } | |||||
| public DateTime? Date { get; set; } | |||||
| public string? Link { get; set; } | |||||
| public int? SchedulerId { get; set; } | |||||
| public User Scheduler { get; set; } | |||||
| public int SelectionLevelId { get; set; } | |||||
| public SelectionLevel SelectionLevel { get; set; } | |||||
| public int ApplicantId { get; set; } | |||||
| } | |||||
| } |
| { | { | ||||
| services.AddDbContext<DatabaseContext>(options => | services.AddDbContext<DatabaseContext>(options => | ||||
| { | { | ||||
| if (Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") == "Development") | |||||
| if (Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") != "Development") | |||||
| { | { | ||||
| options.EnableSensitiveDataLogging(); | options.EnableSensitiveDataLogging(); | ||||
| } | } | ||||
| var secret = Environment.GetEnvironmentVariable("SECRET"); | |||||
| //var secret = Environment.GetEnvironmentVariable("SECRET"); | |||||
| var secret = ""; | |||||
| var connectionString = configuration.GetConnectionString(nameof(Diligent.WebAPI)); | var connectionString = configuration.GetConnectionString(nameof(Diligent.WebAPI)); | ||||
| options.UseSqlServer(String.Concat(connectionString,secret)); | options.UseSqlServer(String.Concat(connectionString,secret)); | ||||
| }); | }); |
| // <auto-generated /> | |||||
| using System; | |||||
| using Diligent.WebAPI.Data; | |||||
| using Microsoft.EntityFrameworkCore; | |||||
| using Microsoft.EntityFrameworkCore.Infrastructure; | |||||
| using Microsoft.EntityFrameworkCore.Metadata; | |||||
| using Microsoft.EntityFrameworkCore.Migrations; | |||||
| using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | |||||
| #nullable disable | |||||
| namespace Diligent.WebAPI.Data.Migrations | |||||
| { | |||||
| [DbContext(typeof(DatabaseContext))] | |||||
| [Migration("20221107163821_AddedSelectionProcess")] | |||||
| partial class AddedSelectionProcess | |||||
| { | |||||
| protected override void BuildTargetModel(ModelBuilder modelBuilder) | |||||
| { | |||||
| #pragma warning disable 612, 618 | |||||
| modelBuilder | |||||
| .HasAnnotation("ProductVersion", "6.0.10") | |||||
| .HasAnnotation("Relational:MaxIdentifierLength", 128); | |||||
| SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); | |||||
| modelBuilder.Entity("AdTechnology", b => | |||||
| { | |||||
| b.Property<int>("AdsId") | |||||
| .HasColumnType("int"); | |||||
| b.Property<int>("TechnologiesTechnologyId") | |||||
| .HasColumnType("int"); | |||||
| b.HasKey("AdsId", "TechnologiesTechnologyId"); | |||||
| b.HasIndex("TechnologiesTechnologyId"); | |||||
| b.ToTable("AdTechnology"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Ad", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<string>("Conditions") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<DateTime>("CreatedAt") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime>("ExpiredAt") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<string>("MainLiabilities") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<int>("MinimumExperience") | |||||
| .HasColumnType("int"); | |||||
| b.Property<string>("Offer") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("Title") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.HasKey("Id"); | |||||
| b.ToTable("Ads"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Applicant", b => | |||||
| { | |||||
| b.Property<int>("ApplicantId") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ApplicantId"), 1L, 1); | |||||
| b.Property<string>("ApplicationChannel") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("BitBucketLink") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("CV") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<DateTime>("DateOfApplication") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<string>("Email") | |||||
| .IsRequired() | |||||
| .HasMaxLength(128) | |||||
| .HasColumnType("nvarchar(128)"); | |||||
| b.Property<int>("Experience") | |||||
| .HasColumnType("int"); | |||||
| b.Property<string>("FirstName") | |||||
| .IsRequired() | |||||
| .HasMaxLength(128) | |||||
| .HasColumnType("nvarchar(128)"); | |||||
| b.Property<string>("GithubLink") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("LastName") | |||||
| .IsRequired() | |||||
| .HasMaxLength(128) | |||||
| .HasColumnType("nvarchar(128)"); | |||||
| b.Property<string>("LinkedlnLink") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("PhoneNumber") | |||||
| .IsRequired() | |||||
| .HasMaxLength(30) | |||||
| .HasColumnType("nvarchar(30)"); | |||||
| b.Property<string>("Position") | |||||
| .IsRequired() | |||||
| .HasMaxLength(128) | |||||
| .HasColumnType("nvarchar(128)"); | |||||
| b.HasKey("ApplicantId"); | |||||
| b.ToTable("Applicants"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.ApplicantTechnology", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<int>("ApplicantId") | |||||
| .HasColumnType("int"); | |||||
| b.Property<int>("TechnologyId") | |||||
| .HasColumnType("int"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("ApplicantId"); | |||||
| b.HasIndex("TechnologyId"); | |||||
| b.ToTable("ApplicantTechnologies"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.AppRole", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<string>("ConcurrencyStamp") | |||||
| .IsConcurrencyToken() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("Name") | |||||
| .HasMaxLength(256) | |||||
| .HasColumnType("nvarchar(256)"); | |||||
| b.Property<string>("NormalizedName") | |||||
| .HasMaxLength(256) | |||||
| .HasColumnType("nvarchar(256)"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("NormalizedName") | |||||
| .IsUnique() | |||||
| .HasDatabaseName("RoleNameIndex") | |||||
| .HasFilter("[NormalizedName] IS NOT NULL"); | |||||
| b.ToTable("AspNetRoles", (string)null); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsuranceCompany", b => | |||||
| { | |||||
| b.Property<long>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("bigint"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1); | |||||
| b.Property<string>("City") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("Country") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<DateTime>("CreatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime?>("DeletedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<string>("Fax") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("LegalAddress") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("LegalEmail") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("Name") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("PhoneNumber") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("PostalCode") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<DateTime?>("UpdatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.HasKey("Id"); | |||||
| b.ToTable("InsuranceCompanies"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b => | |||||
| { | |||||
| b.Property<long>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("bigint"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1); | |||||
| b.Property<DateTime>("CreatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime?>("DeletedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime>("EndDate") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<long>("InsurerId") | |||||
| .HasColumnType("bigint"); | |||||
| b.Property<decimal>("Premium") | |||||
| .HasColumnType("decimal(18,2)"); | |||||
| b.Property<DateTime>("StartDate") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<string>("Type") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<DateTime?>("UpdatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("InsurerId"); | |||||
| b.ToTable("InsurancePolicies"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b => | |||||
| { | |||||
| b.Property<long>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("bigint"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1); | |||||
| b.Property<string>("Address") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("City") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("Country") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<DateTime>("CreatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime>("DateOfBirth") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime?>("DeletedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<string>("Email") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("FirstName") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<long>("InsuranceCompanyId") | |||||
| .HasColumnType("bigint"); | |||||
| b.Property<string>("LastName") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("PhoneNumber") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("PostalCode") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<DateTime?>("UpdatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("InsuranceCompanyId"); | |||||
| b.ToTable("Insurers"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<DateTime>("CreationDate") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime>("ExpiryDate") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<bool>("Invalidated") | |||||
| .HasColumnType("bit"); | |||||
| b.Property<string>("JwtId") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("Token") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<bool>("Used") | |||||
| .HasColumnType("bit"); | |||||
| b.Property<int>("UserId") | |||||
| .HasColumnType("int"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("UserId"); | |||||
| b.ToTable("RefreshTokens"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionLevel", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<string>("Name") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.HasKey("Id"); | |||||
| b.ToTable("SelectionLevels"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionProcess", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<int>("ApplicantId") | |||||
| .HasColumnType("int"); | |||||
| b.Property<DateTime?>("Date") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<string>("Link") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("Name") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<int?>("SchedulerId") | |||||
| .HasColumnType("int"); | |||||
| b.Property<int>("SelectionLevelId") | |||||
| .HasColumnType("int"); | |||||
| b.Property<string>("Status") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("SchedulerId"); | |||||
| b.HasIndex("SelectionLevelId"); | |||||
| b.ToTable("SelectionProcesses"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b => | |||||
| { | |||||
| b.Property<int>("TechnologyId") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TechnologyId"), 1L, 1); | |||||
| b.Property<string>("Name") | |||||
| .IsRequired() | |||||
| .HasMaxLength(128) | |||||
| .HasColumnType("nvarchar(128)"); | |||||
| b.HasKey("TechnologyId"); | |||||
| b.ToTable("Technologies"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.User", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<int>("AccessFailedCount") | |||||
| .HasColumnType("int"); | |||||
| b.Property<string>("ConcurrencyStamp") | |||||
| .IsConcurrencyToken() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("Email") | |||||
| .HasMaxLength(256) | |||||
| .HasColumnType("nvarchar(256)"); | |||||
| b.Property<bool>("EmailConfirmed") | |||||
| .HasColumnType("bit"); | |||||
| b.Property<string>("FirstName") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("LastName") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<bool>("LockoutEnabled") | |||||
| .HasColumnType("bit"); | |||||
| b.Property<DateTimeOffset?>("LockoutEnd") | |||||
| .HasColumnType("datetimeoffset"); | |||||
| b.Property<string>("NormalizedEmail") | |||||
| .HasMaxLength(256) | |||||
| .HasColumnType("nvarchar(256)"); | |||||
| b.Property<string>("NormalizedUserName") | |||||
| .HasMaxLength(256) | |||||
| .HasColumnType("nvarchar(256)"); | |||||
| b.Property<string>("PasswordHash") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("PasswordResetToken") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("PhoneNumber") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<bool>("PhoneNumberConfirmed") | |||||
| .HasColumnType("bit"); | |||||
| b.Property<string>("SecurityStamp") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<bool>("TwoFactorEnabled") | |||||
| .HasColumnType("bit"); | |||||
| b.Property<string>("UserName") | |||||
| .HasMaxLength(256) | |||||
| .HasColumnType("nvarchar(256)"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("NormalizedEmail") | |||||
| .HasDatabaseName("EmailIndex"); | |||||
| b.HasIndex("NormalizedUserName") | |||||
| .IsUnique() | |||||
| .HasDatabaseName("UserNameIndex") | |||||
| .HasFilter("[NormalizedUserName] IS NOT NULL"); | |||||
| b.ToTable("AspNetUsers", (string)null); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookDefinition", b => | |||||
| { | |||||
| b.Property<long>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("bigint"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1); | |||||
| b.Property<DateTime>("CreatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime?>("DeletedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<string>("Description") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("DisplayName") | |||||
| .IsRequired() | |||||
| .HasMaxLength(100) | |||||
| .HasColumnType("nvarchar(100)"); | |||||
| b.Property<string>("Name") | |||||
| .IsRequired() | |||||
| .HasMaxLength(100) | |||||
| .HasColumnType("nvarchar(100)"); | |||||
| b.Property<DateTime?>("UpdatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.HasKey("Id"); | |||||
| b.ToTable("WebhookDefinitions"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b => | |||||
| { | |||||
| b.Property<long>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("bigint"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1); | |||||
| b.Property<DateTime>("CreatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime?>("DeletedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<bool>("IsActive") | |||||
| .HasColumnType("bit"); | |||||
| b.Property<DateTime?>("UpdatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<long>("WebhookDefinitionId") | |||||
| .HasColumnType("bigint"); | |||||
| b.Property<string>("WebhookURL") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("WebhookDefinitionId"); | |||||
| b.ToTable("WebhookSubscriptions"); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<string>("ClaimType") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("ClaimValue") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<int>("RoleId") | |||||
| .HasColumnType("int"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("RoleId"); | |||||
| b.ToTable("AspNetRoleClaims", (string)null); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<string>("ClaimType") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("ClaimValue") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<int>("UserId") | |||||
| .HasColumnType("int"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("UserId"); | |||||
| b.ToTable("AspNetUserClaims", (string)null); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b => | |||||
| { | |||||
| b.Property<string>("LoginProvider") | |||||
| .HasColumnType("nvarchar(450)"); | |||||
| b.Property<string>("ProviderKey") | |||||
| .HasColumnType("nvarchar(450)"); | |||||
| b.Property<string>("ProviderDisplayName") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<int>("UserId") | |||||
| .HasColumnType("int"); | |||||
| b.HasKey("LoginProvider", "ProviderKey"); | |||||
| b.HasIndex("UserId"); | |||||
| b.ToTable("AspNetUserLogins", (string)null); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b => | |||||
| { | |||||
| b.Property<int>("UserId") | |||||
| .HasColumnType("int"); | |||||
| b.Property<int>("RoleId") | |||||
| .HasColumnType("int"); | |||||
| b.HasKey("UserId", "RoleId"); | |||||
| b.HasIndex("RoleId"); | |||||
| b.ToTable("AspNetUserRoles", (string)null); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b => | |||||
| { | |||||
| b.Property<int>("UserId") | |||||
| .HasColumnType("int"); | |||||
| b.Property<string>("LoginProvider") | |||||
| .HasColumnType("nvarchar(450)"); | |||||
| b.Property<string>("Name") | |||||
| .HasColumnType("nvarchar(450)"); | |||||
| b.Property<string>("Value") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.HasKey("UserId", "LoginProvider", "Name"); | |||||
| b.ToTable("AspNetUserTokens", (string)null); | |||||
| }); | |||||
| modelBuilder.Entity("AdTechnology", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.Ad", null) | |||||
| .WithMany() | |||||
| .HasForeignKey("AdsId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.Technology", null) | |||||
| .WithMany() | |||||
| .HasForeignKey("TechnologiesTechnologyId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.ApplicantTechnology", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant") | |||||
| .WithMany("ApplicantTechnologies") | |||||
| .HasForeignKey("ApplicantId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.Technology", "Tecnology") | |||||
| .WithMany("ApplicantTechnologies") | |||||
| .HasForeignKey("TechnologyId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.Navigation("Applicant"); | |||||
| b.Navigation("Tecnology"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.Insurer", "Insurer") | |||||
| .WithMany() | |||||
| .HasForeignKey("InsurerId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.Navigation("Insurer"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.InsuranceCompany", "InsuranceCompany") | |||||
| .WithMany() | |||||
| .HasForeignKey("InsuranceCompanyId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.Navigation("InsuranceCompany"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.User", "User") | |||||
| .WithMany() | |||||
| .HasForeignKey("UserId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.Navigation("User"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionProcess", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.User", "Scheduler") | |||||
| .WithMany() | |||||
| .HasForeignKey("SchedulerId"); | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.SelectionLevel", "SelectionLevel") | |||||
| .WithMany() | |||||
| .HasForeignKey("SelectionLevelId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.Navigation("Scheduler"); | |||||
| b.Navigation("SelectionLevel"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.WebhookDefinition", "WebhookDefinition") | |||||
| .WithMany() | |||||
| .HasForeignKey("WebhookDefinitionId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.Navigation("WebhookDefinition"); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null) | |||||
| .WithMany() | |||||
| .HasForeignKey("RoleId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.User", null) | |||||
| .WithMany() | |||||
| .HasForeignKey("UserId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.User", null) | |||||
| .WithMany() | |||||
| .HasForeignKey("UserId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null) | |||||
| .WithMany() | |||||
| .HasForeignKey("RoleId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.User", null) | |||||
| .WithMany() | |||||
| .HasForeignKey("UserId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.User", null) | |||||
| .WithMany() | |||||
| .HasForeignKey("UserId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Applicant", b => | |||||
| { | |||||
| b.Navigation("ApplicantTechnologies"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b => | |||||
| { | |||||
| b.Navigation("ApplicantTechnologies"); | |||||
| }); | |||||
| #pragma warning restore 612, 618 | |||||
| } | |||||
| } | |||||
| } |
| using System; | |||||
| using Microsoft.EntityFrameworkCore.Migrations; | |||||
| #nullable disable | |||||
| namespace Diligent.WebAPI.Data.Migrations | |||||
| { | |||||
| public partial class AddedSelectionProcess : Migration | |||||
| { | |||||
| protected override void Up(MigrationBuilder migrationBuilder) | |||||
| { | |||||
| migrationBuilder.CreateTable( | |||||
| name: "SelectionLevels", | |||||
| columns: table => new | |||||
| { | |||||
| Id = table.Column<int>(type: "int", nullable: false) | |||||
| .Annotation("SqlServer:Identity", "1, 1"), | |||||
| Name = table.Column<string>(type: "nvarchar(max)", nullable: false) | |||||
| }, | |||||
| constraints: table => | |||||
| { | |||||
| table.PrimaryKey("PK_SelectionLevels", x => x.Id); | |||||
| }); | |||||
| migrationBuilder.CreateTable( | |||||
| name: "SelectionProcesses", | |||||
| columns: table => new | |||||
| { | |||||
| Id = table.Column<int>(type: "int", nullable: false) | |||||
| .Annotation("SqlServer:Identity", "1, 1"), | |||||
| Name = table.Column<string>(type: "nvarchar(max)", nullable: false), | |||||
| Status = table.Column<string>(type: "nvarchar(max)", nullable: false), | |||||
| Date = table.Column<DateTime>(type: "datetime2", nullable: true), | |||||
| Link = table.Column<string>(type: "nvarchar(max)", nullable: true), | |||||
| SchedulerId = table.Column<int>(type: "int", nullable: true), | |||||
| SelectionLevelId = table.Column<int>(type: "int", nullable: false), | |||||
| ApplicantId = table.Column<int>(type: "int", nullable: false) | |||||
| }, | |||||
| constraints: table => | |||||
| { | |||||
| table.PrimaryKey("PK_SelectionProcesses", x => x.Id); | |||||
| table.ForeignKey( | |||||
| name: "FK_SelectionProcesses_AspNetUsers_SchedulerId", | |||||
| column: x => x.SchedulerId, | |||||
| principalTable: "AspNetUsers", | |||||
| principalColumn: "Id"); | |||||
| table.ForeignKey( | |||||
| name: "FK_SelectionProcesses_SelectionLevels_SelectionLevelId", | |||||
| column: x => x.SelectionLevelId, | |||||
| principalTable: "SelectionLevels", | |||||
| principalColumn: "Id", | |||||
| onDelete: ReferentialAction.Cascade); | |||||
| }); | |||||
| migrationBuilder.CreateIndex( | |||||
| name: "IX_SelectionProcesses_SchedulerId", | |||||
| table: "SelectionProcesses", | |||||
| column: "SchedulerId"); | |||||
| migrationBuilder.CreateIndex( | |||||
| name: "IX_SelectionProcesses_SelectionLevelId", | |||||
| table: "SelectionProcesses", | |||||
| column: "SelectionLevelId"); | |||||
| } | |||||
| protected override void Down(MigrationBuilder migrationBuilder) | |||||
| { | |||||
| migrationBuilder.DropTable( | |||||
| name: "SelectionProcesses"); | |||||
| migrationBuilder.DropTable( | |||||
| name: "SelectionLevels"); | |||||
| } | |||||
| } | |||||
| } |
| // <auto-generated /> | |||||
| using System; | |||||
| using Diligent.WebAPI.Data; | |||||
| using Microsoft.EntityFrameworkCore; | |||||
| using Microsoft.EntityFrameworkCore.Infrastructure; | |||||
| using Microsoft.EntityFrameworkCore.Metadata; | |||||
| using Microsoft.EntityFrameworkCore.Migrations; | |||||
| using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | |||||
| #nullable disable | |||||
| namespace Diligent.WebAPI.Data.Migrations | |||||
| { | |||||
| [DbContext(typeof(DatabaseContext))] | |||||
| [Migration("20221107214939_SeedDataForSelectionLevel")] | |||||
| partial class SeedDataForSelectionLevel | |||||
| { | |||||
| protected override void BuildTargetModel(ModelBuilder modelBuilder) | |||||
| { | |||||
| #pragma warning disable 612, 618 | |||||
| modelBuilder | |||||
| .HasAnnotation("ProductVersion", "6.0.10") | |||||
| .HasAnnotation("Relational:MaxIdentifierLength", 128); | |||||
| SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); | |||||
| modelBuilder.Entity("AdTechnology", b => | |||||
| { | |||||
| b.Property<int>("AdsId") | |||||
| .HasColumnType("int"); | |||||
| b.Property<int>("TechnologiesTechnologyId") | |||||
| .HasColumnType("int"); | |||||
| b.HasKey("AdsId", "TechnologiesTechnologyId"); | |||||
| b.HasIndex("TechnologiesTechnologyId"); | |||||
| b.ToTable("AdTechnology"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Ad", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<string>("Conditions") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<DateTime>("CreatedAt") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime>("ExpiredAt") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<string>("MainLiabilities") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<int>("MinimumExperience") | |||||
| .HasColumnType("int"); | |||||
| b.Property<string>("Offer") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("Title") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.HasKey("Id"); | |||||
| b.ToTable("Ads"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Applicant", b => | |||||
| { | |||||
| b.Property<int>("ApplicantId") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ApplicantId"), 1L, 1); | |||||
| b.Property<string>("ApplicationChannel") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("BitBucketLink") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("CV") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<DateTime>("DateOfApplication") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<string>("Email") | |||||
| .IsRequired() | |||||
| .HasMaxLength(128) | |||||
| .HasColumnType("nvarchar(128)"); | |||||
| b.Property<int>("Experience") | |||||
| .HasColumnType("int"); | |||||
| b.Property<string>("FirstName") | |||||
| .IsRequired() | |||||
| .HasMaxLength(128) | |||||
| .HasColumnType("nvarchar(128)"); | |||||
| b.Property<string>("GithubLink") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("LastName") | |||||
| .IsRequired() | |||||
| .HasMaxLength(128) | |||||
| .HasColumnType("nvarchar(128)"); | |||||
| b.Property<string>("LinkedlnLink") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("PhoneNumber") | |||||
| .IsRequired() | |||||
| .HasMaxLength(30) | |||||
| .HasColumnType("nvarchar(30)"); | |||||
| b.Property<string>("Position") | |||||
| .IsRequired() | |||||
| .HasMaxLength(128) | |||||
| .HasColumnType("nvarchar(128)"); | |||||
| b.HasKey("ApplicantId"); | |||||
| b.ToTable("Applicants"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.ApplicantTechnology", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<int>("ApplicantId") | |||||
| .HasColumnType("int"); | |||||
| b.Property<int>("TechnologyId") | |||||
| .HasColumnType("int"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("ApplicantId"); | |||||
| b.HasIndex("TechnologyId"); | |||||
| b.ToTable("ApplicantTechnologies"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.AppRole", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<string>("ConcurrencyStamp") | |||||
| .IsConcurrencyToken() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("Name") | |||||
| .HasMaxLength(256) | |||||
| .HasColumnType("nvarchar(256)"); | |||||
| b.Property<string>("NormalizedName") | |||||
| .HasMaxLength(256) | |||||
| .HasColumnType("nvarchar(256)"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("NormalizedName") | |||||
| .IsUnique() | |||||
| .HasDatabaseName("RoleNameIndex") | |||||
| .HasFilter("[NormalizedName] IS NOT NULL"); | |||||
| b.ToTable("AspNetRoles", (string)null); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsuranceCompany", b => | |||||
| { | |||||
| b.Property<long>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("bigint"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1); | |||||
| b.Property<string>("City") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("Country") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<DateTime>("CreatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime?>("DeletedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<string>("Fax") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("LegalAddress") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("LegalEmail") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("Name") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("PhoneNumber") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("PostalCode") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<DateTime?>("UpdatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.HasKey("Id"); | |||||
| b.ToTable("InsuranceCompanies"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b => | |||||
| { | |||||
| b.Property<long>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("bigint"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1); | |||||
| b.Property<DateTime>("CreatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime?>("DeletedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime>("EndDate") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<long>("InsurerId") | |||||
| .HasColumnType("bigint"); | |||||
| b.Property<decimal>("Premium") | |||||
| .HasColumnType("decimal(18,2)"); | |||||
| b.Property<DateTime>("StartDate") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<string>("Type") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<DateTime?>("UpdatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("InsurerId"); | |||||
| b.ToTable("InsurancePolicies"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b => | |||||
| { | |||||
| b.Property<long>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("bigint"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1); | |||||
| b.Property<string>("Address") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("City") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("Country") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<DateTime>("CreatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime>("DateOfBirth") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime?>("DeletedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<string>("Email") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("FirstName") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<long>("InsuranceCompanyId") | |||||
| .HasColumnType("bigint"); | |||||
| b.Property<string>("LastName") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("PhoneNumber") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("PostalCode") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<DateTime?>("UpdatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("InsuranceCompanyId"); | |||||
| b.ToTable("Insurers"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<DateTime>("CreationDate") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime>("ExpiryDate") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<bool>("Invalidated") | |||||
| .HasColumnType("bit"); | |||||
| b.Property<string>("JwtId") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("Token") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<bool>("Used") | |||||
| .HasColumnType("bit"); | |||||
| b.Property<int>("UserId") | |||||
| .HasColumnType("int"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("UserId"); | |||||
| b.ToTable("RefreshTokens"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionLevel", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<string>("Name") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.HasKey("Id"); | |||||
| b.ToTable("SelectionLevels"); | |||||
| b.HasData( | |||||
| new | |||||
| { | |||||
| Id = 1, | |||||
| Name = "HR intervju" | |||||
| }, | |||||
| new | |||||
| { | |||||
| Id = 2, | |||||
| Name = "Screening test" | |||||
| }, | |||||
| new | |||||
| { | |||||
| Id = 3, | |||||
| Name = "Tehnicki intervju" | |||||
| }, | |||||
| new | |||||
| { | |||||
| Id = 4, | |||||
| Name = "Konacna odluka" | |||||
| }); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionProcess", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<int>("ApplicantId") | |||||
| .HasColumnType("int"); | |||||
| b.Property<DateTime?>("Date") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<string>("Link") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("Name") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<int?>("SchedulerId") | |||||
| .HasColumnType("int"); | |||||
| b.Property<int>("SelectionLevelId") | |||||
| .HasColumnType("int"); | |||||
| b.Property<string>("Status") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("SchedulerId"); | |||||
| b.HasIndex("SelectionLevelId"); | |||||
| b.ToTable("SelectionProcesses"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b => | |||||
| { | |||||
| b.Property<int>("TechnologyId") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TechnologyId"), 1L, 1); | |||||
| b.Property<string>("Name") | |||||
| .IsRequired() | |||||
| .HasMaxLength(128) | |||||
| .HasColumnType("nvarchar(128)"); | |||||
| b.HasKey("TechnologyId"); | |||||
| b.ToTable("Technologies"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.User", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<int>("AccessFailedCount") | |||||
| .HasColumnType("int"); | |||||
| b.Property<string>("ConcurrencyStamp") | |||||
| .IsConcurrencyToken() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("Email") | |||||
| .HasMaxLength(256) | |||||
| .HasColumnType("nvarchar(256)"); | |||||
| b.Property<bool>("EmailConfirmed") | |||||
| .HasColumnType("bit"); | |||||
| b.Property<string>("FirstName") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("LastName") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<bool>("LockoutEnabled") | |||||
| .HasColumnType("bit"); | |||||
| b.Property<DateTimeOffset?>("LockoutEnd") | |||||
| .HasColumnType("datetimeoffset"); | |||||
| b.Property<string>("NormalizedEmail") | |||||
| .HasMaxLength(256) | |||||
| .HasColumnType("nvarchar(256)"); | |||||
| b.Property<string>("NormalizedUserName") | |||||
| .HasMaxLength(256) | |||||
| .HasColumnType("nvarchar(256)"); | |||||
| b.Property<string>("PasswordHash") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("PasswordResetToken") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("PhoneNumber") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<bool>("PhoneNumberConfirmed") | |||||
| .HasColumnType("bit"); | |||||
| b.Property<string>("SecurityStamp") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<bool>("TwoFactorEnabled") | |||||
| .HasColumnType("bit"); | |||||
| b.Property<string>("UserName") | |||||
| .HasMaxLength(256) | |||||
| .HasColumnType("nvarchar(256)"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("NormalizedEmail") | |||||
| .HasDatabaseName("EmailIndex"); | |||||
| b.HasIndex("NormalizedUserName") | |||||
| .IsUnique() | |||||
| .HasDatabaseName("UserNameIndex") | |||||
| .HasFilter("[NormalizedUserName] IS NOT NULL"); | |||||
| b.ToTable("AspNetUsers", (string)null); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookDefinition", b => | |||||
| { | |||||
| b.Property<long>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("bigint"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1); | |||||
| b.Property<DateTime>("CreatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime?>("DeletedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<string>("Description") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("DisplayName") | |||||
| .IsRequired() | |||||
| .HasMaxLength(100) | |||||
| .HasColumnType("nvarchar(100)"); | |||||
| b.Property<string>("Name") | |||||
| .IsRequired() | |||||
| .HasMaxLength(100) | |||||
| .HasColumnType("nvarchar(100)"); | |||||
| b.Property<DateTime?>("UpdatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.HasKey("Id"); | |||||
| b.ToTable("WebhookDefinitions"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b => | |||||
| { | |||||
| b.Property<long>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("bigint"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1); | |||||
| b.Property<DateTime>("CreatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<DateTime?>("DeletedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<bool>("IsActive") | |||||
| .HasColumnType("bit"); | |||||
| b.Property<DateTime?>("UpdatedAtUtc") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<long>("WebhookDefinitionId") | |||||
| .HasColumnType("bigint"); | |||||
| b.Property<string>("WebhookURL") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("WebhookDefinitionId"); | |||||
| b.ToTable("WebhookSubscriptions"); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<string>("ClaimType") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("ClaimValue") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<int>("RoleId") | |||||
| .HasColumnType("int"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("RoleId"); | |||||
| b.ToTable("AspNetRoleClaims", (string)null); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<string>("ClaimType") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("ClaimValue") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<int>("UserId") | |||||
| .HasColumnType("int"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("UserId"); | |||||
| b.ToTable("AspNetUserClaims", (string)null); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b => | |||||
| { | |||||
| b.Property<string>("LoginProvider") | |||||
| .HasColumnType("nvarchar(450)"); | |||||
| b.Property<string>("ProviderKey") | |||||
| .HasColumnType("nvarchar(450)"); | |||||
| b.Property<string>("ProviderDisplayName") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<int>("UserId") | |||||
| .HasColumnType("int"); | |||||
| b.HasKey("LoginProvider", "ProviderKey"); | |||||
| b.HasIndex("UserId"); | |||||
| b.ToTable("AspNetUserLogins", (string)null); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b => | |||||
| { | |||||
| b.Property<int>("UserId") | |||||
| .HasColumnType("int"); | |||||
| b.Property<int>("RoleId") | |||||
| .HasColumnType("int"); | |||||
| b.HasKey("UserId", "RoleId"); | |||||
| b.HasIndex("RoleId"); | |||||
| b.ToTable("AspNetUserRoles", (string)null); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b => | |||||
| { | |||||
| b.Property<int>("UserId") | |||||
| .HasColumnType("int"); | |||||
| b.Property<string>("LoginProvider") | |||||
| .HasColumnType("nvarchar(450)"); | |||||
| b.Property<string>("Name") | |||||
| .HasColumnType("nvarchar(450)"); | |||||
| b.Property<string>("Value") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.HasKey("UserId", "LoginProvider", "Name"); | |||||
| b.ToTable("AspNetUserTokens", (string)null); | |||||
| }); | |||||
| modelBuilder.Entity("AdTechnology", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.Ad", null) | |||||
| .WithMany() | |||||
| .HasForeignKey("AdsId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.Technology", null) | |||||
| .WithMany() | |||||
| .HasForeignKey("TechnologiesTechnologyId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.ApplicantTechnology", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant") | |||||
| .WithMany("ApplicantTechnologies") | |||||
| .HasForeignKey("ApplicantId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.Technology", "Tecnology") | |||||
| .WithMany("ApplicantTechnologies") | |||||
| .HasForeignKey("TechnologyId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.Navigation("Applicant"); | |||||
| b.Navigation("Tecnology"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.Insurer", "Insurer") | |||||
| .WithMany() | |||||
| .HasForeignKey("InsurerId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.Navigation("Insurer"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.InsuranceCompany", "InsuranceCompany") | |||||
| .WithMany() | |||||
| .HasForeignKey("InsuranceCompanyId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.Navigation("InsuranceCompany"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.User", "User") | |||||
| .WithMany() | |||||
| .HasForeignKey("UserId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.Navigation("User"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionProcess", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.User", "Scheduler") | |||||
| .WithMany() | |||||
| .HasForeignKey("SchedulerId"); | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.SelectionLevel", "SelectionLevel") | |||||
| .WithMany() | |||||
| .HasForeignKey("SelectionLevelId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.Navigation("Scheduler"); | |||||
| b.Navigation("SelectionLevel"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.WebhookDefinition", "WebhookDefinition") | |||||
| .WithMany() | |||||
| .HasForeignKey("WebhookDefinitionId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.Navigation("WebhookDefinition"); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null) | |||||
| .WithMany() | |||||
| .HasForeignKey("RoleId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.User", null) | |||||
| .WithMany() | |||||
| .HasForeignKey("UserId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.User", null) | |||||
| .WithMany() | |||||
| .HasForeignKey("UserId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null) | |||||
| .WithMany() | |||||
| .HasForeignKey("RoleId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.User", null) | |||||
| .WithMany() | |||||
| .HasForeignKey("UserId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| }); | |||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.User", null) | |||||
| .WithMany() | |||||
| .HasForeignKey("UserId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Applicant", b => | |||||
| { | |||||
| b.Navigation("ApplicantTechnologies"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b => | |||||
| { | |||||
| b.Navigation("ApplicantTechnologies"); | |||||
| }); | |||||
| #pragma warning restore 612, 618 | |||||
| } | |||||
| } | |||||
| } |
| using Microsoft.EntityFrameworkCore.Migrations; | |||||
| #nullable disable | |||||
| namespace Diligent.WebAPI.Data.Migrations | |||||
| { | |||||
| public partial class SeedDataForSelectionLevel : Migration | |||||
| { | |||||
| protected override void Up(MigrationBuilder migrationBuilder) | |||||
| { | |||||
| migrationBuilder.InsertData( | |||||
| table: "SelectionLevels", | |||||
| columns: new[] { "Id", "Name" }, | |||||
| values: new object[,] | |||||
| { | |||||
| { 1, "HR intervju" }, | |||||
| { 2, "Screening test" }, | |||||
| { 3, "Tehnicki intervju" }, | |||||
| { 4, "Konacna odluka" } | |||||
| }); | |||||
| } | |||||
| protected override void Down(MigrationBuilder migrationBuilder) | |||||
| { | |||||
| migrationBuilder.DeleteData( | |||||
| table: "SelectionLevels", | |||||
| keyColumn: "Id", | |||||
| keyValue: 1); | |||||
| migrationBuilder.DeleteData( | |||||
| table: "SelectionLevels", | |||||
| keyColumn: "Id", | |||||
| keyValue: 2); | |||||
| migrationBuilder.DeleteData( | |||||
| table: "SelectionLevels", | |||||
| keyColumn: "Id", | |||||
| keyValue: 3); | |||||
| migrationBuilder.DeleteData( | |||||
| table: "SelectionLevels", | |||||
| keyColumn: "Id", | |||||
| keyValue: 4); | |||||
| } | |||||
| } | |||||
| } |
| b.HasIndex("TechnologiesTechnologyId"); | b.HasIndex("TechnologiesTechnologyId"); | ||||
| b.ToTable("AdTechnology"); | |||||
| b.ToTable("AdTechnology", (string)null); | |||||
| }); | }); | ||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Ad", b => | modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Ad", b => | ||||
| b.HasKey("Id"); | b.HasKey("Id"); | ||||
| b.ToTable("Ads"); | |||||
| b.ToTable("Ads", (string)null); | |||||
| }); | }); | ||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Applicant", b => | modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Applicant", b => | ||||
| b.HasKey("ApplicantId"); | b.HasKey("ApplicantId"); | ||||
| b.ToTable("Applicants"); | |||||
| b.ToTable("Applicants", (string)null); | |||||
| }); | }); | ||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.ApplicantTechnology", b => | modelBuilder.Entity("Diligent.WebAPI.Data.Entities.ApplicantTechnology", b => | ||||
| b.HasIndex("TechnologyId"); | b.HasIndex("TechnologyId"); | ||||
| b.ToTable("ApplicantTechnologies"); | |||||
| b.ToTable("ApplicantTechnologies", (string)null); | |||||
| }); | }); | ||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.AppRole", b => | modelBuilder.Entity("Diligent.WebAPI.Data.Entities.AppRole", b => | ||||
| b.HasKey("Id"); | b.HasKey("Id"); | ||||
| b.ToTable("InsuranceCompanies"); | |||||
| b.ToTable("InsuranceCompanies", (string)null); | |||||
| }); | }); | ||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b => | modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b => | ||||
| b.HasIndex("InsurerId"); | b.HasIndex("InsurerId"); | ||||
| b.ToTable("InsurancePolicies"); | |||||
| b.ToTable("InsurancePolicies", (string)null); | |||||
| }); | }); | ||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b => | modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b => | ||||
| b.HasIndex("InsuranceCompanyId"); | b.HasIndex("InsuranceCompanyId"); | ||||
| b.ToTable("Insurers"); | |||||
| b.ToTable("Insurers", (string)null); | |||||
| }); | }); | ||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b => | modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b => | ||||
| b.HasIndex("UserId"); | b.HasIndex("UserId"); | ||||
| b.ToTable("RefreshTokens"); | |||||
| b.ToTable("RefreshTokens", (string)null); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionLevel", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<string>("Name") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.HasKey("Id"); | |||||
| b.ToTable("SelectionLevels", (string)null); | |||||
| b.HasData( | |||||
| new | |||||
| { | |||||
| Id = 1, | |||||
| Name = "HR intervju" | |||||
| }, | |||||
| new | |||||
| { | |||||
| Id = 2, | |||||
| Name = "Screening test" | |||||
| }, | |||||
| new | |||||
| { | |||||
| Id = 3, | |||||
| Name = "Tehnicki intervju" | |||||
| }, | |||||
| new | |||||
| { | |||||
| Id = 4, | |||||
| Name = "Konacna odluka" | |||||
| }); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionProcess", b => | |||||
| { | |||||
| b.Property<int>("Id") | |||||
| .ValueGeneratedOnAdd() | |||||
| .HasColumnType("int"); | |||||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||||
| b.Property<int>("ApplicantId") | |||||
| .HasColumnType("int"); | |||||
| b.Property<DateTime?>("Date") | |||||
| .HasColumnType("datetime2"); | |||||
| b.Property<string>("Link") | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<string>("Name") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.Property<int?>("SchedulerId") | |||||
| .HasColumnType("int"); | |||||
| b.Property<int>("SelectionLevelId") | |||||
| .HasColumnType("int"); | |||||
| b.Property<string>("Status") | |||||
| .IsRequired() | |||||
| .HasColumnType("nvarchar(max)"); | |||||
| b.HasKey("Id"); | |||||
| b.HasIndex("SchedulerId"); | |||||
| b.HasIndex("SelectionLevelId"); | |||||
| b.ToTable("SelectionProcesses", (string)null); | |||||
| }); | }); | ||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b => | modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b => | ||||
| b.HasKey("TechnologyId"); | b.HasKey("TechnologyId"); | ||||
| b.ToTable("Technologies"); | |||||
| b.ToTable("Technologies", (string)null); | |||||
| }); | }); | ||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.User", b => | modelBuilder.Entity("Diligent.WebAPI.Data.Entities.User", b => | ||||
| b.HasKey("Id"); | b.HasKey("Id"); | ||||
| b.ToTable("WebhookDefinitions"); | |||||
| b.ToTable("WebhookDefinitions", (string)null); | |||||
| }); | }); | ||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b => | modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b => | ||||
| b.HasIndex("WebhookDefinitionId"); | b.HasIndex("WebhookDefinitionId"); | ||||
| b.ToTable("WebhookSubscriptions"); | |||||
| b.ToTable("WebhookSubscriptions", (string)null); | |||||
| }); | }); | ||||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b => | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b => | ||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.ApplicantTechnology", b => | modelBuilder.Entity("Diligent.WebAPI.Data.Entities.ApplicantTechnology", b => | ||||
| { | { | ||||
| b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant") | b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant") | ||||
| .WithMany() | |||||
| .WithMany("ApplicantTechnologies") | |||||
| .HasForeignKey("ApplicantId") | .HasForeignKey("ApplicantId") | ||||
| .OnDelete(DeleteBehavior.Cascade) | .OnDelete(DeleteBehavior.Cascade) | ||||
| .IsRequired(); | .IsRequired(); | ||||
| b.HasOne("Diligent.WebAPI.Data.Entities.Technology", "Tecnology") | b.HasOne("Diligent.WebAPI.Data.Entities.Technology", "Tecnology") | ||||
| .WithMany() | |||||
| .WithMany("ApplicantTechnologies") | |||||
| .HasForeignKey("TechnologyId") | .HasForeignKey("TechnologyId") | ||||
| .OnDelete(DeleteBehavior.Cascade) | .OnDelete(DeleteBehavior.Cascade) | ||||
| .IsRequired(); | .IsRequired(); | ||||
| b.Navigation("User"); | b.Navigation("User"); | ||||
| }); | }); | ||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionProcess", b => | |||||
| { | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.User", "Scheduler") | |||||
| .WithMany() | |||||
| .HasForeignKey("SchedulerId"); | |||||
| b.HasOne("Diligent.WebAPI.Data.Entities.SelectionLevel", "SelectionLevel") | |||||
| .WithMany() | |||||
| .HasForeignKey("SelectionLevelId") | |||||
| .OnDelete(DeleteBehavior.Cascade) | |||||
| .IsRequired(); | |||||
| b.Navigation("Scheduler"); | |||||
| b.Navigation("SelectionLevel"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b => | modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b => | ||||
| { | { | ||||
| b.HasOne("Diligent.WebAPI.Data.Entities.WebhookDefinition", "WebhookDefinition") | b.HasOne("Diligent.WebAPI.Data.Entities.WebhookDefinition", "WebhookDefinition") | ||||
| .OnDelete(DeleteBehavior.Cascade) | .OnDelete(DeleteBehavior.Cascade) | ||||
| .IsRequired(); | .IsRequired(); | ||||
| }); | }); | ||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Applicant", b => | |||||
| { | |||||
| b.Navigation("ApplicantTechnologies"); | |||||
| }); | |||||
| modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b => | |||||
| { | |||||
| b.Navigation("ApplicantTechnologies"); | |||||
| }); | |||||
| #pragma warning restore 612, 618 | #pragma warning restore 612, 618 | ||||
| } | } | ||||
| } | } |
| | |||||
| namespace Diligent.WebAPI.Host.Controllers.V1 | |||||
| namespace Diligent.WebAPI.Host.Controllers.V1 | |||||
| { | { | ||||
| [ApiVersion("1.0")] | [ApiVersion("1.0")] | ||||
| [Route("v{version:apiVersion}/ads")] | [Route("v{version:apiVersion}/ads")] | ||||
| [ApiController] | [ApiController] |
| namespace Diligent.WebAPI.Host.Controllers.V1 | |||||
| { | |||||
| [ApiVersion("1.0")] | |||||
| [Route("v{version:apiVersion}/selectionlevels")] | |||||
| [ApiController] | |||||
| public class SelectionLevelsController : ControllerBase | |||||
| { | |||||
| private readonly ISelectionLevelService _selectionLevelService; | |||||
| public SelectionLevelsController(ISelectionLevelService selectionLevelService) | |||||
| { | |||||
| _selectionLevelService = selectionLevelService; | |||||
| } | |||||
| [HttpGet] | |||||
| public async Task<IActionResult> GetAll() => | |||||
| Ok(await _selectionLevelService.GetAllAsync()); | |||||
| [HttpGet("{id}")] | |||||
| public async Task<IActionResult> GetById([FromRoute] int id) => | |||||
| Ok(await _selectionLevelService.GetByIdAsync(id)); | |||||
| } | |||||
| } |
| | |||||
| using Diligent.WebAPI.Contracts.DTOs.SelectionProcess; | |||||
| namespace Diligent.WebAPI.Host.Controllers.V1 | |||||
| { | |||||
| [ApiVersion("1.0")] | |||||
| [Route("v{version:apiVersion}/selectionprocesses")] | |||||
| [ApiController] | |||||
| public class SelectionProcessesController : ControllerBase | |||||
| { | |||||
| private readonly ISelectionProcessService _selectionProcessesService; | |||||
| public SelectionProcessesController(ISelectionProcessService selectionProcessesService) | |||||
| { | |||||
| _selectionProcessesService = selectionProcessesService; | |||||
| } | |||||
| [HttpGet] | |||||
| public async Task<IActionResult> GetAll() => | |||||
| Ok(await _selectionProcessesService.GetAllAsync()); | |||||
| [HttpGet("{id}")] | |||||
| public async Task<IActionResult> GetById([FromRoute] int id) => | |||||
| Ok(await _selectionProcessesService.GetByIdAsync(id)); | |||||
| [HttpPost] | |||||
| public async Task<IActionResult> Create([FromBody] SelectionProcessCreateDto request) | |||||
| { | |||||
| await _selectionProcessesService.CreateAsync(request); | |||||
| return StatusCode((int)HttpStatusCode.Created); | |||||
| } | |||||
| [HttpPut("{id}")] | |||||
| public async Task<IActionResult> Update([FromBody] SelectionProcessCreateDto request, [FromRoute] int id) | |||||
| { | |||||
| await _selectionProcessesService.UpdateAsync(id, request); | |||||
| return Ok(); | |||||
| } | |||||
| [HttpDelete("{id}")] | |||||
| public async Task<IActionResult> DeleteInsurer([FromRoute] int id) | |||||
| { | |||||
| await _selectionProcessesService.DeleteAsync(id); | |||||
| return NoContent(); | |||||
| } | |||||
| } | |||||
| } |
| services.AddAutoMapper(typeof(WebhookMappingProfile)); | services.AddAutoMapper(typeof(WebhookMappingProfile)); | ||||
| services.AddAutoMapper(typeof(InsurerMappingProfile)); | services.AddAutoMapper(typeof(InsurerMappingProfile)); | ||||
| services.AddAutoMapper(typeof(ApplicantMappingProfile)); | services.AddAutoMapper(typeof(ApplicantMappingProfile)); | ||||
| services.AddAutoMapper(typeof(SelectionProcessMappingProfile)); | |||||
| services.AddAutoMapper(typeof(SelectionLevelMappingProfile)); | |||||
| services.AddScoped<IInsurersService, InsurersService>(); | services.AddScoped<IInsurersService, InsurersService>(); | ||||
| services.AddScoped<IEmailer, Emailer>(); | services.AddScoped<IEmailer, Emailer>(); | ||||
| services.AddScoped<IHttpClientService, HttpClientService>(); | services.AddScoped<IHttpClientService, HttpClientService>(); | ||||
| services.AddScoped<IInsuranceCompaniesService, InsuranceCompaniesService>(); | services.AddScoped<IInsuranceCompaniesService, InsuranceCompaniesService>(); | ||||
| services.AddScoped<ISelectionProcessService, SelectionProcessService>(); | |||||
| services.AddScoped<ISelectionLevelService, SelectionLevelService>(); | |||||
| services.AddScoped<IInsurancePoliciesService, InsurancePoliciesService>(); | services.AddScoped<IInsurancePoliciesService, InsurancePoliciesService>(); | ||||
| services.AddScoped<IWebhookSubscriptionService, WebhookSubscriptionService>(); | services.AddScoped<IWebhookSubscriptionService, WebhookSubscriptionService>(); | ||||
| services.AddScoped<IWebhookDefinitionService, WebhookDefinitionService>(); | services.AddScoped<IWebhookDefinitionService, WebhookDefinitionService>(); |
| { | { | ||||
| "ConnectionStrings": { | "ConnectionStrings": { | ||||
| "WebApi": "Server=192.168.88.105;Database=HRCenter;User Id=hrcentar;Password=" | |||||
| "WebApi": "Data Source=localhost,2433;User=sa;Password=developer_pw;Initial Catalog=WebApiDB;MultipleActiveResultSets=True" | |||||
| }, | }, | ||||
| "Authorization": { | "Authorization": { | ||||
| "JwtExpiredTime": "5", | "JwtExpiredTime": "5", |
| { | { | ||||
| "ConnectionStrings": { | "ConnectionStrings": { | ||||
| "WebApi": "Server=192.168.88.105;Database=HRCenter;User Id=hrcentar;Password=" | |||||
| "WebApi": "Data Source=localhost,2433;User=sa;Password=developer_pw;Initial Catalog=WebApiDB;MultipleActiveResultSets=True" | |||||
| }, | }, | ||||
| "Authorization": { | "Authorization": { | ||||
| "JwtExpiredTime": "5", | "JwtExpiredTime": "5", |