Add Document Table
This commit is contained in:
parent
a0b3b13074
commit
aa691fe65f
10 changed files with 24 additions and 76 deletions
|
|
@ -1,11 +1,12 @@
|
||||||
using BMA.EHR.Application.Common.Interfaces;
|
using BMA.EHR.Application.Common.Interfaces;
|
||||||
|
using BMA.EHR.Domain.Models.Documents;
|
||||||
using BMA.EHR.Domain.Models.MetaData;
|
using BMA.EHR.Domain.Models.MetaData;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using System.Security.AccessControl;
|
using System.Security.AccessControl;
|
||||||
|
|
||||||
namespace BMA.EHR.Application.Repositories
|
namespace BMA.EHR.Application.Repositories
|
||||||
{
|
{
|
||||||
public class PrefixRepository : GenericRepository<Guid, Prefix>
|
public class PrefixRepository : GenericRepository<Guid, Document>
|
||||||
{
|
{
|
||||||
private readonly IApplicationDBContext _dbContext;
|
private readonly IApplicationDBContext _dbContext;
|
||||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace BMA.EHR.Profile.Service.Models.Documents
|
namespace BMA.EHR.Domain.Models.Documents
|
||||||
{
|
{
|
||||||
public class Document
|
public class Document
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using BMA.EHR.Profile.Service.Models.Documents;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using BMA.EHR.Domain.Models.Base;
|
using BMA.EHR.Domain.Models.Base;
|
||||||
|
using BMA.EHR.Domain.Models.Documents;
|
||||||
|
|
||||||
namespace BMA.EHR.Profile.Service.Models.HR
|
namespace BMA.EHR.Profile.Service.Models.HR
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
using BMA.EHR.Profile.Service.Models.Documents;
|
using BMA.EHR.Domain.Models.Base;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using BMA.EHR.Domain.Models.Documents;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using BMA.EHR.Domain.Models.Base;
|
|
||||||
|
|
||||||
namespace BMA.EHR.Profile.Service.Models.HR
|
namespace BMA.EHR.Profile.Service.Models.HR
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
using System;
|
using BMA.EHR.Domain.Models.Base;
|
||||||
using System.Collections.Generic;
|
using BMA.EHR.Domain.Models.Documents;
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using BMA.EHR.Profile.Service.Models.Documents;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using BMA.EHR.Domain.Models.Base;
|
|
||||||
|
|
||||||
namespace BMA.EHR.Profile.Service.Models.HR
|
namespace BMA.EHR.Profile.Service.Models.HR
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
using System;
|
using BMA.EHR.Domain.Models.Base;
|
||||||
using System.Collections.Generic;
|
using BMA.EHR.Domain.Models.Documents;
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using BMA.EHR.Profile.Service.Models.Documents;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using BMA.EHR.Domain.Models.Base;
|
|
||||||
|
|
||||||
namespace BMA.EHR.Profile.Service.Models.HR
|
namespace BMA.EHR.Profile.Service.Models.HR
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
using BMA.EHR.Profile.Service.Models.Documents;
|
using BMA.EHR.Domain.Models.Base;
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using BMA.EHR.Domain.Models.Base;
|
|
||||||
|
|
||||||
namespace BMA.EHR.Profile.Service.Models.HR
|
namespace BMA.EHR.Profile.Service.Models.HR
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
using BMA.EHR.Domain.Models.Base;
|
using BMA.EHR.Domain.Models.Base;
|
||||||
using BMA.EHR.Profile.Service.Models.Documents;
|
using BMA.EHR.Domain.Models.Documents;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
||||||
<PackageReference Include="Oracle.EntityFrameworkCore" Version="7.21.9" />
|
<PackageReference Include="Oracle.EntityFrameworkCore" Version="7.21.9" />
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using BMA.EHR.Application.Common.Interfaces;
|
using BMA.EHR.Application.Common.Interfaces;
|
||||||
|
using BMA.EHR.Domain.Models.Documents;
|
||||||
using BMA.EHR.Domain.Models.MetaData;
|
using BMA.EHR.Domain.Models.MetaData;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
|
@ -94,67 +95,18 @@ namespace BMA.EHR.Infrastructure.Persistence
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region " Documents "
|
||||||
|
|
||||||
|
public DbSet<Document> Documents { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public ApplicationDBContext(DbContextOptions<ApplicationDBContext> options) : base(options)
|
public ApplicationDBContext(DbContextOptions<ApplicationDBContext> options) : base(options)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
//Ignore Existing table from other service
|
|
||||||
//modelBuilder.Ignore<Prefix>();
|
|
||||||
//modelBuilder.Ignore<BloodGroup>();
|
|
||||||
//modelBuilder.Ignore<Gender>();
|
|
||||||
//modelBuilder.Ignore<PhysicalStatus>();
|
|
||||||
//modelBuilder.Ignore<Religion>();
|
|
||||||
//modelBuilder.Ignore<EducationLevel>();
|
|
||||||
//modelBuilder.Ignore<PositionPath>();
|
|
||||||
//modelBuilder.Ignore<PositionType>();
|
|
||||||
//modelBuilder.Ignore<PositionEmployeePosition>();
|
|
||||||
//modelBuilder.Ignore<PositionEmployeePositionSide>();
|
|
||||||
//modelBuilder.Ignore<PositionEmployeeGroup>();
|
|
||||||
//modelBuilder.Ignore<PositionEmployeeLine>();
|
|
||||||
//modelBuilder.Ignore<PositionEmployeeLevel>();
|
|
||||||
//modelBuilder.Ignore<PositionEmployeeStatus>();
|
|
||||||
//modelBuilder.Ignore<PositionLine>();
|
|
||||||
//modelBuilder.Ignore<PositionExecutive>();
|
|
||||||
//modelBuilder.Ignore<PositionStatus>();
|
|
||||||
//modelBuilder.Ignore<PositionLevel>();
|
|
||||||
//modelBuilder.Ignore<Relationship>();
|
|
||||||
//modelBuilder.Ignore<Position>();
|
|
||||||
//modelBuilder.Ignore<PositionPathSide>();
|
|
||||||
//modelBuilder.Ignore<PositionExecutiveSide>();
|
|
||||||
//modelBuilder.Ignore<InsigniaType>();
|
|
||||||
//modelBuilder.Ignore<Insignia>();
|
|
||||||
//modelBuilder.Ignore<Province>();
|
|
||||||
//modelBuilder.Ignore<District>();
|
|
||||||
//modelBuilder.Ignore<SubDistrict>();
|
|
||||||
//modelBuilder.Ignore<Holiday>();
|
|
||||||
//modelBuilder.Ignore<OrganizationType>();
|
|
||||||
//modelBuilder.Ignore<OrganizationLevel>();
|
|
||||||
//modelBuilder.Ignore<OrganizationOrganization>();
|
|
||||||
//modelBuilder.Ignore<OrganizationShortName>();
|
|
||||||
//modelBuilder.Ignore<OrganizationStatus>();
|
|
||||||
//modelBuilder.Ignore<OrganizationAgency>();
|
|
||||||
//modelBuilder.Ignore<OrganizationGovernmentAgency>();
|
|
||||||
//modelBuilder.Ignore<OrganizationTelExternal>();
|
|
||||||
//modelBuilder.Ignore<OrganizationTelInternal>();
|
|
||||||
//modelBuilder.Ignore<OrganizationFax>();
|
|
||||||
//modelBuilder.Ignore<RoyalHierarchy>();
|
|
||||||
//modelBuilder.Ignore<RoyalType>();
|
|
||||||
//modelBuilder.Ignore<Royal>();
|
|
||||||
|
|
||||||
base.OnModelCreating(modelBuilder);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override DbSet<TEntity> Set<TEntity>() where TEntity : class
|
|
||||||
{
|
|
||||||
return base.Set<TEntity>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task<int> SaveChangesAsync()
|
public Task<int> SaveChangesAsync()
|
||||||
{
|
{
|
||||||
return base.SaveChangesAsync();
|
return base.SaveChangesAsync();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue