Skip to content

Commit 9851a4c

Browse files
committed
refactor(DataBase): 重构缓存状态接口和删除标记
将 ISafeDelete 和 ISafeUpdate 接口替换为 ISafeDeletedFilter 和 ISafeUpdateFilter 修改 BaseCacheState 中 IsDeleted 属性为可空布尔类型
1 parent fe368b9 commit 9851a4c

File tree

4 files changed

+4
-100
lines changed

4 files changed

+4
-100
lines changed

GameFrameX.DataBase/Abstractions/ICacheState.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@
2929
// Official Documentation: https://gameframex.doc.alianblank.com/
3030
// ==========================================================================================
3131

32+
using GameFrameX.Foundation.Orm.Entity.Filter;
33+
3234
namespace GameFrameX.DataBase.Abstractions;
3335

3436
/// <summary>
3537
/// 缓存数据对象接口
3638
/// </summary>
37-
public interface ICacheState : ISafeDelete, ISafeCreate, ISafeUpdate
39+
public interface ICacheState : ISafeDeletedFilter, ISafeCreate, ISafeUpdateFilter
3840
{
3941
/// <summary>
4042
/// 唯一ID

GameFrameX.DataBase/Abstractions/ISafeDelete.cs

Lines changed: 0 additions & 50 deletions
This file was deleted.

GameFrameX.DataBase/Abstractions/ISafeUpdate.cs

Lines changed: 0 additions & 48 deletions
This file was deleted.

GameFrameX.DataBase/BaseCacheState.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public virtual bool IsModify()
5858
/// <summary>
5959
/// 是否删除
6060
/// </summary>
61-
public virtual bool IsDeleted { get; set; }
61+
public virtual bool? IsDeleted { get; set; }
6262

6363
/// <summary>
6464
/// 删除时间

0 commit comments

Comments
 (0)