Skip to content

Commit 3a09861

Browse files
committed
refactor(docs): 重命名实体类和属性以保持命名一致性
更新文档中的类名从EntityBaseSelect到EntitySelectBase 将IndexAttribute重命名为EntityIndexAttribute以明确其用途
1 parent 1930df1 commit 3a09861

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

GameFrameX.Foundation.Orm.Attribute/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,16 @@ public class CountryCode
106106
}
107107
```
108108

109-
#### IndexAttribute
109+
#### EntityIndexAttribute
110110
索引特性,标记属性或字段需要创建数据库索引。
111111

112112
```csharp
113113
public class User
114114
{
115-
[Index("IX_User_Email", IsUnique = true)]
115+
[EntityIndex("IX_User_Email", Unique = true)]
116116
public string Email { get; set; }
117117

118-
[Index("IX_User_Status_CreateTime", Order = 1)]
118+
[EntityIndex("IX_User_Status_CreateTime", IsAscending = true)]
119119
public string Status { get; set; }
120120
}
121121
```
@@ -180,12 +180,12 @@ public class Document
180180
```csharp
181181
[CacheTable("Redis", 60)]
182182
[ReadOnlyTable(EnableCache = true)]
183-
[Index("IX_Product_Category")]
183+
[EntityIndex("IX_Product_Category")]
184184
public class Product
185185
{
186186
public int Id { get; set; }
187187

188-
[Index("IX_Product_Category")]
188+
[EntityIndex("IX_Product_Category")]
189189
public string Category { get; set; }
190190

191191
public string Name { get; set; }
@@ -233,7 +233,7 @@ public class SystemUser
233233
- `ReadOnlyTableAttribute` - 只读优化
234234

235235
**中优先级**(特定场景有用):
236-
- `IndexAttribute` - 索引管理
236+
- `EntityIndexAttribute` - 索引管理
237237
- `PartitionTableAttribute` - 分区表
238238
- `VersionControlAttribute` - 版本控制
239239

@@ -250,7 +250,7 @@ public class SystemUser
250250
**性能优化类**
251251
- `CacheTableAttribute`
252252
- `ReadOnlyTableAttribute`
253-
- `IndexAttribute`
253+
- `EntityIndexAttribute`
254254
- `PartitionTableAttribute`
255255

256256
**数据管理类**

GameFrameX.Foundation.Orm.Entity/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
- 支持多租户架构
3838
- 包含租户ID字段
3939

40-
#### EntityBaseSelect
40+
#### EntitySelectBase
4141
- 继承自 EntityBase
4242
- 实现 ISelectFilter 接口
4343
- 包含名称和描述字段,适用于需要搜索的实体
@@ -77,7 +77,7 @@ public class Order : EntityTenantBase
7777
### 可搜索实体
7878

7979
```csharp
80-
public class Category : EntityBaseSelect
80+
public class Category : EntitySelectBase
8181
{
8282
public int SortOrder { get; set; }
8383
}

0 commit comments

Comments
 (0)