88 lines
3.2 KiB
C#
88 lines
3.2 KiB
C#
using AutoMapper;
|
|
using Erp.SqlQueryManager.Application.Contracts;
|
|
using Erp.SqlQueryManager.Domain.Entities;
|
|
using Volo.Abp.AutoMapper;
|
|
|
|
namespace Erp.SqlQueryManager.Application;
|
|
|
|
public class SqlQueryManagerAutoMapperProfile : Profile
|
|
{
|
|
public SqlQueryManagerAutoMapperProfile()
|
|
{
|
|
CreateMap<SqlQuery, SqlQueryDto>();
|
|
CreateMap<CreateSqlQueryDto, SqlQuery>()
|
|
.IgnoreFullAuditedObjectProperties()
|
|
.Ignore(x => x.Id)
|
|
.Ignore(x => x.TenantId)
|
|
.Ignore(x => x.Status)
|
|
.Ignore(x => x.LastExecutedAt)
|
|
.Ignore(x => x.ExecutionCount);
|
|
|
|
CreateMap<UpdateSqlQueryDto, SqlQuery>()
|
|
.IgnoreFullAuditedObjectProperties()
|
|
.Ignore(x => x.Id)
|
|
.Ignore(x => x.TenantId)
|
|
.Ignore(x => x.Status)
|
|
.Ignore(x => x.LastExecutedAt)
|
|
.Ignore(x => x.ExecutionCount);
|
|
|
|
CreateMap<SqlStoredProcedure, SqlStoredProcedureDto>().Ignore(x => x.IsCustom);
|
|
CreateMap<CreateSqlStoredProcedureDto, SqlStoredProcedure>()
|
|
.IgnoreFullAuditedObjectProperties()
|
|
.Ignore(x => x.Id)
|
|
.Ignore(x => x.TenantId)
|
|
.Ignore(x => x.Status)
|
|
.Ignore(x => x.IsDeployed)
|
|
.Ignore(x => x.LastDeployedAt);
|
|
|
|
CreateMap<UpdateSqlStoredProcedureDto, SqlStoredProcedure>()
|
|
.IgnoreFullAuditedObjectProperties()
|
|
.Ignore(x => x.Id)
|
|
.Ignore(x => x.TenantId)
|
|
.Ignore(x => x.ProcedureName)
|
|
.Ignore(x => x.SchemaName)
|
|
.Ignore(x => x.DataSourceCode)
|
|
.Ignore(x => x.Status)
|
|
.Ignore(x => x.IsDeployed)
|
|
.Ignore(x => x.LastDeployedAt);
|
|
|
|
CreateMap<SqlView, SqlViewDto>().Ignore(x => x.IsCustom);
|
|
CreateMap<CreateSqlViewDto, SqlView>()
|
|
.IgnoreFullAuditedObjectProperties()
|
|
.Ignore(x => x.Id)
|
|
.Ignore(x => x.TenantId)
|
|
.Ignore(x => x.Status)
|
|
.Ignore(x => x.IsDeployed)
|
|
.Ignore(x => x.LastDeployedAt);
|
|
CreateMap<UpdateSqlViewDto, SqlView>()
|
|
.IgnoreFullAuditedObjectProperties()
|
|
.Ignore(x => x.Id)
|
|
.Ignore(x => x.TenantId)
|
|
.Ignore(x => x.ViewName)
|
|
.Ignore(x => x.SchemaName)
|
|
.Ignore(x => x.DataSourceCode)
|
|
.Ignore(x => x.Status)
|
|
.Ignore(x => x.IsDeployed)
|
|
.Ignore(x => x.LastDeployedAt);
|
|
|
|
CreateMap<SqlFunction, SqlFunctionDto>().Ignore(x => x.IsCustom);
|
|
CreateMap<CreateSqlFunctionDto, SqlFunction>()
|
|
.IgnoreFullAuditedObjectProperties()
|
|
.Ignore(x => x.Id)
|
|
.Ignore(x => x.TenantId)
|
|
.Ignore(x => x.Status)
|
|
.Ignore(x => x.IsDeployed)
|
|
.Ignore(x => x.LastDeployedAt);
|
|
CreateMap<UpdateSqlFunctionDto, SqlFunction>()
|
|
.IgnoreFullAuditedObjectProperties()
|
|
.Ignore(x => x.Id)
|
|
.Ignore(x => x.TenantId)
|
|
.Ignore(x => x.FunctionName)
|
|
.Ignore(x => x.SchemaName)
|
|
.Ignore(x => x.FunctionType)
|
|
.Ignore(x => x.DataSourceCode)
|
|
.Ignore(x => x.Status)
|
|
.Ignore(x => x.IsDeployed)
|
|
.Ignore(x => x.LastDeployedAt);
|
|
}
|
|
}
|