Browse Source

ef中,decimal精度在map中指定

黑艺新账号
liangkun 1 year ago
parent
commit
36bc0d6f0f
2 changed files with 5 additions and 2 deletions
  1. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/ADR_RestrictionMap.cs
  2. +3
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionEntity.cs

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/ADR_RestrictionMap.cs View File

@@ -19,6 +19,8 @@ namespace Learun.Application.Mapping
this.ToTable("ADR_RESTRICTION"); this.ToTable("ADR_RESTRICTION");
//主键 //主键
this.HasKey(t => t.ID); this.HasKey(t => t.ID);
this.Property(e => e.GPSLon).HasPrecision(15, 8);
this.Property(e => e.GPSLat).HasPrecision(15, 8);
#endregion #endregion


#region 配置关系 #region 配置关系


+ 3
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionEntity.cs View File

@@ -11,6 +11,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// 日 期:2020-09-03 14:57 /// 日 期:2020-09-03 14:57
/// 描 述:考勤限制 /// 描 述:考勤限制
/// </summary> /// </summary>
public class ADR_RestrictionEntity public class ADR_RestrictionEntity
{ {
#region 实体成员 #region 实体成员
@@ -125,10 +126,10 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
public bool EnableGPS { get; set; } public bool EnableGPS { get; set; }


[Column("GPSLON")] [Column("GPSLON")]
public string GPSLon { get; set; }
public decimal? GPSLon { get; set; }


[Column("GPSLAT")] [Column("GPSLAT")]
public string GPSLat { get; set; }
public decimal? GPSLat { get; set; }


[Column("GPSADDR")] [Column("GPSADDR")]
public string GPSAddr { get; set; } public string GPSAddr { get; set; }


Loading…
Cancel
Save