mirror of
https://gitea.tendokyu.moe/Kayori/MedusaPluginChargeMachine.git
synced 2026-09-25 23:57: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
61 lines
1.9 KiB
C#
61 lines
1.9 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using MedusaPluginChargeMachine;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace MedusaPluginChargeMachine.Migrations
|
|
{
|
|
[DbContext(typeof(ChargeMachineDbContext))]
|
|
partial class ChargeMachineDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "10.0.10");
|
|
|
|
modelBuilder.Entity("MedusaPluginChargeMachine.Entities.ArticleContent", b =>
|
|
{
|
|
b.Property<string>("ArticleType")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("ArticleDoc")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("ArticleType");
|
|
|
|
b.ToTable("ArticleContents");
|
|
});
|
|
|
|
modelBuilder.Entity("MedusaPluginChargeMachine.Entities.ChargeHistory", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("CardId")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("ChargeAmount")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("ChargeNum")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("OrderDate")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("ChargeHistories");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|