test 2
This commit is contained in:
31
Ewide.WorkOrderSys/Entity/Base/BaseEntity.cs
Normal file
31
Ewide.WorkOrderSys/Entity/Base/BaseEntity.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ewide.WorkOrderSys.Entity.Base
|
||||
{
|
||||
/// <summary>
|
||||
/// 基础实体类
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public abstract partial class BaseEntity
|
||||
{
|
||||
//public BaseEntity()
|
||||
//{
|
||||
// //CreateTime = DateTime.Now;
|
||||
// //LastUpdateTime = DateTime.Now;
|
||||
// //IsDeleted = 0;
|
||||
//}
|
||||
////[NotUpdateField]
|
||||
//[Display(Name = "Id")]
|
||||
//[Column("Id")]
|
||||
//[DataMember]
|
||||
//public long Id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
153
Ewide.WorkOrderSys/Entity/DataBase/TCodeScore.cs
Normal file
153
Ewide.WorkOrderSys/Entity/DataBase/TCodeScore.cs
Normal file
@@ -0,0 +1,153 @@
|
||||
//----------TCodeScore开始----------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
//using System.Data.Entity.ModelConfiguration;
|
||||
using Ewide.WorkOrderSys.Entity.Base;
|
||||
using System.Runtime.Serialization;
|
||||
namespace Ewide.WorkOrderSys.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表实体类:TCodeScore
|
||||
/// </summary>
|
||||
[Table("TCodeScore")]
|
||||
public partial class TCodeScore: BaseEntity {
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Key]
|
||||
[Column("ID")]
|
||||
[DataMember]
|
||||
public string ID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("StageID")]
|
||||
[DataMember]
|
||||
public string StageID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("UserID")]
|
||||
[DataMember]
|
||||
public string UserID {get;set;}
|
||||
/// <summary>
|
||||
/// 正确性0-10
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="正确性0-10")]
|
||||
[Column("CorrectScore")]
|
||||
[DataMember]
|
||||
public decimal CorrectScore {get;set;}
|
||||
/// <summary>
|
||||
/// 可靠性0-10
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="可靠性0-10")]
|
||||
[Column("ReliableScore")]
|
||||
[DataMember]
|
||||
public decimal ReliableScore {get;set;}
|
||||
/// <summary>
|
||||
/// 性能0-10
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="性能0-10")]
|
||||
[Column("PerformanceScore")]
|
||||
[DataMember]
|
||||
public decimal PerformanceScore {get;set;}
|
||||
/// <summary>
|
||||
/// 易懂性0-20
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="易懂性0-20")]
|
||||
[Column("ComprehendScore")]
|
||||
[DataMember]
|
||||
public decimal ComprehendScore {get;set;}
|
||||
/// <summary>
|
||||
/// 规范性0-50
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="规范性0-50")]
|
||||
[Column("StandardScore")]
|
||||
[DataMember]
|
||||
public decimal StandardScore {get;set;}
|
||||
/// <summary>
|
||||
/// 缺陷
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="缺陷")]
|
||||
[Column("DefectScore")]
|
||||
[DataMember]
|
||||
public decimal DefectScore {get;set;}
|
||||
/// <summary>
|
||||
/// 优化
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="优化")]
|
||||
[Column("OptimizeScore")]
|
||||
[DataMember]
|
||||
public decimal OptimizeScore {get;set;}
|
||||
/// <summary>
|
||||
/// 调整
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="调整")]
|
||||
[Column("AdjustmentScore")]
|
||||
[DataMember]
|
||||
public decimal AdjustmentScore {get;set;}
|
||||
/// <summary>
|
||||
/// 总分
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="总分")]
|
||||
[Column("TotalScore")]
|
||||
[DataMember]
|
||||
public decimal TotalScore {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Remark")]
|
||||
[DataMember]
|
||||
public string Remark {get;set;}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
/// <summary>
|
||||
/// 数据表实体类Map:TCodeScore
|
||||
/// </summary>
|
||||
public class TCodeScoreMap : EntityTypeConfiguration<TCodeScore>
|
||||
{
|
||||
public TCodeScoreMap()
|
||||
{
|
||||
this.ToTable("TCodeScore");
|
||||
this.HasKey(t => t.ID);
|
||||
this.Property(t => t.StageID).HasColumnName("StageID").IsRequired();
|
||||
this.Property(t => t.UserID).HasColumnName("UserID").IsRequired();
|
||||
this.Property(t => t.CorrectScore).HasColumnName("CorrectScore").IsRequired();
|
||||
this.Property(t => t.ReliableScore).HasColumnName("ReliableScore").IsRequired();
|
||||
this.Property(t => t.PerformanceScore).HasColumnName("PerformanceScore").IsRequired();
|
||||
this.Property(t => t.ComprehendScore).HasColumnName("ComprehendScore").IsRequired();
|
||||
this.Property(t => t.StandardScore).HasColumnName("StandardScore").IsRequired();
|
||||
this.Property(t => t.DefectScore).HasColumnName("DefectScore").IsRequired();
|
||||
this.Property(t => t.OptimizeScore).HasColumnName("OptimizeScore").IsRequired();
|
||||
this.Property(t => t.AdjustmentScore).HasColumnName("AdjustmentScore").IsRequired();
|
||||
this.Property(t => t.TotalScore).HasColumnName("TotalScore").IsRequired();
|
||||
this.Property(t => t.Remark).HasColumnName("Remark");
|
||||
}
|
||||
}**/
|
||||
|
||||
}
|
||||
|
||||
//----------TCodeScore结束----------
|
||||
|
||||
|
||||
82
Ewide.WorkOrderSys/Entity/DataBase/TEachScore.cs
Normal file
82
Ewide.WorkOrderSys/Entity/DataBase/TEachScore.cs
Normal file
@@ -0,0 +1,82 @@
|
||||
//----------TEachScore开始----------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
//using System.Data.Entity.ModelConfiguration;
|
||||
using Ewide.WorkOrderSys.Entity.Base;
|
||||
using System.Runtime.Serialization;
|
||||
namespace Ewide.WorkOrderSys.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表实体类:TEachScore
|
||||
/// </summary>
|
||||
[Table("TEachScore")]
|
||||
public partial class TEachScore: BaseEntity {
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Key]
|
||||
[Column("ID")]
|
||||
[DataMember]
|
||||
public string ID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("StageID")]
|
||||
[DataMember]
|
||||
public string StageID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("UserID")]
|
||||
[DataMember]
|
||||
public string UserID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("TargetID")]
|
||||
[DataMember]
|
||||
public string TargetID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("IsSorted")]
|
||||
[DataMember]
|
||||
public bool IsSorted {get;set;}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
/// <summary>
|
||||
/// 数据表实体类Map:TEachScore
|
||||
/// </summary>
|
||||
public class TEachScoreMap : EntityTypeConfiguration<TEachScore>
|
||||
{
|
||||
public TEachScoreMap()
|
||||
{
|
||||
this.ToTable("TEachScore");
|
||||
this.HasKey(t => t.ID);
|
||||
this.Property(t => t.StageID).HasColumnName("StageID").IsRequired();
|
||||
this.Property(t => t.UserID).HasColumnName("UserID").IsRequired();
|
||||
this.Property(t => t.TargetID).HasColumnName("TargetID").IsRequired();
|
||||
this.Property(t => t.Sort).HasColumnName("Sort").IsRequired();
|
||||
this.Property(t => t.IsSorted).HasColumnName("IsSorted").IsRequired();
|
||||
}
|
||||
}**/
|
||||
|
||||
}
|
||||
|
||||
//----------TEachScore结束----------
|
||||
|
||||
|
||||
135
Ewide.WorkOrderSys/Entity/DataBase/TEffortDetail.cs
Normal file
135
Ewide.WorkOrderSys/Entity/DataBase/TEffortDetail.cs
Normal file
@@ -0,0 +1,135 @@
|
||||
//----------TEffortDetail开始----------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
//using System.Data.Entity.ModelConfiguration;
|
||||
using Ewide.WorkOrderSys.Entity.Base;
|
||||
using System.Runtime.Serialization;
|
||||
namespace Ewide.WorkOrderSys.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表实体类:TEffortDetail
|
||||
/// </summary>
|
||||
[Table("TEffortDetail")]
|
||||
public partial class TEffortDetail: BaseEntity {
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Key]
|
||||
[Column("ID")]
|
||||
[DataMember]
|
||||
public string ID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("StageID")]
|
||||
[DataMember]
|
||||
public string StageID {get;set;}
|
||||
/// <summary>
|
||||
/// TEffort表主键
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="TEffort表主键")]
|
||||
[Column("EffortID")]
|
||||
[DataMember]
|
||||
public string EffortID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("No")]
|
||||
[DataMember]
|
||||
public int? No {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Date")]
|
||||
[DataMember]
|
||||
public string Date {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Register")]
|
||||
[DataMember]
|
||||
public string Register {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Content")]
|
||||
[DataMember]
|
||||
public string Content {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Hours")]
|
||||
[DataMember]
|
||||
public decimal? Hours {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Target")]
|
||||
[DataMember]
|
||||
public string Target {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Product")]
|
||||
[DataMember]
|
||||
public string Product {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Project")]
|
||||
[DataMember]
|
||||
public string Project {get;set;}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
/// <summary>
|
||||
/// 数据表实体类Map:TEffortDetail
|
||||
/// </summary>
|
||||
public class TEffortDetailMap : EntityTypeConfiguration<TEffortDetail>
|
||||
{
|
||||
public TEffortDetailMap()
|
||||
{
|
||||
this.ToTable("TEffortDetail");
|
||||
this.HasKey(t => t.ID);
|
||||
this.Property(t => t.StageID).HasColumnName("StageID").IsRequired();
|
||||
this.Property(t => t.EffortID).HasColumnName("EffortID");
|
||||
this.Property(t => t.No).HasColumnName("No");
|
||||
this.Property(t => t.Date).HasColumnName("Date");
|
||||
this.Property(t => t.Register).HasColumnName("Register");
|
||||
this.Property(t => t.Content).HasColumnName("Content");
|
||||
this.Property(t => t.Hours).HasColumnName("Hours");
|
||||
this.Property(t => t.Target).HasColumnName("Target");
|
||||
this.Property(t => t.Product).HasColumnName("Product");
|
||||
this.Property(t => t.Project).HasColumnName("Project");
|
||||
}
|
||||
}**/
|
||||
|
||||
}
|
||||
|
||||
//----------TEffortDetail结束----------
|
||||
|
||||
|
||||
136
Ewide.WorkOrderSys/Entity/DataBase/TEffortScore.cs
Normal file
136
Ewide.WorkOrderSys/Entity/DataBase/TEffortScore.cs
Normal file
@@ -0,0 +1,136 @@
|
||||
//----------TEffortScore开始----------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
//using System.Data.Entity.ModelConfiguration;
|
||||
using Ewide.WorkOrderSys.Entity.Base;
|
||||
using System.Runtime.Serialization;
|
||||
namespace Ewide.WorkOrderSys.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表实体类:TEffortScore
|
||||
/// </summary>
|
||||
[Table("TEffortScore")]
|
||||
public partial class TEffortScore: BaseEntity {
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Key]
|
||||
[Column("ID")]
|
||||
[DataMember]
|
||||
public string ID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("StageID")]
|
||||
[DataMember]
|
||||
public string StageID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("UserID")]
|
||||
[DataMember]
|
||||
public string UserID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("UserName")]
|
||||
[DataMember]
|
||||
public string UserName {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("EffortCnt")]
|
||||
[DataMember]
|
||||
public int EffortCnt {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("CntScore")]
|
||||
[DataMember]
|
||||
public decimal? CntScore {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("DetailScore")]
|
||||
[DataMember]
|
||||
public decimal? DetailScore {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("CompletedScore")]
|
||||
[DataMember]
|
||||
public decimal? CompletedScore {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("DailyHousrsScore")]
|
||||
[DataMember]
|
||||
public decimal? DailyHousrsScore {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("TotalScore")]
|
||||
[DataMember]
|
||||
public decimal? TotalScore {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Remark")]
|
||||
[DataMember]
|
||||
public string Remark {get;set;}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
/// <summary>
|
||||
/// 数据表实体类Map:TEffortScore
|
||||
/// </summary>
|
||||
public class TEffortScoreMap : EntityTypeConfiguration<TEffortScore>
|
||||
{
|
||||
public TEffortScoreMap()
|
||||
{
|
||||
this.ToTable("TEffortScore");
|
||||
this.HasKey(t => t.ID);
|
||||
this.Property(t => t.StageID).HasColumnName("StageID");
|
||||
this.Property(t => t.Sort).HasColumnName("Sort");
|
||||
this.Property(t => t.UserID).HasColumnName("UserID");
|
||||
this.Property(t => t.UserName).HasColumnName("UserName").IsRequired();
|
||||
this.Property(t => t.EffortCnt).HasColumnName("EffortCnt").IsRequired();
|
||||
this.Property(t => t.CntScore).HasColumnName("CntScore");
|
||||
this.Property(t => t.DetailScore).HasColumnName("DetailScore");
|
||||
this.Property(t => t.CompletedScore).HasColumnName("CompletedScore");
|
||||
this.Property(t => t.DailyHousrsScore).HasColumnName("DailyHousrsScore");
|
||||
this.Property(t => t.TotalScore).HasColumnName("TotalScore");
|
||||
this.Property(t => t.Remark).HasColumnName("Remark");
|
||||
}
|
||||
}**/
|
||||
|
||||
}
|
||||
|
||||
//----------TEffortScore结束----------
|
||||
|
||||
|
||||
136
Ewide.WorkOrderSys/Entity/DataBase/TFinalScore.cs
Normal file
136
Ewide.WorkOrderSys/Entity/DataBase/TFinalScore.cs
Normal file
@@ -0,0 +1,136 @@
|
||||
//----------TFinalScore开始----------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
//using System.Data.Entity.ModelConfiguration;
|
||||
using Ewide.WorkOrderSys.Entity.Base;
|
||||
using System.Runtime.Serialization;
|
||||
namespace Ewide.WorkOrderSys.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表实体类:TFinalScore
|
||||
/// </summary>
|
||||
[Table("TFinalScore")]
|
||||
public partial class TFinalScore: BaseEntity {
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Key]
|
||||
[Column("ID")]
|
||||
[DataMember]
|
||||
public string ID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("StageID")]
|
||||
[DataMember]
|
||||
public string StageID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("UserID")]
|
||||
[DataMember]
|
||||
public string UserID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("UserName")]
|
||||
[DataMember]
|
||||
public string UserName {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("SelfScore")]
|
||||
[DataMember]
|
||||
public decimal? SelfScore {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("EachScore")]
|
||||
[DataMember]
|
||||
public decimal? EachScore {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("EffortScore")]
|
||||
[DataMember]
|
||||
public decimal? EffortScore {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("CodeScore")]
|
||||
[DataMember]
|
||||
public decimal? CodeScore {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("HealthScore")]
|
||||
[DataMember]
|
||||
public decimal? HealthScore {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("RewardScore")]
|
||||
[DataMember]
|
||||
public decimal RewardScore {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("TotalScore")]
|
||||
[DataMember]
|
||||
public decimal TotalScore {get;set;}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
/// <summary>
|
||||
/// 数据表实体类Map:TFinalScore
|
||||
/// </summary>
|
||||
public class TFinalScoreMap : EntityTypeConfiguration<TFinalScore>
|
||||
{
|
||||
public TFinalScoreMap()
|
||||
{
|
||||
this.ToTable("TFinalScore");
|
||||
this.HasKey(t => t.ID);
|
||||
this.Property(t => t.StageID).HasColumnName("StageID").IsRequired();
|
||||
this.Property(t => t.UserID).HasColumnName("UserID").IsRequired();
|
||||
this.Property(t => t.UserName).HasColumnName("UserName").IsRequired();
|
||||
this.Property(t => t.SelfScore).HasColumnName("SelfScore");
|
||||
this.Property(t => t.EachScore).HasColumnName("EachScore");
|
||||
this.Property(t => t.EffortScore).HasColumnName("EffortScore");
|
||||
this.Property(t => t.CodeScore).HasColumnName("CodeScore");
|
||||
this.Property(t => t.HealthScore).HasColumnName("HealthScore");
|
||||
this.Property(t => t.RewardScore).HasColumnName("RewardScore").IsRequired();
|
||||
this.Property(t => t.TotalScore).HasColumnName("TotalScore").IsRequired();
|
||||
this.Property(t => t.Sort).HasColumnName("Sort").IsRequired();
|
||||
}
|
||||
}**/
|
||||
|
||||
}
|
||||
|
||||
//----------TFinalScore结束----------
|
||||
|
||||
|
||||
100
Ewide.WorkOrderSys/Entity/DataBase/THealthScore.cs
Normal file
100
Ewide.WorkOrderSys/Entity/DataBase/THealthScore.cs
Normal file
@@ -0,0 +1,100 @@
|
||||
//----------THealthScore开始----------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
//using System.Data.Entity.ModelConfiguration;
|
||||
using Ewide.WorkOrderSys.Entity.Base;
|
||||
using System.Runtime.Serialization;
|
||||
namespace Ewide.WorkOrderSys.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表实体类:THealthScore
|
||||
/// </summary>
|
||||
[Table("THealthScore")]
|
||||
public partial class THealthScore: BaseEntity {
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Key]
|
||||
[Column("ID")]
|
||||
[DataMember]
|
||||
public string ID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("UserID")]
|
||||
[DataMember]
|
||||
public string UserID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Date")]
|
||||
[DataMember]
|
||||
public DateTime Date {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Score")]
|
||||
[DataMember]
|
||||
public decimal Score {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Desc")]
|
||||
[DataMember]
|
||||
public string Desc {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Images")]
|
||||
[DataMember]
|
||||
public string Images {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("CreateUser")]
|
||||
[DataMember]
|
||||
public string CreateUser {get;set;}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
/// <summary>
|
||||
/// 数据表实体类Map:THealthScore
|
||||
/// </summary>
|
||||
public class THealthScoreMap : EntityTypeConfiguration<THealthScore>
|
||||
{
|
||||
public THealthScoreMap()
|
||||
{
|
||||
this.ToTable("THealthScore");
|
||||
this.HasKey(t => t.ID);
|
||||
this.Property(t => t.UserID).HasColumnName("UserID").IsRequired();
|
||||
this.Property(t => t.Date).HasColumnName("Date").IsRequired();
|
||||
this.Property(t => t.Score).HasColumnName("Score").IsRequired();
|
||||
this.Property(t => t.Desc).HasColumnName("Desc");
|
||||
this.Property(t => t.Images).HasColumnName("Images");
|
||||
this.Property(t => t.CreateTime).HasColumnName("CreateTime").IsRequired();
|
||||
this.Property(t => t.CreateUser).HasColumnName("CreateUser").IsRequired();
|
||||
}
|
||||
}**/
|
||||
|
||||
}
|
||||
|
||||
//----------THealthScore结束----------
|
||||
|
||||
|
||||
100
Ewide.WorkOrderSys/Entity/DataBase/TLog.cs
Normal file
100
Ewide.WorkOrderSys/Entity/DataBase/TLog.cs
Normal file
@@ -0,0 +1,100 @@
|
||||
//----------TLog开始----------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
//using System.Data.Entity.ModelConfiguration;
|
||||
using Ewide.WorkOrderSys.Entity.Base;
|
||||
using System.Runtime.Serialization;
|
||||
namespace Ewide.WorkOrderSys.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表实体类:TLog
|
||||
/// </summary>
|
||||
[Table("TLog")]
|
||||
public partial class TLog: BaseEntity {
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Key]
|
||||
[Column("ID")]
|
||||
[DataMember]
|
||||
public string ID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Content")]
|
||||
[DataMember]
|
||||
public string Content {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("CreateUserID")]
|
||||
[DataMember]
|
||||
public string CreateUserID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("OperateType")]
|
||||
[DataMember]
|
||||
public int OperateType {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Primarykey")]
|
||||
[DataMember]
|
||||
public string Primarykey {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Browser")]
|
||||
[DataMember]
|
||||
public string Browser {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Url")]
|
||||
[DataMember]
|
||||
public string Url {get;set;}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
/// <summary>
|
||||
/// 数据表实体类Map:TLog
|
||||
/// </summary>
|
||||
public class TLogMap : EntityTypeConfiguration<TLog>
|
||||
{
|
||||
public TLogMap()
|
||||
{
|
||||
this.ToTable("TLog");
|
||||
this.HasKey(t => t.ID);
|
||||
this.Property(t => t.Content).HasColumnName("Content");
|
||||
this.Property(t => t.CreateTime).HasColumnName("CreateTime").IsRequired();
|
||||
this.Property(t => t.CreateUserID).HasColumnName("CreateUserID");
|
||||
this.Property(t => t.OperateType).HasColumnName("OperateType").IsRequired();
|
||||
this.Property(t => t.Primarykey).HasColumnName("Primarykey");
|
||||
this.Property(t => t.Browser).HasColumnName("Browser").IsRequired();
|
||||
this.Property(t => t.Url).HasColumnName("Url").IsRequired();
|
||||
}
|
||||
}**/
|
||||
|
||||
}
|
||||
|
||||
//----------TLog结束----------
|
||||
|
||||
|
||||
100
Ewide.WorkOrderSys/Entity/DataBase/TRewardScore.cs
Normal file
100
Ewide.WorkOrderSys/Entity/DataBase/TRewardScore.cs
Normal file
@@ -0,0 +1,100 @@
|
||||
//----------TRewardScore开始----------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
//using System.Data.Entity.ModelConfiguration;
|
||||
using Ewide.WorkOrderSys.Entity.Base;
|
||||
using System.Runtime.Serialization;
|
||||
namespace Ewide.WorkOrderSys.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表实体类:TRewardScore
|
||||
/// </summary>
|
||||
[Table("TRewardScore")]
|
||||
public partial class TRewardScore: BaseEntity {
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Key]
|
||||
[Column("ID")]
|
||||
[DataMember]
|
||||
public string ID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("UserID")]
|
||||
[DataMember]
|
||||
public string UserID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Date")]
|
||||
[DataMember]
|
||||
public DateTime Date {get;set;}
|
||||
/// <summary>
|
||||
/// 评分类型1:表扬(加分)2:批评(扣分)
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="评分类型1:表扬(加分)2:批评(扣分)")]
|
||||
[Column("Type")]
|
||||
[DataMember]
|
||||
public int Type {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Score")]
|
||||
[DataMember]
|
||||
public decimal Score {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Desc")]
|
||||
[DataMember]
|
||||
public string Desc {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("CreateUserID")]
|
||||
[DataMember]
|
||||
public string CreateUserID {get;set;}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
/// <summary>
|
||||
/// 数据表实体类Map:TRewardScore
|
||||
/// </summary>
|
||||
public class TRewardScoreMap : EntityTypeConfiguration<TRewardScore>
|
||||
{
|
||||
public TRewardScoreMap()
|
||||
{
|
||||
this.ToTable("TRewardScore");
|
||||
this.HasKey(t => t.ID);
|
||||
this.Property(t => t.UserID).HasColumnName("UserID").IsRequired();
|
||||
this.Property(t => t.Date).HasColumnName("Date").IsRequired();
|
||||
this.Property(t => t.Type).HasColumnName("Type").IsRequired();
|
||||
this.Property(t => t.Score).HasColumnName("Score").IsRequired();
|
||||
this.Property(t => t.Desc).HasColumnName("Desc");
|
||||
this.Property(t => t.CreateTime).HasColumnName("CreateTime").IsRequired();
|
||||
this.Property(t => t.CreateUserID).HasColumnName("CreateUserID").IsRequired();
|
||||
}
|
||||
}**/
|
||||
|
||||
}
|
||||
|
||||
//----------TRewardScore结束----------
|
||||
|
||||
|
||||
145
Ewide.WorkOrderSys/Entity/DataBase/TSelfScore.cs
Normal file
145
Ewide.WorkOrderSys/Entity/DataBase/TSelfScore.cs
Normal file
@@ -0,0 +1,145 @@
|
||||
//----------TSelfScore开始----------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
//using System.Data.Entity.ModelConfiguration;
|
||||
using Ewide.WorkOrderSys.Entity.Base;
|
||||
using System.Runtime.Serialization;
|
||||
namespace Ewide.WorkOrderSys.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表实体类:TSelfScore
|
||||
/// </summary>
|
||||
[Table("TSelfScore")]
|
||||
public partial class TSelfScore: BaseEntity {
|
||||
/// <summary>
|
||||
/// 编号
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="编号")]
|
||||
[Key]
|
||||
[Column("ID")]
|
||||
[DataMember]
|
||||
public string ID {get;set;}
|
||||
/// <summary>
|
||||
/// 任务编号
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="任务编号")]
|
||||
[Column("StageID")]
|
||||
[DataMember]
|
||||
public string StageID {get;set;}
|
||||
/// <summary>
|
||||
/// 用户编号
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="用户编号")]
|
||||
[Column("UserID")]
|
||||
[DataMember]
|
||||
public string UserID {get;set;}
|
||||
/// <summary>
|
||||
/// 本月完成情况总结
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="本月完成情况总结")]
|
||||
[Column("SummaryContent")]
|
||||
[DataMember]
|
||||
public string SummaryContent {get;set;}
|
||||
/// <summary>
|
||||
/// 任务完成的优点分析
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="任务完成的优点分析")]
|
||||
[Column("AdvantageContent")]
|
||||
[DataMember]
|
||||
public string AdvantageContent {get;set;}
|
||||
/// <summary>
|
||||
/// 需改进方面
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="需改进方面")]
|
||||
[Column("InsufficientContent")]
|
||||
[DataMember]
|
||||
public string InsufficientContent {get;set;}
|
||||
/// <summary>
|
||||
/// 下月安排
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="下月安排")]
|
||||
[Column("ArrangeContent")]
|
||||
[DataMember]
|
||||
public string ArrangeContent {get;set;}
|
||||
/// <summary>
|
||||
/// 自评
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="自评")]
|
||||
[Column("AssessmentContent")]
|
||||
[DataMember]
|
||||
public string AssessmentContent {get;set;}
|
||||
/// <summary>
|
||||
/// 领导评价
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="领导评价")]
|
||||
[Column("AppraiseContent")]
|
||||
[DataMember]
|
||||
public string AppraiseContent {get;set;}
|
||||
/// <summary>
|
||||
/// 领导评分
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="领导评分")]
|
||||
[Column("AppraiseScore")]
|
||||
[DataMember]
|
||||
public decimal? AppraiseScore {get;set;}
|
||||
/// <summary>
|
||||
/// 评分时间
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="评分时间")]
|
||||
[Column("AppraiseTime")]
|
||||
[DataMember]
|
||||
public DateTime? AppraiseTime {get;set;}
|
||||
/// <summary>
|
||||
/// 评分人编号
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="评分人编号")]
|
||||
[Column("AppraiseUserID")]
|
||||
[DataMember]
|
||||
public string AppraiseUserID {get;set;}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
/// <summary>
|
||||
/// 数据表实体类Map:TSelfScore
|
||||
/// </summary>
|
||||
public class TSelfScoreMap : EntityTypeConfiguration<TSelfScore>
|
||||
{
|
||||
public TSelfScoreMap()
|
||||
{
|
||||
this.ToTable("TSelfScore");
|
||||
this.HasKey(t => t.ID);
|
||||
this.Property(t => t.StageID).HasColumnName("StageID").IsRequired();
|
||||
this.Property(t => t.UserID).HasColumnName("UserID").IsRequired();
|
||||
this.Property(t => t.SummaryContent).HasColumnName("SummaryContent");
|
||||
this.Property(t => t.AdvantageContent).HasColumnName("AdvantageContent");
|
||||
this.Property(t => t.InsufficientContent).HasColumnName("InsufficientContent");
|
||||
this.Property(t => t.ArrangeContent).HasColumnName("ArrangeContent");
|
||||
this.Property(t => t.AssessmentContent).HasColumnName("AssessmentContent");
|
||||
this.Property(t => t.CreateTime).HasColumnName("CreateTime").IsRequired();
|
||||
this.Property(t => t.AppraiseContent).HasColumnName("AppraiseContent");
|
||||
this.Property(t => t.AppraiseScore).HasColumnName("AppraiseScore");
|
||||
this.Property(t => t.AppraiseTime).HasColumnName("AppraiseTime");
|
||||
this.Property(t => t.AppraiseUserID).HasColumnName("AppraiseUserID");
|
||||
}
|
||||
}**/
|
||||
|
||||
}
|
||||
|
||||
//----------TSelfScore结束----------
|
||||
|
||||
|
||||
100
Ewide.WorkOrderSys/Entity/DataBase/TStage.cs
Normal file
100
Ewide.WorkOrderSys/Entity/DataBase/TStage.cs
Normal file
@@ -0,0 +1,100 @@
|
||||
//----------TStage开始----------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
//using System.Data.Entity.ModelConfiguration;
|
||||
using Ewide.WorkOrderSys.Entity.Base;
|
||||
using System.Runtime.Serialization;
|
||||
namespace Ewide.WorkOrderSys.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表实体类:TStage
|
||||
/// </summary>
|
||||
[Table("TStage")]
|
||||
public partial class TStage: BaseEntity {
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Key]
|
||||
[Column("ID")]
|
||||
[DataMember]
|
||||
public string ID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Year")]
|
||||
[DataMember]
|
||||
public int Year {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Month")]
|
||||
[DataMember]
|
||||
public int Month {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("CreateUser")]
|
||||
[DataMember]
|
||||
public string CreateUser {get;set;}
|
||||
/// <summary>
|
||||
/// 1.已开始,进行中2.已暂停3.已结束
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="1.已开始,进行中2.已暂停3.已结束")]
|
||||
[Column("Status")]
|
||||
[DataMember]
|
||||
public int Status {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("StartTime")]
|
||||
[DataMember]
|
||||
public DateTime? StartTime {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("EndTime")]
|
||||
[DataMember]
|
||||
public DateTime? EndTime {get;set;}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
/// <summary>
|
||||
/// 数据表实体类Map:TStage
|
||||
/// </summary>
|
||||
public class TStageMap : EntityTypeConfiguration<TStage>
|
||||
{
|
||||
public TStageMap()
|
||||
{
|
||||
this.ToTable("TStage");
|
||||
this.HasKey(t => t.ID);
|
||||
this.Property(t => t.Year).HasColumnName("Year").IsRequired();
|
||||
this.Property(t => t.Month).HasColumnName("Month").IsRequired();
|
||||
this.Property(t => t.CreateTime).HasColumnName("CreateTime").IsRequired();
|
||||
this.Property(t => t.CreateUser).HasColumnName("CreateUser").IsRequired();
|
||||
this.Property(t => t.Status).HasColumnName("Status").IsRequired();
|
||||
this.Property(t => t.StartTime).HasColumnName("StartTime");
|
||||
this.Property(t => t.EndTime).HasColumnName("EndTime");
|
||||
}
|
||||
}**/
|
||||
|
||||
}
|
||||
|
||||
//----------TStage结束----------
|
||||
|
||||
|
||||
99
Ewide.WorkOrderSys/Entity/DataBase/TStageUsers.cs
Normal file
99
Ewide.WorkOrderSys/Entity/DataBase/TStageUsers.cs
Normal file
@@ -0,0 +1,99 @@
|
||||
//----------TStageUsers开始----------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
//using System.Data.Entity.ModelConfiguration;
|
||||
using Ewide.WorkOrderSys.Entity.Base;
|
||||
using System.Runtime.Serialization;
|
||||
namespace Ewide.WorkOrderSys.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表实体类:TStageUsers
|
||||
/// </summary>
|
||||
[Table("TStageUsers")]
|
||||
public partial class TStageUsers: BaseEntity {
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Key]
|
||||
[Column("ID")]
|
||||
[DataMember]
|
||||
public string ID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("StageID")]
|
||||
[DataMember]
|
||||
public string StageID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("UserID")]
|
||||
[DataMember]
|
||||
public string UserID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("UserName")]
|
||||
[DataMember]
|
||||
public string UserName {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("IsOnJob")]
|
||||
[DataMember]
|
||||
public bool IsOnJob {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Authority")]
|
||||
[DataMember]
|
||||
public int Authority {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("ScoringItem")]
|
||||
[DataMember]
|
||||
public int ScoringItem {get;set;}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
/// <summary>
|
||||
/// 数据表实体类Map:TStageUsers
|
||||
/// </summary>
|
||||
public class TStageUsersMap : EntityTypeConfiguration<TStageUsers>
|
||||
{
|
||||
public TStageUsersMap()
|
||||
{
|
||||
this.ToTable("TStageUsers");
|
||||
this.HasKey(t => t.ID);
|
||||
this.Property(t => t.StageID).HasColumnName("StageID").IsRequired();
|
||||
this.Property(t => t.UserID).HasColumnName("UserID").IsRequired();
|
||||
this.Property(t => t.UserName).HasColumnName("UserName").IsRequired();
|
||||
this.Property(t => t.IsOnJob).HasColumnName("IsOnJob").IsRequired();
|
||||
this.Property(t => t.Authority).HasColumnName("Authority").IsRequired();
|
||||
this.Property(t => t.ScoringItem).HasColumnName("ScoringItem").IsRequired();
|
||||
}
|
||||
}**/
|
||||
|
||||
}
|
||||
|
||||
//----------TStageUsers结束----------
|
||||
|
||||
|
||||
64
Ewide.WorkOrderSys/Entity/DataBase/TSystem.cs
Normal file
64
Ewide.WorkOrderSys/Entity/DataBase/TSystem.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
//----------TSystem开始----------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
//using System.Data.Entity.ModelConfiguration;
|
||||
using Ewide.WorkOrderSys.Entity.Base;
|
||||
using System.Runtime.Serialization;
|
||||
namespace Ewide.WorkOrderSys.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表实体类:TSystem
|
||||
/// </summary>
|
||||
[Table("TSystem")]
|
||||
public partial class TSystem: BaseEntity {
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Key]
|
||||
[Column("ID")]
|
||||
[DataMember]
|
||||
public string ID {get;set;}
|
||||
/// <summary>
|
||||
/// 0.关闭1.开启
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="0.关闭1.开启")]
|
||||
[Column("Status")]
|
||||
[DataMember]
|
||||
public int Status {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("AdminID")]
|
||||
[DataMember]
|
||||
public string AdminID {get;set;}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
/// <summary>
|
||||
/// 数据表实体类Map:TSystem
|
||||
/// </summary>
|
||||
public class TSystemMap : EntityTypeConfiguration<TSystem>
|
||||
{
|
||||
public TSystemMap()
|
||||
{
|
||||
this.ToTable("TSystem");
|
||||
this.HasKey(t => t.ID);
|
||||
this.Property(t => t.Status).HasColumnName("Status").IsRequired();
|
||||
this.Property(t => t.CreateTime).HasColumnName("CreateTime").IsRequired();
|
||||
this.Property(t => t.AdminID).HasColumnName("AdminID").IsRequired();
|
||||
}
|
||||
}**/
|
||||
|
||||
}
|
||||
|
||||
//----------TSystem结束----------
|
||||
|
||||
|
||||
101
Ewide.WorkOrderSys/Entity/DataBase/TUserComments.cs
Normal file
101
Ewide.WorkOrderSys/Entity/DataBase/TUserComments.cs
Normal file
@@ -0,0 +1,101 @@
|
||||
//----------TUserComments开始----------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
//using System.Data.Entity.ModelConfiguration;
|
||||
using Ewide.WorkOrderSys.Entity.Base;
|
||||
using System.Runtime.Serialization;
|
||||
namespace Ewide.WorkOrderSys.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表实体类:TUserComments
|
||||
/// </summary>
|
||||
[Table("TUserComments")]
|
||||
public partial class TUserComments: BaseEntity {
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Key]
|
||||
[Column("ID")]
|
||||
[DataMember]
|
||||
public string ID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("UserID")]
|
||||
[DataMember]
|
||||
public string UserID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("ReplayID")]
|
||||
[DataMember]
|
||||
public string ReplayID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("ReplayUserID")]
|
||||
[DataMember]
|
||||
public string ReplayUserID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Content")]
|
||||
[DataMember]
|
||||
public string Content {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("CreateUserID")]
|
||||
[DataMember]
|
||||
public string CreateUserID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Deleted")]
|
||||
[DataMember]
|
||||
public bool Deleted {get;set;}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
/// <summary>
|
||||
/// 数据表实体类Map:TUserComments
|
||||
/// </summary>
|
||||
public class TUserCommentsMap : EntityTypeConfiguration<TUserComments>
|
||||
{
|
||||
public TUserCommentsMap()
|
||||
{
|
||||
this.ToTable("TUserComments");
|
||||
this.HasKey(t => t.ID);
|
||||
this.Property(t => t.UserID).HasColumnName("UserID").IsRequired();
|
||||
this.Property(t => t.ReplayID).HasColumnName("ReplayID");
|
||||
this.Property(t => t.ReplayUserID).HasColumnName("ReplayUserID");
|
||||
this.Property(t => t.Content).HasColumnName("Content").IsRequired();
|
||||
this.Property(t => t.CreateTime).HasColumnName("CreateTime").IsRequired();
|
||||
this.Property(t => t.CreateUserID).HasColumnName("CreateUserID").IsRequired();
|
||||
this.Property(t => t.Sort).HasColumnName("Sort").IsRequired();
|
||||
this.Property(t => t.Deleted).HasColumnName("Deleted").IsRequired();
|
||||
}
|
||||
}**/
|
||||
|
||||
}
|
||||
|
||||
//----------TUserComments结束----------
|
||||
|
||||
|
||||
64
Ewide.WorkOrderSys/Entity/DataBase/TUserLikes.cs
Normal file
64
Ewide.WorkOrderSys/Entity/DataBase/TUserLikes.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
//----------TUserLikes开始----------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
//using System.Data.Entity.ModelConfiguration;
|
||||
using Ewide.WorkOrderSys.Entity.Base;
|
||||
using System.Runtime.Serialization;
|
||||
namespace Ewide.WorkOrderSys.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表实体类:TUserLikes
|
||||
/// </summary>
|
||||
[Table("TUserLikes")]
|
||||
public partial class TUserLikes: BaseEntity {
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Key]
|
||||
[Column("ID")]
|
||||
[DataMember]
|
||||
public string ID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("UserID")]
|
||||
[DataMember]
|
||||
public string UserID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("CreateUserID")]
|
||||
[DataMember]
|
||||
public string CreateUserID {get;set;}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
/// <summary>
|
||||
/// 数据表实体类Map:TUserLikes
|
||||
/// </summary>
|
||||
public class TUserLikesMap : EntityTypeConfiguration<TUserLikes>
|
||||
{
|
||||
public TUserLikesMap()
|
||||
{
|
||||
this.ToTable("TUserLikes");
|
||||
this.HasKey(t => t.ID);
|
||||
this.Property(t => t.UserID).HasColumnName("UserID").IsRequired();
|
||||
this.Property(t => t.CreateTime).HasColumnName("CreateTime").IsRequired();
|
||||
this.Property(t => t.CreateUserID).HasColumnName("CreateUserID").IsRequired();
|
||||
}
|
||||
}**/
|
||||
|
||||
}
|
||||
|
||||
//----------TUserLikes结束----------
|
||||
|
||||
|
||||
181
Ewide.WorkOrderSys/Entity/DataBase/TUsers.cs
Normal file
181
Ewide.WorkOrderSys/Entity/DataBase/TUsers.cs
Normal file
@@ -0,0 +1,181 @@
|
||||
//----------TUsers开始----------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
//using System.Data.Entity.ModelConfiguration;
|
||||
using Ewide.WorkOrderSys.Entity.Base;
|
||||
using System.Runtime.Serialization;
|
||||
namespace Ewide.WorkOrderSys.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表实体类:TUsers
|
||||
/// </summary>
|
||||
[Table("TUsers")]
|
||||
public partial class TUsers: BaseEntity {
|
||||
/// <summary>
|
||||
/// 编号
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="编号")]
|
||||
[Key]
|
||||
[Column("ID")]
|
||||
[DataMember]
|
||||
public string ID {get;set;}
|
||||
/// <summary>
|
||||
/// 帐号
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="帐号")]
|
||||
[Column("Account")]
|
||||
[DataMember]
|
||||
public string Account {get;set;}
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="密码")]
|
||||
[Column("Password")]
|
||||
[DataMember]
|
||||
public string Password {get;set;}
|
||||
/// <summary>
|
||||
/// 姓名
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="姓名")]
|
||||
[Column("Name")]
|
||||
[DataMember]
|
||||
public string Name {get;set;}
|
||||
/// <summary>
|
||||
/// 手机号
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="手机号")]
|
||||
[Column("Phone")]
|
||||
[DataMember]
|
||||
public string Phone {get;set;}
|
||||
/// <summary>
|
||||
/// QQ号
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="QQ号")]
|
||||
[Column("QQ")]
|
||||
[DataMember]
|
||||
public string QQ {get;set;}
|
||||
/// <summary>
|
||||
/// 邮箱
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="邮箱")]
|
||||
[Column("Email")]
|
||||
[DataMember]
|
||||
public string Email {get;set;}
|
||||
/// <summary>
|
||||
/// 创建人编号
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="创建人编号")]
|
||||
[Column("CreateUser")]
|
||||
[DataMember]
|
||||
public string CreateUser {get;set;}
|
||||
/// <summary>
|
||||
/// 头像
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="头像")]
|
||||
[Column("Avatar")]
|
||||
[DataMember]
|
||||
public string Avatar {get;set;}
|
||||
/// <summary>
|
||||
/// 说明
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="说明")]
|
||||
[Column("Desc")]
|
||||
[DataMember]
|
||||
public string Desc {get;set;}
|
||||
/// <summary>
|
||||
/// 帐号权限1.系统管理员2.管理员4.自评打分管理员8.互评排序管理员16.日志打分管理员32.代码打分管理员64.卫生打分管理员128.额外奖惩管理员256.一般员工
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="帐号权限1.系统管理员2.管理员4.自评打分管理员8.互评排序管理员16.日志打分管理员32.代码打分管理员64.卫生打分管理员128.额外奖惩管理员256.一般员工")]
|
||||
[Column("Authority")]
|
||||
[DataMember]
|
||||
public int Authority {get;set;}
|
||||
/// <summary>
|
||||
/// 入职时间
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="入职时间")]
|
||||
[Column("EntryDate")]
|
||||
[DataMember]
|
||||
public DateTime? EntryDate {get;set;}
|
||||
/// <summary>
|
||||
/// 是否在职
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="是否在职")]
|
||||
[Column("IsOnJob")]
|
||||
[DataMember]
|
||||
public bool IsOnJob {get;set;}
|
||||
/// <summary>
|
||||
/// 离职时间
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="离职时间")]
|
||||
[Column("QuitDate")]
|
||||
[DataMember]
|
||||
public DateTime? QuitDate {get;set;}
|
||||
/// <summary>
|
||||
/// 帐号参与打分项1.自评打分2.互评排序4.日志打分8.代码打分16.卫生打分32.额外奖惩
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="帐号参与打分项1.自评打分2.互评排序4.日志打分8.代码打分16.卫生打分32.额外奖惩")]
|
||||
[Column("ScoringItem")]
|
||||
[DataMember]
|
||||
public int ScoringItem {get;set;}
|
||||
/// <summary>
|
||||
/// 积分
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="积分")]
|
||||
[Column("Points")]
|
||||
[DataMember]
|
||||
public int Points {get;set;}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
/// <summary>
|
||||
/// 数据表实体类Map:TUsers
|
||||
/// </summary>
|
||||
public class TUsersMap : EntityTypeConfiguration<TUsers>
|
||||
{
|
||||
public TUsersMap()
|
||||
{
|
||||
this.ToTable("TUsers");
|
||||
this.HasKey(t => t.ID);
|
||||
this.Property(t => t.Account).HasColumnName("Account").IsRequired();
|
||||
this.Property(t => t.Password).HasColumnName("Password").IsRequired();
|
||||
this.Property(t => t.Name).HasColumnName("Name").IsRequired();
|
||||
this.Property(t => t.Phone).HasColumnName("Phone");
|
||||
this.Property(t => t.QQ).HasColumnName("QQ");
|
||||
this.Property(t => t.Email).HasColumnName("Email");
|
||||
this.Property(t => t.CreateTime).HasColumnName("CreateTime").IsRequired();
|
||||
this.Property(t => t.CreateUser).HasColumnName("CreateUser");
|
||||
this.Property(t => t.Avatar).HasColumnName("Avatar");
|
||||
this.Property(t => t.Desc).HasColumnName("Desc");
|
||||
this.Property(t => t.Authority).HasColumnName("Authority").IsRequired();
|
||||
this.Property(t => t.EntryDate).HasColumnName("EntryDate");
|
||||
this.Property(t => t.IsOnJob).HasColumnName("IsOnJob").IsRequired();
|
||||
this.Property(t => t.QuitDate).HasColumnName("QuitDate");
|
||||
this.Property(t => t.ScoringItem).HasColumnName("ScoringItem").IsRequired();
|
||||
this.Property(t => t.Points).HasColumnName("Points").IsRequired();
|
||||
}
|
||||
}**/
|
||||
|
||||
}
|
||||
|
||||
//----------TUsers结束----------
|
||||
|
||||
|
||||
131
Ewide.WorkOrderSys/Entity/ModelAuto.ttinclude
Normal file
131
Ewide.WorkOrderSys/Entity/ModelAuto.ttinclude
Normal file
@@ -0,0 +1,131 @@
|
||||
<#@ assembly name="System.Core"#>
|
||||
<#@ assembly name="EnvDTE"#>
|
||||
<#@ import namespace="System.Collections.Generic"#>
|
||||
<#@ import namespace="System.IO"#>
|
||||
<#@ import namespace="System.Text"#>
|
||||
<#@ import namespace="Microsoft.VisualStudio.TextTemplating"#>
|
||||
|
||||
<#+
|
||||
|
||||
class Manager
|
||||
{
|
||||
public struct Block {
|
||||
public String Name;
|
||||
public int Start, Length;
|
||||
}
|
||||
|
||||
public List<Block> blocks = new List<Block>();
|
||||
public Block currentBlock;
|
||||
public Block footerBlock = new Block();
|
||||
public Block headerBlock = new Block();
|
||||
public ITextTemplatingEngineHost host;
|
||||
public ManagementStrategy strategy;
|
||||
public StringBuilder template;
|
||||
public String OutputPath { get; set; }
|
||||
|
||||
public Manager(ITextTemplatingEngineHost host, StringBuilder template, bool commonHeader) {
|
||||
this.host = host;
|
||||
this.template = template;
|
||||
OutputPath = String.Empty;
|
||||
strategy = ManagementStrategy.Create(host);
|
||||
}
|
||||
|
||||
public void StartBlock(String name) {
|
||||
currentBlock = new Block { Name = name, Start = template.Length };
|
||||
}
|
||||
|
||||
public void StartFooter() {
|
||||
footerBlock.Start = template.Length;
|
||||
}
|
||||
|
||||
public void EndFooter() {
|
||||
footerBlock.Length = template.Length - footerBlock.Start;
|
||||
}
|
||||
|
||||
public void StartHeader() {
|
||||
headerBlock.Start = template.Length;
|
||||
}
|
||||
|
||||
public void EndHeader() {
|
||||
headerBlock.Length = template.Length - headerBlock.Start;
|
||||
}
|
||||
|
||||
public void EndBlock() {
|
||||
currentBlock.Length = template.Length - currentBlock.Start;
|
||||
blocks.Add(currentBlock);
|
||||
}
|
||||
|
||||
public void Process(bool split,bool isCover=false) {
|
||||
String header = template.ToString(headerBlock.Start, headerBlock.Length);
|
||||
String footer = template.ToString(footerBlock.Start, footerBlock.Length);
|
||||
blocks.Reverse();
|
||||
foreach(Block block in blocks) {
|
||||
String fileName = Path.Combine(OutputPath, block.Name);
|
||||
if (split) {
|
||||
String content = header + template.ToString(block.Start, block.Length) + footer;
|
||||
//if(isCover)
|
||||
//{
|
||||
// strategy.DeleteFile(fileName);
|
||||
//}
|
||||
if(isCover||!File.Exists(fileName))//存在则不覆盖
|
||||
strategy.CreateFile(fileName, content);
|
||||
template.Remove(block.Start, block.Length);
|
||||
} else {
|
||||
strategy.DeleteFile(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ManagementStrategy
|
||||
{
|
||||
internal static ManagementStrategy Create(ITextTemplatingEngineHost host) {
|
||||
return (host is IServiceProvider) ? new VSManagementStrategy(host) : new ManagementStrategy(host);
|
||||
}
|
||||
|
||||
internal ManagementStrategy(ITextTemplatingEngineHost host) { }
|
||||
|
||||
internal virtual void CreateFile(String fileName, String content) {
|
||||
File.WriteAllText(fileName, content);
|
||||
}
|
||||
|
||||
internal virtual void DeleteFile(String fileName) {
|
||||
if (File.Exists(fileName))
|
||||
File.Delete(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
class VSManagementStrategy : ManagementStrategy
|
||||
{
|
||||
private EnvDTE.ProjectItem templateProjectItem;
|
||||
|
||||
internal VSManagementStrategy(ITextTemplatingEngineHost host) : base(host) {
|
||||
IServiceProvider hostServiceProvider = (IServiceProvider)host;
|
||||
if (hostServiceProvider == null)
|
||||
throw new ArgumentNullException("Could not obtain hostServiceProvider");
|
||||
|
||||
EnvDTE.DTE dte = (EnvDTE.DTE)hostServiceProvider.GetService(typeof(EnvDTE.DTE));
|
||||
if (dte == null)
|
||||
throw new ArgumentNullException("Could not obtain DTE from host");
|
||||
|
||||
templateProjectItem = dte.Solution.FindProjectItem(host.TemplateFile);
|
||||
}
|
||||
|
||||
internal override void CreateFile(String fileName, String content) {
|
||||
base.CreateFile(fileName, content);
|
||||
((EventHandler)delegate { templateProjectItem.ProjectItems.AddFromFile(fileName); }).BeginInvoke(null, null, null, null);
|
||||
}
|
||||
|
||||
internal override void DeleteFile(String fileName) {
|
||||
((EventHandler)delegate { FindAndDeleteFile(fileName); }).BeginInvoke(null, null, null, null);
|
||||
}
|
||||
|
||||
private void FindAndDeleteFile(String fileName) {
|
||||
foreach(EnvDTE.ProjectItem projectItem in templateProjectItem.ProjectItems) {
|
||||
if (projectItem.get_FileNames(0) == fileName) {
|
||||
projectItem.Delete();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}#>
|
||||
27
Ewide.WorkOrderSys/Entity/SqlModelTpl.cs
Normal file
27
Ewide.WorkOrderSys/Entity/SqlModelTpl.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
370
Ewide.WorkOrderSys/Entity/SqlModelTpl.tt
Normal file
370
Ewide.WorkOrderSys/Entity/SqlModelTpl.tt
Normal file
@@ -0,0 +1,370 @@
|
||||
<#@ template language="C#" debug="True" hostspecific="True" #>
|
||||
<#@ output extension=".cs" #>
|
||||
<#@ assembly name="System.Data" #>
|
||||
<#@ assembly name="System.Data.DataSetExtensions" #>
|
||||
<#@ assembly name="$(SolutionDir)lib\EntityFramework.dll" #>
|
||||
<#@ assembly name="System.xml" #>
|
||||
<#@ import namespace="System.Collections.Generic" #>
|
||||
<#@ import namespace="System.Data" #>
|
||||
<#@ import namespace="System.Linq" #>
|
||||
<#@ import namespace="System.Data.SqlClient" #>
|
||||
<#@ include file="ModelAuto.ttinclude"#>
|
||||
|
||||
|
||||
<# var manager = new Manager(Host, GenerationEnvironment, true) { OutputPath = Path.GetDirectoryName(Host.TemplateFile)+"/DataBase/"}; #>
|
||||
<#
|
||||
string tableClass="";
|
||||
//所有表名称
|
||||
//string sqlGetTable = "SELECT Name FROM SysObjects Where XType='U' ORDER BY Name";
|
||||
DataTable dt = GetDataTable();
|
||||
//DataTable dtRelationTable = GetRelationTable();
|
||||
//所有表信息
|
||||
string selectQuery ="select syscolumns.name,systypes.name,syscolumns.length from syscolumns,systypes where syscolumns.xusertype=systypes.xusertype and syscolumns.id=object_id('@tableName')";
|
||||
DataTable datacloumn = new DataTable();
|
||||
string primaryKey ="";
|
||||
#>
|
||||
|
||||
<#
|
||||
foreach(System.Data.DataRow row in dt.Rows)
|
||||
{
|
||||
string objType=row["XType"].ToString().Trim();
|
||||
tableClass = GetClassName(row["name"].ToString());
|
||||
manager.StartBlock(tableClass+".cs");
|
||||
//获取表格
|
||||
datacloumn.Clear();
|
||||
datacloumn = GetDataTableCloumn(row["name"].ToString());
|
||||
primaryKey = GetKey(row["name"].ToString());
|
||||
#>
|
||||
//----------<#=row["name"].ToString()#>开始----------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
//using System.Data.Entity.ModelConfiguration;
|
||||
using Ewide.WorkOrderSys.Entity.Base;
|
||||
using System.Runtime.Serialization;
|
||||
namespace Ewide.WorkOrderSys.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表实体类:<#= tableClass #>
|
||||
/// </summary>
|
||||
[Table("<#=tableClass #>")]
|
||||
public partial class <#= tableClass #><# if(objType=="U"){#>: BaseEntity<#}else{#>: BaseEntity<#}#>
|
||||
{
|
||||
<#
|
||||
List<string> listBaseColumn = new List<string>{"Id","UNID","CreateTime","CreateUserId","LastUpdateTime","IsDeleted","Sort"};
|
||||
foreach (DataRow dr in datacloumn.Rows)
|
||||
{
|
||||
string columnName=GetFormColumnName(dr["columnname"].ToString(),tableClass);
|
||||
//if(objType=="U"&&listBaseColumn.Contains(columnName))
|
||||
if(listBaseColumn.Contains(columnName))
|
||||
continue;
|
||||
#>
|
||||
/// <summary>
|
||||
/// <#=dr["comments"].ToString()==""?"无描述": dr["comments"].ToString().Replace("\r","").Replace("\n","").Replace("\"","") #>
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="<#=dr["comments"].ToString()==""?"无描述": dr["comments"].ToString().Replace("\r","").Replace("\n","").Replace("\"","") #>")]
|
||||
<#
|
||||
if(dr["columnname"].ToString().ToLower()==primaryKey.ToLower())
|
||||
{#>[Key]
|
||||
<#}
|
||||
#>
|
||||
[Column("<#=columnName #>")]
|
||||
[DataMember]
|
||||
public <#= objType=="V"?ViewTransFromSqlType(dr["datatype"].ToString(),dr["data_length"].ToString(),dr["nullable"].ToString()):TransFromSqlType(dr["datatype"].ToString(),dr["data_length"].ToString(),dr["nullable"].ToString()) #> <#=columnName#> {get;set;}
|
||||
<#
|
||||
}
|
||||
#>
|
||||
}
|
||||
|
||||
/**
|
||||
/// <summary>
|
||||
/// 数据表实体类Map:<#= tableClass #>
|
||||
/// </summary>
|
||||
public class <#= tableClass #>Map : EntityTypeConfiguration<<#= tableClass #>>
|
||||
{
|
||||
public <#= tableClass #>Map()
|
||||
{
|
||||
this.ToTable("<#= tableClass #>");
|
||||
<#
|
||||
foreach (DataRow dr in datacloumn.Rows)
|
||||
{
|
||||
string columnName=GetFormColumnName(dr["columnname"].ToString(),tableClass);
|
||||
if(dr["columnname"].ToString()==primaryKey)
|
||||
{#>
|
||||
this.HasKey(t => t.<#= columnName #>);
|
||||
<#}
|
||||
else
|
||||
{#>
|
||||
this.Property(t => t.<#=columnName #>).HasColumnName("<#=columnName #>")<#if(dr["nullable"].ToString()=="0"){#>.IsRequired()<#}#>;
|
||||
<#}
|
||||
}
|
||||
#>
|
||||
}
|
||||
}**/
|
||||
|
||||
}
|
||||
|
||||
//----------<#=tableClass#>结束----------
|
||||
|
||||
<# manager.EndBlock(); #>
|
||||
|
||||
<#
|
||||
} #>
|
||||
|
||||
<#
|
||||
manager.Process(true);
|
||||
#>
|
||||
|
||||
|
||||
<#+
|
||||
/// <summary>
|
||||
/// SQL[不完善,需要的自己改造]
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
public string TransFromSqlType(string type,string data_length,string nullable)
|
||||
{
|
||||
if(type.ToLower()=="nvarchar2")
|
||||
{
|
||||
return "varchar2";
|
||||
}
|
||||
if(type.ToLower()=="uniqueidentifier")
|
||||
{
|
||||
return "Guid"+(nullable=="1"?"?":"");
|
||||
}
|
||||
//是主键 且 type是字符串的 改成guid
|
||||
if((type.ToLower()=="raw"&&data_length=="16"))
|
||||
{
|
||||
return "Guid"+(nullable=="1"?"?":"");
|
||||
}
|
||||
switch(type.ToLower())
|
||||
{
|
||||
case "int":
|
||||
case "int32":
|
||||
case "number":
|
||||
type="int"+(nullable=="1"?"?":"");
|
||||
break;
|
||||
case "varchar":
|
||||
case "varchar2":
|
||||
case "text":
|
||||
case "ntext":
|
||||
case "nvarchar":
|
||||
case "longtext":
|
||||
case "string":
|
||||
case "raw":
|
||||
case "nclog":
|
||||
case "nclob":
|
||||
case "clob":
|
||||
type="string";
|
||||
break;
|
||||
case "blob":
|
||||
type="byte[]";
|
||||
break;
|
||||
case "bit":
|
||||
case "boolean":
|
||||
type="bool";
|
||||
break;
|
||||
case "datetime":
|
||||
case "date":
|
||||
type="DateTime"+(nullable=="1"?"?":"");
|
||||
break;
|
||||
case "bigint":
|
||||
type="long";
|
||||
break;
|
||||
case "decimal":
|
||||
type="decimal"+(nullable=="1"?"?":"");
|
||||
break;
|
||||
|
||||
|
||||
|
||||
}
|
||||
return type;
|
||||
}
|
||||
public string ViewTransFromSqlType(string type,string data_length,string nullable)
|
||||
{
|
||||
if(type.ToLower()=="nvarchar2")
|
||||
{
|
||||
return "varchar2";
|
||||
}
|
||||
if(type.ToLower()=="uniqueidentifier")
|
||||
{
|
||||
return "Guid?";
|
||||
}
|
||||
//是主键 且 type是字符串的 改成guid
|
||||
if((type.ToLower()=="raw"&&data_length=="16"))
|
||||
{
|
||||
return "Guid?";
|
||||
}
|
||||
switch(type.ToLower())
|
||||
{
|
||||
case "int":
|
||||
case "int32":
|
||||
case "number":
|
||||
type="int?";
|
||||
break;
|
||||
case "varchar":
|
||||
case "varchar2":
|
||||
case "text":
|
||||
case "ntext":
|
||||
case "nvarchar":
|
||||
case "longtext":
|
||||
case "string":
|
||||
case "raw":
|
||||
case "nclog":
|
||||
case "nclob":
|
||||
case "clob":
|
||||
type="string";
|
||||
break;
|
||||
case "blob":
|
||||
type="byte[]";
|
||||
break;
|
||||
case "bit":
|
||||
case "boolean":
|
||||
type="bool";
|
||||
break;
|
||||
case "datetime":
|
||||
case "date":
|
||||
type="DateTime?";
|
||||
break;
|
||||
case "bigint":
|
||||
type="long?";
|
||||
break;
|
||||
|
||||
|
||||
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
public string GetFormColumnName(string fieldname,string tablename)
|
||||
{
|
||||
if(tablename.StartsWith("PRJ_STAGE_FORM_")){
|
||||
return fieldname;
|
||||
}
|
||||
return GetClassName(fieldname);
|
||||
}
|
||||
public string GetClassName(string tablename)
|
||||
{
|
||||
/**
|
||||
string[] tablestr = tablename.Split('_');
|
||||
string rslt = "";
|
||||
foreach (var str in tablestr)
|
||||
{
|
||||
rslt = rslt + TitleToUpper(str.ToLower());
|
||||
}
|
||||
return rslt;
|
||||
**/
|
||||
return tablename;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public string TitleToUpper(string str)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(str))
|
||||
return string.Empty;
|
||||
|
||||
char[] s = str.ToCharArray();
|
||||
char c = s[0];
|
||||
|
||||
if ('a' <= c && c <= 'z')
|
||||
c = (char)(c & ~0x20);
|
||||
|
||||
s[0] = c;
|
||||
|
||||
return new string(s);
|
||||
}
|
||||
|
||||
|
||||
string connectionstr ="data source=118.178.224.202;initial catalog=CompanyScore_Test;persist security info=True;user id=KYSQLSERVERADMIN;password=KYDBLogin20161103...;";
|
||||
|
||||
public DataTable GetDataTable()
|
||||
{
|
||||
DataTable dtrslt = QueryTable("SELECT Name,XType FROM SysObjects Where XType='U' ORDER BY Name");
|
||||
DataTable viewrslt = QueryTable("SELECT Name,XType FROM SysObjects Where XType='V' ORDER BY Name");
|
||||
|
||||
DataTable rslt = dtrslt.Copy();
|
||||
//添加DataTable2的数据
|
||||
foreach (DataRow dr in viewrslt.Rows)
|
||||
{
|
||||
rslt.ImportRow(dr);
|
||||
}
|
||||
|
||||
return rslt;
|
||||
}
|
||||
|
||||
public DataTable QueryTable(string sql)
|
||||
{
|
||||
DataSet ds = new DataSet();
|
||||
try
|
||||
{
|
||||
SqlConnection con = new SqlConnection(connectionstr);
|
||||
con.Open();
|
||||
SqlCommand cmd = new SqlCommand(sql, con);
|
||||
SqlDataAdapter oda = new SqlDataAdapter();
|
||||
oda.SelectCommand = cmd;
|
||||
oda.Fill(ds);
|
||||
con.Close();
|
||||
}
|
||||
catch (Exception ee)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
return ds.Tables[0];
|
||||
}
|
||||
|
||||
public DataTable GetDataTableCloumn(string datatable)
|
||||
{
|
||||
DataSet ds = new DataSet();
|
||||
try
|
||||
{
|
||||
SqlConnection con = new SqlConnection(connectionstr);
|
||||
con.Open();
|
||||
SqlCommand cmd = new SqlCommand("select sc.id,sc.name columnname,st.name datatype,sc.length data_length,sc.isnullable nullable,isnull(ep.value,'') comments from syscolumns sc inner join systypes st on sc.xusertype=st.xusertype left join sys.columns c on sc.id=c.object_id and sc.name=c.name left join sys.extended_properties ep on sc.id=ep.major_id and c.column_id=ep.minor_id and ep.class =1 where sc.id=object_id('"+datatable+"')", con);
|
||||
SqlDataAdapter oda = new SqlDataAdapter();
|
||||
oda.SelectCommand = cmd;
|
||||
oda.Fill(ds);
|
||||
con.Close();
|
||||
}
|
||||
catch (Exception ee)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
return ds.Tables[0];
|
||||
}
|
||||
|
||||
|
||||
public string GetKey(string table)
|
||||
{
|
||||
string rslt = "";
|
||||
string sql = @"select * from ( select a.name as FieldName,a.isnullable,c.name as FieldType,COLUMNPROPERTY(a.id,a.name,'IsIdentity') as isidentity,PK=case when exists(SELECT 1 FROM sysobjects where xtype='PK' and parent_obj=a.id and name in (SELECT name FROM sysindexes WHERE indid in(SELECT indid FROM sysindexkeys WHERE id = a.id AND colid=a.colid
|
||||
))) then 'true' else 'false' end from SysColumns a left JOIN systypes c on a.xusertype=c.xusertype where a.id=Object_Id('"+table+"') ) m where PK='true'";
|
||||
DataSet ds = new DataSet();
|
||||
try
|
||||
{
|
||||
using (SqlConnection connection = new SqlConnection(connectionstr))
|
||||
{
|
||||
SqlCommand command = new SqlCommand(sql, connection);
|
||||
connection.Open();
|
||||
SqlDataReader reader;
|
||||
reader = command.ExecuteReader();
|
||||
while (reader.Read())
|
||||
{
|
||||
rslt = reader.GetString(0);
|
||||
}
|
||||
reader.Close();
|
||||
}
|
||||
}
|
||||
catch (Exception ee)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
return rslt;
|
||||
}
|
||||
|
||||
|
||||
#>
|
||||
|
||||
Reference in New Issue
Block a user