chore: 首次簽入 Thinkyu ASP.NET 專案
- 加入 Visual Studio / ASP.NET .gitignore - 排除建置輸出、IDE 設定、NuGet packages、大型 MSI 安裝檔
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace 報到系統客戶端.Data.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 本地 BPSN 表資料項目
|
||||
/// 對應後端 DAC_BPSN.cs 的 BPSNItem
|
||||
/// </summary>
|
||||
public class LocalBPSNItem
|
||||
{
|
||||
[JsonProperty("BPENO")]
|
||||
public string BPENO { get; set; }
|
||||
|
||||
[JsonProperty("BPNME")]
|
||||
public string BPNME { get; set; }
|
||||
|
||||
[JsonProperty("BPAWD")]
|
||||
public string BPAWD { get; set; }
|
||||
|
||||
[JsonProperty("Is系統管理群組")]
|
||||
public bool Is系統管理群組 { get; set; }
|
||||
|
||||
[JsonProperty("Is客戶管理群組")]
|
||||
public bool Is客戶管理群組 { get; set; }
|
||||
|
||||
[JsonProperty("Is現場工作群組")]
|
||||
public bool Is現場工作群組 { get; set; }
|
||||
|
||||
[JsonProperty("Is查詢群組")]
|
||||
public bool Is查詢群組 { get; set; }
|
||||
|
||||
[JsonProperty("CreatedAt")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("UpdatedAt")]
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace 報到系統客戶端.Data.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 本地 CheckIn 表資料項目
|
||||
/// 簽到簽退紀錄表
|
||||
/// </summary>
|
||||
public class LocalCheckInItem
|
||||
{
|
||||
[JsonProperty("ID")]
|
||||
public int ID { get; set; }
|
||||
|
||||
[JsonProperty("CourseID")]
|
||||
public int CourseID { get; set; }
|
||||
|
||||
[JsonProperty("Name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonProperty("Mobile")]
|
||||
public string Mobile { get; set; }
|
||||
|
||||
[JsonProperty("SignUpType")]
|
||||
public string SignUpType { get; set; }
|
||||
|
||||
[JsonProperty("IDNumber")]
|
||||
public string IDNumber { get; set; }
|
||||
|
||||
[JsonProperty("IDType")]
|
||||
public string IDType { get; set; }
|
||||
|
||||
[JsonProperty("MealType")]
|
||||
public string MealType { get; set; }
|
||||
|
||||
[JsonProperty("Email")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[JsonProperty("LossJobTimes")]
|
||||
public int? LossJobTimes { get; set; }
|
||||
|
||||
[JsonProperty("Gender")]
|
||||
public string Gender { get; set; }
|
||||
|
||||
[JsonProperty("AgreementStatus")]
|
||||
public string AgreementStatus { get; set; }
|
||||
|
||||
[JsonProperty("CheckInType")]
|
||||
public string CheckInType { get; set; }
|
||||
|
||||
[JsonProperty("CheckInTime")]
|
||||
public string CheckInTime { get; set; }
|
||||
|
||||
[JsonProperty("UploadTime")]
|
||||
public DateTime? UploadTime { get; set; }
|
||||
|
||||
[JsonProperty("CreatedAt")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("UpdatedAt")]
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace 報到系統客戶端.Data.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 本地 Classes 表資料項目
|
||||
/// 對應後端 DAC_Classes1.cs 的 ClassesItem
|
||||
/// </summary>
|
||||
public class LocalClassesItem
|
||||
{
|
||||
[JsonProperty("ID")]
|
||||
public int ID { get; set; }
|
||||
|
||||
[JsonProperty("CourseCode")]
|
||||
public string CourseCode { get; set; }
|
||||
|
||||
[JsonProperty("CourseName")]
|
||||
public string CourseName { get; set; }
|
||||
|
||||
[JsonProperty("CourseDate")]
|
||||
public string CourseDate { get; set; }
|
||||
|
||||
[JsonProperty("CourseLocation")]
|
||||
public string CourseLocation { get; set; }
|
||||
|
||||
[JsonProperty("NotificationTemplate")]
|
||||
public string NotificationTemplate { get; set; }
|
||||
|
||||
[JsonProperty("AgreedTerms")]
|
||||
public string AgreedTerms { get; set; }
|
||||
|
||||
[JsonProperty("StartTime")]
|
||||
public string StartTime { get; set; }
|
||||
|
||||
[JsonProperty("EndTime")]
|
||||
public string EndTime { get; set; }
|
||||
|
||||
[JsonProperty("CreatedAt")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("UpdatedAt")]
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public string DisplayText {
|
||||
get {
|
||||
return string.Format("[{0}] ({1:yyyy-MM-dd} {2}) {3} ", CourseCode, CourseDate, StartTime, CourseName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 從後端 API 模型轉換
|
||||
/// </summary>
|
||||
public static LocalClassesItem ConvertFromApiModel(報到系統客戶端.Models.ClassesItem apiModel)
|
||||
{
|
||||
if (apiModel == null) return null;
|
||||
|
||||
return new LocalClassesItem
|
||||
{
|
||||
ID = apiModel.ID,
|
||||
CourseCode = apiModel.CourseCode,
|
||||
CourseName = apiModel.CourseName,
|
||||
CourseDate = apiModel.CourseDate.ToString("yyyy-MM-dd"),
|
||||
CourseLocation = apiModel.CourseLocation,
|
||||
NotificationTemplate = apiModel.NotificationTemplate,
|
||||
AgreedTerms = apiModel.AgreedTerms,
|
||||
StartTime = apiModel.StartTime,
|
||||
EndTime = apiModel.EndTime,
|
||||
CreatedAt = DateTime.Now,
|
||||
UpdatedAt = DateTime.Now
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace 報到系統客戶端.Data.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 本地 SignUps 表資料項目
|
||||
/// 對應後端 DAC_SignUp1.cs 的 SignUpItem
|
||||
/// </summary>
|
||||
public class LocalSignUpItem
|
||||
{
|
||||
[JsonProperty("ID")]
|
||||
public int ID { get; set; }
|
||||
|
||||
[JsonProperty("CourseID")]
|
||||
public int CourseID { get; set; }
|
||||
|
||||
[JsonProperty("SeqNo")]
|
||||
public int SeqNo { get; set; }
|
||||
|
||||
[JsonProperty("Name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonProperty("Mobile")]
|
||||
public string Mobile { get; set; }
|
||||
|
||||
[JsonProperty("QRCode")]
|
||||
public string QRCode { get; set; }
|
||||
|
||||
[JsonProperty("SignUpType")]
|
||||
public string SignUpType { get; set; }
|
||||
|
||||
[JsonProperty("IDNumber")]
|
||||
public string IDNumber { get; set; }
|
||||
|
||||
[JsonProperty("IDType")]
|
||||
public string IDType { get; set; }
|
||||
|
||||
[JsonProperty("MealType")]
|
||||
public string MealType { get; set; }
|
||||
|
||||
[JsonProperty("Email")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[JsonProperty("LossJobTimes")]
|
||||
public int? LossJobTimes { get; set; }
|
||||
|
||||
[JsonProperty("Gender")]
|
||||
public string Gender { get; set; }
|
||||
|
||||
[JsonProperty("AgreementStatus")]
|
||||
public string AgreementStatus { get; set; }
|
||||
|
||||
[JsonProperty("CheckInTime")]
|
||||
public string CheckInTime { get; set; }
|
||||
|
||||
[JsonProperty("CheckOutTime")]
|
||||
public string CheckOutTime { get; set; }
|
||||
|
||||
[JsonProperty("CreatedAt")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("UpdatedAt")]
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轉換為後端 API 使用的模型
|
||||
/// </summary>
|
||||
public static 報到系統客戶端.Models.SignUpItem ConvertToApiModel(LocalSignUpItem local)
|
||||
{
|
||||
if (local == null) return null;
|
||||
|
||||
return new 報到系統客戶端.Models.SignUpItem
|
||||
{
|
||||
ID = local.ID,
|
||||
CourseID = local.CourseID,
|
||||
Name = local.Name,
|
||||
Mobile = local.Mobile,
|
||||
QRCode = local.QRCode,
|
||||
SignUpType = local.SignUpType,
|
||||
Email = local.Email,
|
||||
LossJobTimes = local.LossJobTimes,
|
||||
Gender = local.Gender,
|
||||
AgreementStatus = local.AgreementStatus,
|
||||
CheckInTime = local.CheckInTime,
|
||||
CheckOutTime = local.CheckOutTime
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 從後端 API 模型轉換
|
||||
/// </summary>
|
||||
public static LocalSignUpItem ConvertFromApiModel(報到系統客戶端.Models.SignUpItem apiModel)
|
||||
{
|
||||
if (apiModel == null) return null;
|
||||
|
||||
return new LocalSignUpItem
|
||||
{
|
||||
ID = apiModel.ID,
|
||||
CourseID = apiModel.CourseID,
|
||||
SeqNo = apiModel.SeqNo,
|
||||
Name = apiModel.Name,
|
||||
Mobile = apiModel.Mobile,
|
||||
QRCode = apiModel.QRCode,
|
||||
SignUpType = apiModel.SignUpType,
|
||||
IDNumber = apiModel.IDNumber,
|
||||
IDType = apiModel.IDType,
|
||||
MealType = apiModel.MealType,
|
||||
Email = apiModel.Email,
|
||||
LossJobTimes = apiModel.LossJobTimes,
|
||||
Gender = apiModel.Gender,
|
||||
AgreementStatus = apiModel.AgreementStatus,
|
||||
CheckInTime = apiModel.CheckInTime,
|
||||
CheckOutTime = apiModel.CheckOutTime,
|
||||
CreatedAt = DateTime.Now,
|
||||
UpdatedAt = DateTime.Now
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user