forked from aiska/BpmNet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProcessTaskMap.cs
More file actions
39 lines (35 loc) · 1.87 KB
/
Copy pathProcessTaskMap.cs
File metadata and controls
39 lines (35 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using BPMNET.Configuration;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Infrastructure.Annotations;
using System.Data.Entity.ModelConfiguration;
namespace BPMNET.Entity.Mapping
{
public class ProcessTaskMap : EntityTypeConfiguration<ProcessTaskEntity>
{
public ProcessTaskMap()
{
DatabaseGeneratedOption option = Config.Instance.GeneratedOption;
bool unicode = Config.Instance.UnicodeString;
// Primary Key
HasKey(t => new { t.Id });
// Properties
Property(p => p.Id).HasDatabaseGeneratedOption(option);
//Property(p => p.Name).HasMaxLength(255).IsUnicode(unicode).AddColumnIndex("IX_TASK_NAME", 0);
Property(p => p.ProcessInstanceId).AddColumnIndex("IX_TASK_PROCESS_INSTANCE_ID", 0).AddColumnIndex("IX_TASK_PROCESS_INSTANCE_ID_FLOW_NAME", 0);
Property(p => p.FlowNodeId).AddColumnIndex("IX_TASK_FLOW_ID", 0);
Property(p => p.Assignee).HasMaxLength(255).IsUnicode(unicode);
//Property(p => p.BusinessKey).HasMaxLength(255).IsUnicode(unicode);
//Property(p => p.Category).HasMaxLength(255).IsUnicode(unicode);
//Property(p => p.Description).HasMaxLength(255).IsUnicode(unicode);
//Property(p => p.ExecutionId).HasMaxLength(255).IsUnicode(unicode);
//Property(p => p.Name).HasMaxLength(255).IsUnicode(unicode);
//Property(p => p.Owner).HasMaxLength(255).IsUnicode(unicode);
Property(p => p.TenantId).HasMaxLength(255).IsUnicode(unicode);
Property(p => p.CreatedBy).HasMaxLength(255).IsUnicode(unicode);
Property(p => p.ModifiedBy).HasMaxLength(255).IsUnicode(unicode);
// Table & Column Mappings
ToTable(Config.Instance.Tables.ProcessTask);
MapToStoredProcedures();
}
}
}