Compare commits
No commits in common. "68fe2b75dc64c85073196ee66a90a09005dd2412" and "9cda4360ca6c829c3d610fc48cb4ec972457fead" have entirely different histories.
68fe2b75dc
...
9cda4360ca
|
|
@ -1,70 +0,0 @@
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
|
||||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
|
||||||
// 生成时间 2025-10-20 06:17:15Z
|
|
||||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
|
||||||
//--------------------------------------------------------------------
|
|
||||||
using System;
|
|
||||||
using IRaCIS.Core.Domain.Share;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
namespace IRaCIS.Core.Application.Service.Document.DTO;
|
|
||||||
|
|
||||||
public class UserAgreementView : UserAgreementAddOrEdit
|
|
||||||
{
|
|
||||||
|
|
||||||
public DateTime CreateTime { get; set; }
|
|
||||||
|
|
||||||
public DateTime UpdateTime { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public class UserAgreementAddOrEdit
|
|
||||||
{
|
|
||||||
public Guid? Id { get; set; }
|
|
||||||
|
|
||||||
public DateTime EffectiveDate { get; set; }
|
|
||||||
|
|
||||||
public string FileContent { get; set; }
|
|
||||||
|
|
||||||
public string FileName { get; set; }
|
|
||||||
|
|
||||||
public string FileVersion { get; set; }
|
|
||||||
|
|
||||||
public bool IsCurrentVersion { get; set; }
|
|
||||||
|
|
||||||
public DateTime UpdateDate { get; set; }
|
|
||||||
|
|
||||||
public UserAgreementType UserAgreementTypeEnum { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public class SetCurrentVersionInDto
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class UserAgreementQuery:PageInput
|
|
||||||
{
|
|
||||||
public DateTime? StartEffectiveDate { get; set; }
|
|
||||||
|
|
||||||
public DateTime? EndEffectiveDate { get; set; }
|
|
||||||
|
|
||||||
public string? FileContent { get; set; }
|
|
||||||
|
|
||||||
public string? FileName { get; set; }
|
|
||||||
|
|
||||||
public string? FileVersion { get; set; }
|
|
||||||
|
|
||||||
public bool? IsCurrentVersion { get; set; }
|
|
||||||
|
|
||||||
public DateTime? StartUpdateDate { get; set; }
|
|
||||||
|
|
||||||
public DateTime? EndUpdateDate { get; set; }
|
|
||||||
|
|
||||||
public UserAgreementType? UserAgreementTypeEnum { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
|
||||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
|
||||||
// 生成时间 2025-10-20 06:17:15Z
|
|
||||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
|
||||||
//--------------------------------------------------------------------
|
|
||||||
using System;
|
|
||||||
using IRaCIS.Core.Infrastructure.Extention;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using IRaCIS.Core.Application.Service.Document.DTO;
|
|
||||||
namespace IRaCIS.Core.Application.Service.Document.Interface;
|
|
||||||
|
|
||||||
public interface IUserAgreementService
|
|
||||||
{
|
|
||||||
|
|
||||||
Task<PageOutput<UserAgreementView>> GetUserAgreementList(UserAgreementQuery inQuery);
|
|
||||||
|
|
||||||
Task<IResponseOutput> AddOrUpdateUserAgreement(UserAgreementAddOrEdit addOrEditUserAgreement);
|
|
||||||
|
|
||||||
Task<IResponseOutput> DeleteUserAgreement(Guid userAgreementId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,100 +0,0 @@
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
|
||||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
|
||||||
// 生成时间 2025-10-20 06:17:11Z
|
|
||||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
|
||||||
//--------------------------------------------------------------------
|
|
||||||
using IRaCIS.Core.Domain.Models;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using IRaCIS.Core.Infrastructure.Extention;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using IRaCIS.Core.Infra.EFCore;
|
|
||||||
using IRaCIS.Core.Application.Service.Document.Interface;
|
|
||||||
using IRaCIS.Core.Application.Service.Document.DTO;
|
|
||||||
namespace IRaCIS.Core.Application.Service;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 用户协议和隐私采集服务
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="_userAgreementRepository"></param>
|
|
||||||
/// <param name="_mapper"></param>
|
|
||||||
/// <param name="_userInfo"></param>
|
|
||||||
/// <param name="_localizer"></param>
|
|
||||||
[ApiExplorerSettings(GroupName = "FileRecord")]
|
|
||||||
public class UserAgreementService(IRepository<UserAgreement> _userAgreementRepository,
|
|
||||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer): BaseService, IUserAgreementService
|
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取用户协议和隐私采集列表
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="inQuery"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<PageOutput<UserAgreementView>> GetUserAgreementList(UserAgreementQuery inQuery)
|
|
||||||
{
|
|
||||||
var userAgreementQueryable =_userAgreementRepository
|
|
||||||
.WhereIf(inQuery.StartEffectiveDate.HasValue, t => t.EffectiveDate >= inQuery.StartEffectiveDate.Value)
|
|
||||||
.WhereIf(inQuery.EndEffectiveDate.HasValue, t => t.EffectiveDate <= inQuery.EndEffectiveDate.Value)
|
|
||||||
.WhereIf(inQuery.FileContent != null, t => t.FileContent.Contains(inQuery.FileContent))
|
|
||||||
.WhereIf(inQuery.FileName != null, t => t.FileName.Contains(inQuery.FileName))
|
|
||||||
.WhereIf(inQuery.FileVersion != null, t => t.FileVersion.Contains(inQuery.FileVersion))
|
|
||||||
.WhereIf(inQuery.IsCurrentVersion != null, t => t.IsCurrentVersion==inQuery.IsCurrentVersion)
|
|
||||||
.WhereIf(inQuery.UserAgreementTypeEnum != null, t => t.UserAgreementTypeEnum == inQuery.UserAgreementTypeEnum)
|
|
||||||
.WhereIf(inQuery.StartUpdateDate.HasValue, t => t.UpdateDate >= inQuery.StartUpdateDate.Value)
|
|
||||||
.WhereIf(inQuery.EndUpdateDate.HasValue, t => t.UpdateDate <= inQuery.EndUpdateDate.Value)
|
|
||||||
.ProjectTo<UserAgreementView>(_mapper.ConfigurationProvider);
|
|
||||||
var pageList= await userAgreementQueryable.ToPagedListAsync(inQuery);
|
|
||||||
|
|
||||||
return pageList;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 设置为当前版本
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="inDto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<IResponseOutput> SetCurrentVersion(SetCurrentVersionInDto inDto)
|
|
||||||
{
|
|
||||||
var userAgreement=await _userAgreementRepository.Where(x=>x.Id==inDto.Id).FirstNotNullAsync();
|
|
||||||
await _userAgreementRepository.UpdatePartialFromQueryAsync(
|
|
||||||
x => x.UserAgreementTypeEnum== userAgreement.UserAgreementTypeEnum&&x.IsCurrentVersion,
|
|
||||||
x => new UserAgreement { IsCurrentVersion = false },true);
|
|
||||||
|
|
||||||
await _userAgreementRepository.UpdatePartialFromQueryAsync(
|
|
||||||
inDto.Id,
|
|
||||||
x => new UserAgreement { IsCurrentVersion = true },true);
|
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 新增或者修改用户协议和隐私采集
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="addOrEditUserAgreement"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<IResponseOutput> AddOrUpdateUserAgreement(UserAgreementAddOrEdit addOrEditUserAgreement)
|
|
||||||
{
|
|
||||||
var entity = await _userAgreementRepository.InsertOrUpdateAsync(addOrEditUserAgreement, true);
|
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 删除用户协议和隐私采集
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="userAgreementId"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpDelete("{userAgreementId:guid}")]
|
|
||||||
public async Task<IResponseOutput> DeleteUserAgreement(Guid userAgreementId)
|
|
||||||
{
|
|
||||||
var success = await _userAgreementRepository.DeleteFromQueryAsync(t => t.Id == userAgreementId,true);
|
|
||||||
return ResponseOutput.Ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
using AutoMapper.EquivalencyExpression;
|
using AutoMapper.EquivalencyExpression;
|
||||||
using IRaCIS.Application.Contracts;
|
using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Service.Document.DTO;
|
|
||||||
using IRaCIS.Core.Application.Service.DTO;
|
using IRaCIS.Core.Application.Service.DTO;
|
||||||
using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
using IRaCIS.Core.Infrastructure.Extention;
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
|
|
@ -17,11 +16,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
var userId = Guid.Empty;
|
var userId = Guid.Empty;
|
||||||
var isEn_Us = false;
|
var isEn_Us = false;
|
||||||
|
|
||||||
// 在此处拷贝automapper 映射
|
|
||||||
|
|
||||||
CreateMap<UserAgreement, UserAgreementView>();
|
|
||||||
CreateMap<UserAgreement, UserAgreementAddOrEdit>().ReverseMap();
|
|
||||||
|
|
||||||
// 在此处拷贝automapper 映射
|
// 在此处拷贝automapper 映射
|
||||||
CreateMap<TrialDocumentAttachment, TrialDocumentAttachmentView>();
|
CreateMap<TrialDocumentAttachment, TrialDocumentAttachmentView>();
|
||||||
CreateMap<TrialDocumentAttachment, TrialDocumentAttachmentAddOrEdit>().ReverseMap();
|
CreateMap<TrialDocumentAttachment, TrialDocumentAttachmentAddOrEdit>().ReverseMap();
|
||||||
|
|
|
||||||
|
|
@ -112,15 +112,7 @@ namespace IRaCIS.Application.Contracts
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime? LastChangePassWordTime { get; set; }
|
public DateTime? LastChangePassWordTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 用户协议Id
|
|
||||||
/// </summary>
|
|
||||||
public Guid? UserAgreementId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 隐私政策Id
|
|
||||||
/// </summary>
|
|
||||||
public Guid? PrivacyPolicyId { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MenuFuncTreeNodeView
|
public class MenuFuncTreeNodeView
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
public class UserService(IRepository<UserRole> _userRoleRepository,
|
public class UserService(IRepository<UserRole> _userRoleRepository,
|
||||||
IMailVerificationService _mailVerificationService,
|
IMailVerificationService _mailVerificationService,
|
||||||
IRepository<VerificationCode> _verificationCodeRepository,
|
IRepository<VerificationCode> _verificationCodeRepository,
|
||||||
IRepository<UserAgreement> _userAgreementRepository,
|
|
||||||
IRepository<TrialUserRole> _userTrialRepository,
|
IRepository<TrialUserRole> _userTrialRepository,
|
||||||
IRepository<UserLog> _userLogRepository,
|
IRepository<UserLog> _userLogRepository,
|
||||||
IRepository<UserPassWordLog> _userPassWordLogRepository,
|
IRepository<UserPassWordLog> _userPassWordLogRepository,
|
||||||
|
|
@ -1102,52 +1101,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
//登录成功 清除缓存
|
//登录成功 清除缓存
|
||||||
await _fusionCache.SetAsync(cacheKey, 0, TimeSpan.FromMinutes(lockoutMinutes));
|
await _fusionCache.SetAsync(cacheKey, 0, TimeSpan.FromMinutes(lockoutMinutes));
|
||||||
|
|
||||||
// 记录同意用户协议以及隐私政策
|
|
||||||
#region 记录同意用户协议以及隐私政策
|
|
||||||
|
|
||||||
var userAgreementList = await _userAgreementRepository.Where(t => t.IsCurrentVersion).OrderByDescending(t => t.CreateTime).ToListAsync();
|
|
||||||
|
|
||||||
var userAgreement= userAgreementList.FirstOrDefault(t => t.UserAgreementTypeEnum == UserAgreementType.UserAgreement);
|
|
||||||
|
|
||||||
if (userAgreement!=null&& loginUser.UserAgreementId!= userAgreement.Id)
|
|
||||||
{
|
|
||||||
await _identityUserRepository.BatchUpdateNoTrackingAsync(x => x.Id == loginUser.IdentityUserId, x => new IdentityUser()
|
|
||||||
{
|
|
||||||
UserAgreementId = userAgreement.Id,
|
|
||||||
});
|
|
||||||
|
|
||||||
var obj = new
|
|
||||||
{
|
|
||||||
UserAgreementTypeEnum = UserAgreementType.UserAgreement,
|
|
||||||
FileVersion=userAgreement.FileVersion,
|
|
||||||
UserAgreementId=userAgreement.Id
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = loginUser.IdentityUserId, ActionUserName = loginUser.UserName, OptType = UserOptType.AcceptUserAgreement, JsonObj= obj.ToJsonStr() }, true);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
var privacyCollection = userAgreementList.FirstOrDefault(t => t.UserAgreementTypeEnum == UserAgreementType.PrivacyCollection);
|
|
||||||
|
|
||||||
if (privacyCollection != null && loginUser.PrivacyPolicyId != privacyCollection.Id)
|
|
||||||
{
|
|
||||||
await _identityUserRepository.BatchUpdateNoTrackingAsync(x => x.Id == loginUser.IdentityUserId, x => new IdentityUser()
|
|
||||||
{
|
|
||||||
PrivacyPolicyId = privacyCollection.Id,
|
|
||||||
});
|
|
||||||
|
|
||||||
var obj = new
|
|
||||||
{
|
|
||||||
UserAgreementTypeEnum = UserAgreementType.PrivacyCollection,
|
|
||||||
FileVersion = privacyCollection.FileVersion,
|
|
||||||
UserAgreementId = privacyCollection.Id
|
|
||||||
};
|
|
||||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = loginUser.IdentityUserId, ActionUserName = loginUser.UserName, OptType = UserOptType.AcceptPrivacyPolicy, JsonObj = obj.ToJsonStr() }, true);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = loginUser.IdentityUserId, ActionUserName = loginUser.UserName, OptType = UserOptType.Login, IsLoginUncommonly = isLoginUncommonly }, true);
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = loginUser.IdentityUserId, ActionUserName = loginUser.UserName, OptType = UserOptType.Login, IsLoginUncommonly = isLoginUncommonly }, true);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -243,8 +243,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
|
|
||||||
CreateMap<ReadingQuestionTrial, TrialAdditionaQuestion>()
|
CreateMap<ReadingQuestionTrial, TrialAdditionaQuestion>()
|
||||||
.ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo == null ? string.Empty : s.GroupInfo.GroupName))
|
.ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupName : s.GroupInfo.GroupName))
|
||||||
.ForMember(d => d.GroupEnName, u => u.MapFrom(s => s.GroupInfo == null ? string.Empty : s.GroupInfo.GroupEnName))
|
.ForMember(d => d.GroupEnName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupEnName : s.GroupInfo.GroupEnName))
|
||||||
.ForMember(t => t.PageName, u => u.MapFrom(c => c.ReadingCriterionPage.PageName))
|
.ForMember(t => t.PageName, u => u.MapFrom(c => c.ReadingCriterionPage.PageName))
|
||||||
.ForMember(d => d.ParentQuestionGenre, u => u.MapFrom(s => s.ParentReadingQuestionTrial.QuestionGenre))
|
.ForMember(d => d.ParentQuestionGenre, u => u.MapFrom(s => s.ParentReadingQuestionTrial.QuestionGenre))
|
||||||
.ForMember(d => d.ParentDictionaryCode, u => u.MapFrom(s => s.ParentReadingQuestionTrial.DictionaryCode))
|
.ForMember(d => d.ParentDictionaryCode, u => u.MapFrom(s => s.ParentReadingQuestionTrial.DictionaryCode))
|
||||||
|
|
@ -253,8 +253,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.ForMember(t => t.ParentQuestionShowOrder, u => u.MapFrom(c => c.ParentReadingQuestionTrial.ShowOrder));
|
.ForMember(t => t.ParentQuestionShowOrder, u => u.MapFrom(c => c.ParentReadingQuestionTrial.ShowOrder));
|
||||||
|
|
||||||
CreateMap<ReadingQuestionTrial, TrialReadQuestion>()
|
CreateMap<ReadingQuestionTrial, TrialReadQuestion>()
|
||||||
.ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo == null ? string.Empty : s.GroupInfo.GroupName))
|
.ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupName : s.GroupInfo.GroupName))
|
||||||
.ForMember(d => d.GroupEnName, u => u.MapFrom(s => s.GroupInfo == null ? string.Empty : s.GroupInfo.GroupEnName))
|
.ForMember(d => d.GroupEnName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupEnName : s.GroupInfo.GroupEnName))
|
||||||
.ForMember(t => t.PageName, u => u.MapFrom(c => c.ReadingCriterionPage.PageName))
|
.ForMember(t => t.PageName, u => u.MapFrom(c => c.ReadingCriterionPage.PageName))
|
||||||
.ForMember(d => d.ParentQuestionGenre, u => u.MapFrom(s => s.ParentReadingQuestionTrial.QuestionGenre))
|
.ForMember(d => d.ParentQuestionGenre, u => u.MapFrom(s => s.ParentReadingQuestionTrial.QuestionGenre))
|
||||||
.ForMember(d => d.ParentDictionaryCode, u => u.MapFrom(s => s.ParentReadingQuestionTrial.DictionaryCode))
|
.ForMember(d => d.ParentDictionaryCode, u => u.MapFrom(s => s.ParentReadingQuestionTrial.DictionaryCode))
|
||||||
|
|
|
||||||
|
|
@ -52,17 +52,7 @@ public enum UserOptType
|
||||||
|
|
||||||
AddUser = 14,
|
AddUser = 14,
|
||||||
|
|
||||||
WebUnlock=16,
|
WebUnlock=16
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 同意用户协议
|
|
||||||
/// </summary>
|
|
||||||
AcceptUserAgreement=19,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 同意隐私政策
|
|
||||||
/// </summary>
|
|
||||||
AcceptPrivacyPolicy = 20
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Description("影像下载打包状态")]
|
[Description("影像下载打包状态")]
|
||||||
|
|
@ -113,20 +103,3 @@ public enum ReReadingOrBackOptType
|
||||||
Return = 2,
|
Return = 2,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 用户协议类型
|
|
||||||
/// </summary>
|
|
||||||
public enum UserAgreementType
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 用户协议
|
|
||||||
/// </summary>
|
|
||||||
UserAgreement = 0,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 隐私采集
|
|
||||||
/// </summary>
|
|
||||||
PrivacyCollection = 1,
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -142,16 +142,6 @@ public class IdentityUser : BaseFullAuditEntity
|
||||||
public Guid? TrialId { get; set; }
|
public Guid? TrialId { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 用户协议Id
|
|
||||||
/// </summary>
|
|
||||||
public Guid? UserAgreementId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 隐私政策Id
|
|
||||||
/// </summary>
|
|
||||||
public Guid? PrivacyPolicyId { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum UserCeateSource
|
public enum UserCeateSource
|
||||||
|
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
using IRaCIS.Core.Domain.Share;
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Domain.Models;
|
|
||||||
|
|
||||||
[Comment("后台 - 用户协议和隐私采集")]
|
|
||||||
[Table("UserAgreement")]
|
|
||||||
public class UserAgreement : BaseFullAuditEntity
|
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 文件类型
|
|
||||||
/// </summary>
|
|
||||||
public UserAgreementType UserAgreementTypeEnum { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 文件名称
|
|
||||||
/// </summary>
|
|
||||||
public string FileName { get; set; }= string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 文件版本
|
|
||||||
/// </summary>
|
|
||||||
public string FileVersion { get; set; }=string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 文件内容
|
|
||||||
/// </summary>
|
|
||||||
[MaxLength]
|
|
||||||
public string FileContent { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 更新日期
|
|
||||||
/// </summary>
|
|
||||||
public DateTime UpdateDate { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 生效日期
|
|
||||||
/// </summary>
|
|
||||||
public DateTime EffectiveDate { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 当前版本
|
|
||||||
/// </summary>
|
|
||||||
public bool IsCurrentVersion { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -590,7 +590,6 @@ public class IRaCISDBContext : DbContext
|
||||||
public virtual DbSet<PublishLog> PublishLog { get; set; }
|
public virtual DbSet<PublishLog> PublishLog { get; set; }
|
||||||
public virtual DbSet<UserLog> UserLog { get; set; }
|
public virtual DbSet<UserLog> UserLog { get; set; }
|
||||||
|
|
||||||
public virtual DbSet<UserAgreement> UserAgreement { get; set; }
|
|
||||||
|
|
||||||
public virtual DbSet<EmailNoticeUserType> EmailNoticeUserType { get; set; }
|
public virtual DbSet<EmailNoticeUserType> EmailNoticeUserType { get; set; }
|
||||||
public virtual DbSet<TrialEmailBlackUser> TrialEmailBlackUser { get; set; }
|
public virtual DbSet<TrialEmailBlackUser> TrialEmailBlackUser { get; set; }
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,56 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class UserAgreement : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "UserAgreement",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
||||||
UserAgreementTypeEnum = table.Column<int>(type: "int", nullable: false),
|
|
||||||
FileName = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
|
|
||||||
FileVersion = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
|
|
||||||
FileContent = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
||||||
EffectiveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
||||||
IsCurrentVersion = table.Column<bool>(type: "bit", nullable: false),
|
|
||||||
CreateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
||||||
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
||||||
UpdateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
||||||
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_UserAgreement", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_UserAgreement_User_CreateUserId",
|
|
||||||
column: x => x.CreateUserId,
|
|
||||||
principalTable: "User",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
},
|
|
||||||
comment: "后台 - 用户协议和隐私采集");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_UserAgreement_CreateUserId",
|
|
||||||
table: "UserAgreement",
|
|
||||||
column: "CreateUserId");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "UserAgreement");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -14220,59 +14220,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserAgreement", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreateTime")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<Guid>("CreateUserId")
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<DateTime>("EffectiveDate")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<string>("FileContent")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("FileName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(400)
|
|
||||||
.HasColumnType("nvarchar(400)");
|
|
||||||
|
|
||||||
b.Property<string>("FileVersion")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(400)
|
|
||||||
.HasColumnType("nvarchar(400)");
|
|
||||||
|
|
||||||
b.Property<bool>("IsCurrentVersion")
|
|
||||||
.HasColumnType("bit");
|
|
||||||
|
|
||||||
b.Property<DateTime>("UpdateDate")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<DateTime>("UpdateTime")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<Guid>("UpdateUserId")
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<int>("UserAgreementTypeEnum")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("CreateUserId");
|
|
||||||
|
|
||||||
b.ToTable("UserAgreement", t =>
|
|
||||||
{
|
|
||||||
t.HasComment("后台 - 用户协议和隐私采集");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b =>
|
modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
@ -19534,17 +19481,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
b.Navigation("CreateUserRole");
|
b.Navigation("CreateUserRole");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserAgreement", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("CreateUserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("CreateUserRole");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b =>
|
modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue