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() { StartIdTag = string.Empty; StopIdTag = string.Empty; StartTime = new DateTime(1991, 1, 1); StopTime = new DateTime(1991, 1, 1); ReservationId = -1; BillingDone = false; CreatedOn = new DateTime(1991, 1, 1); UpdatedOn = new DateTime(1991, 1, 1); StartTransactionReportedOn = new DateTime(1991, 1, 1); StopTransactionReportedOn = new DateTime(1991, 1, 1); ErrorMsg = string.Empty; } [Key] public Int32 Id { get; set; } /// /// 客戶代碼 /// [Required] public Guid CustomerId { get; set; } /// /// 槍號 1 byte string、本來是 string、改為byte /// [Required] [Index("IX_1202_Issue_Report", Order = 2, IsUnique = true)] public byte ConnectorId { get; set; } /// /// chargePointSerialNumber /// [Index("IX_MachineId")] [Index("IX_1202_Issue_Report", Order = 1, IsUnique = true)] [Required] [StringLength(50)] public string ChargeBoxId { get; set; } /// /// StartIdTag /// [StringLength(20)] public string StartIdTag { get; set; } /// /// StopIdTag /// [StringLength(20)] public string StopIdTag { get; set; } /// /// 開始充電開始時間 /// [Index("IX_1202_Issue_Report", Order = 3, IsUnique = true)] public DateTime StartTime { get; set; } /// /// 充電結束時間 /// public DateTime StopTime { get; set; } /// /// 預約Id /// public int ReservationId { set; get; } /// /// 停止原因No /// public int StopReasonId { set; get; } /// /// 停止原因 /// [StringLength(60)] public string StopReason { set; get; } /// /// 開始meter /// [DataType("decimal(16 ,2)")] public decimal MeterStart { get; set; } /// /// 結束meter /// [DataType("decimal(16 ,2)")] public decimal MeterStop { 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 RetryStopTransactionTimes { get; set; } /// /// 回調客戶API,問題紀錄 /// public string ErrorMsg { set; get; } /// /// 計費完成與否 /// public bool BillingDone { set; get; } /// /// 是否上傳到TTIA /// public bool UploadedtoTTIA { set; get; } [DataType("decimal(16 ,2)")] public decimal Cost { set; get; } /// /// 收費明細 /// [StringLength(3000)] public string Receipt { set; get; } /// /// 收費標準 /// [StringLength(1500)] public string Fee { set; get; } } }