mirror of
https://gitea.tendokyu.moe/Kayori/MedusaPluginChargeMachine.git
synced 2026-09-27 09:37:58 +03:00
Introduce ChargeMachineDbContext (SQLite) with ArticleContent and ChargeHistory entities, plus migrations, and wire it up via ConfigurePluginServices/OnAppInitialize with startup migration and article-content seeding. - ChargeEaChargeHandler now records each charge to ChargeHistory - GetConfigEaChargeHandler serves article config from the DB instead of hardcoded values, and adds multibills/readagreement fields - GetLastLogEaChargeHandler returns real daily totals and recent charge items from history, keyed by session card - Add GetRecentChargeEaChargeHandler (paginated charge history) and OpChPassEaChargeHandler (PIN change) - Update handlers to the new HandleAsync/primary-constructor style, file-scoped namespaces - Bump EF Core/Identity packages and Abstractions reference to net10.0/10.0.10
40 lines
900 B
C#
40 lines
900 B
C#
using System.Xml.Serialization;
|
|
using Abstractions.SerializationTypes;
|
|
|
|
namespace MedusaPluginChargeMachine.Models.Response;
|
|
|
|
[XmlRoot("eacharge")]
|
|
[Serializable]
|
|
public class GetRecentChargeResponse
|
|
{
|
|
[XmlAttribute("status")]
|
|
public int Status { get; set; }
|
|
|
|
[XmlElement("num")]
|
|
public XrpcInt Num { get; set; }
|
|
|
|
[XmlElement("item")]
|
|
public List<GetRecentChargeItem> Items { get; set; } = [];
|
|
}
|
|
|
|
public record GetRecentChargeItem
|
|
{
|
|
[XmlElement("rcvtime")]
|
|
public XrpcString RcvTime { get; set; }
|
|
|
|
[XmlElement("chrgprice")]
|
|
public XrpcInt ChrgPrice { get; set; }
|
|
|
|
[XmlElement("cardno")]
|
|
public XrpcString CardNo { get; set; }
|
|
|
|
[XmlElement("acccode")]
|
|
public XrpcString AccCode { get; set; }
|
|
|
|
[XmlElement("rcvstatus")]
|
|
public XrpcInt RcvStatus { get; set; }
|
|
|
|
[XmlElement("fontcolor")]
|
|
public XrpcString FontColor { get; set; }
|
|
}
|