[修改启用禁用时,启用时间,增加字段]

This commit is contained in:
2024-02-21 09:30:41 +08:00
parent edf8af3e4d
commit 2594ecd27e
4 changed files with 17 additions and 1 deletions
@@ -228,8 +228,12 @@ namespace IRaCIS.Application.Contracts
public DateTime? DeletedTime { get; set; }
public DateTime? EnabledTime { get; set; }
public DateTime UpdateTime { get; set; }
public DateTime CreateTime { get; set; }
public string Site { get; set; } = String.Empty;
public string SiteCode { get; set; } = String.Empty;
@@ -278,6 +278,16 @@ namespace IRaCIS.Core.Application.Services
_mapper.Map(editTrialSiteCommand, dbEntity);
if (editTrialSiteCommand.IsDeleted)
{
dbEntity.EnabledTime = null;
}
else
{
dbEntity.EnabledTime = DateTime.Now;
}
await _trialSiteRepository.SaveChangesAsync();
return ResponseOutput.Ok();