namespace EVCB_OCPP.Domain.Models.Database { using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.Spatial; /// /// 交易紀錄 /// [Table("TransactionRecord")] public partial class TransactionRecord { public TransactionRecord() { } [Key] public Int64 Id { get; set; } /// /// 客戶代碼 /// [Required] public Guid CustomerId { get; set; } [Required] [Index("IX_MachineId")] [Index("IX_1202_Issue_Report", Order = 1, IsUnique = true)] [StringLength(36)] public string MachineId { get; set; } [ForeignKey("MachineId")] public virtual Machine Machine { get; set; } /// /// 槍號 1 byte string、本來是 string、改為byte /// [Required] [Index("IX_1202_Issue_Report", Order = 2, IsUnique = true)] public byte ConnectorId { get; set; } /// /// TransactionId /// [Index("IX_TransactionId")] [Index("IX_1202_Issue_Report", Order = 3, IsUnique = true)] [Required] public int TransactionId { get; set; } /// /// chargePointSerialNumber /// [StringLength(25)] public string chargePointSerialNumber { get; set; } /// /// IdTag /// [StringLength(20)] public string IdTag { get; set; } /// /// 開始充電開始時間 /// [Index("IX_1202_Issue_Report", Order = 4, IsUnique = true)] public DateTime StartTime { get; set; } /// /// 充電結束時間 /// public DateTime StopTime { get; set; } /// /// 充電停止原因代號 /// public int StopTransactionReasonId { get; set; } /// /// 開始meter /// [DataType("decimal(16 ,2")] public decimal MeterStart { get; set; } /// /// 結束meter /// [DataType("decimal(16 ,2")] public decimal MeterStop { get; set; } /// /// 開始SOC /// [DataType("decimal(16 ,2")] public decimal SOCStart { get; set; } /// /// 結束SOC /// [DataType("decimal(16 ,2")] public decimal SOCStop { get; set; } /// /// 回報時間 /// public DateTime? ReportedOn { get; set; } /// /// 產生時間 /// public DateTime CreatedOn { get; set; } /// /// 更新時間 /// public DateTime? UpdatedOn { get; set; } /// /// 開始充電的回報時間 /// public DateTime StartTransactionReportedOn { get; set; } /// /// 開始充電回報的次數 /// public int RetryStartTransactionTimes { get; set; } /// /// 結束充電的回報時間 /// public DateTime StopTransactionReportedOn { get; set; } /// /// 結束充電回報的次數 /// public int RtryStopTransactionTimes { get; set; } /// /// 回調客戶API,問題紀錄 /// public string ErrorMsg { set; get; } } }