using System; using System.Collections.Generic; using Microsoft.EntityFrameworkCore; namespace CouponReport.Models.CouponMiddleware; public partial class CouponMiddlewareContext : DbContext { public CouponMiddlewareContext() { } public CouponMiddlewareContext(DbContextOptions options) : base(options) { } public virtual DbSet CouponConsumes { get; set; } public virtual DbSet CouponDetails { get; set; } public virtual DbSet CouponSettings { get; set; } public virtual DbSet HospitalQrCodes { get; set; } public virtual DbSet Logs { get; set; } public virtual DbSet Members { get; set; } public virtual DbSet MemberConsumes { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity(entity => { entity.ToTable("CouponConsume"); entity.Property(e => e.DeviceId) .HasMaxLength(20) .IsUnicode(false); entity.Property(e => e.DiscountAmount).HasColumnType("decimal(18, 2)"); entity.Property(e => e.ExternalSystemKey).HasMaxLength(500); entity.Property(e => e.PlateNo).HasMaxLength(20); entity.Property(e => e.SerialNo) .HasMaxLength(50) .IsUnicode(false); entity.Property(e => e.SiteId) .HasMaxLength(50) .IsUnicode(false); entity.Property(e => e.TotalAmount).HasColumnType("decimal(18, 2)"); }); modelBuilder.Entity(entity => { entity.ToTable("CouponDetail"); entity.Property(e => e.ExternalSystemKey).HasMaxLength(500); entity.Property(e => e.Seq).HasMaxLength(3); entity.Property(e => e.SerialNo).HasMaxLength(50); entity.Property(e => e.Status) .HasMaxLength(10) .IsUnicode(false); entity.Property(e => e.TransactionId).HasMaxLength(20); entity.Property(e => e.Type) .HasMaxLength(15) .IsUnicode(false); }); modelBuilder.Entity(entity => { entity.ToTable("CouponSetting"); entity.Property(e => e.Name).HasMaxLength(20); entity.Property(e => e.Url).HasMaxLength(500); }); modelBuilder.Entity(entity => { entity.ToTable("HospitalQrCode"); entity.Property(e => e.ActivityName).HasMaxLength(50); entity.Property(e => e.QrCode).HasMaxLength(100); }); modelBuilder.Entity(entity => { entity.ToTable("Log"); entity.Property(e => e.DeviceId) .HasMaxLength(30) .IsUnicode(false); entity.Property(e => e.DiscountAmount).HasColumnType("decimal(18, 2)"); entity.Property(e => e.ExternalSystemKey).HasMaxLength(500); entity.Property(e => e.LogType) .HasMaxLength(10) .IsUnicode(false); entity.Property(e => e.PlateNo).HasMaxLength(20); entity.Property(e => e.SerialNo) .HasMaxLength(50) .IsUnicode(false); entity.Property(e => e.SiteId) .HasMaxLength(10) .IsUnicode(false); entity.Property(e => e.Status) .HasMaxLength(10) .IsUnicode(false); entity.Property(e => e.TotalAmount).HasColumnType("decimal(18, 2)"); entity.Property(e => e.Type) .HasMaxLength(10) .IsUnicode(false); }); modelBuilder.Entity(entity => { entity.ToTable("Member"); entity.Property(e => e.MemberId).HasMaxLength(50); }); modelBuilder.Entity(entity => { entity.ToTable("MemberConsume"); entity.Property(e => e.MemberId).HasMaxLength(50); entity.Property(e => e.PlateNo).HasMaxLength(20); entity.Property(e => e.SerialNo) .HasMaxLength(50) .IsUnicode(false); }); OnModelCreatingPartial(modelBuilder); } partial void OnModelCreatingPartial(ModelBuilder modelBuilder); }