using Apimanager_backend.Models; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Apimanager_backend.Data { public class PaymentConfigConfig : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.HasKey(x => x.Id); builder.Property(x => x.Id) .ValueGeneratedOnAdd(); builder.HasData( new PaymentConfig() { Id = 1, Method = PaymentType.AliPay,PayType = PayType.Official, AppId = "", SecretKey = "", PublicKey = "", NotifyUrl = "", GatewayUrl = "", IsEnabled = false }, new PaymentConfig() { Id = 2, Method = PaymentType.WxPay, PayType = PayType.Official, AppId = "", SecretKey = "", PublicKey = "", NotifyUrl = "", GatewayUrl = "", IsEnabled = false }, new PaymentConfig() { Id = 3, Method = PaymentType.QQPay, PayType = PayType.Official, AppId = "", SecretKey = "", PublicKey = "", NotifyUrl = "", GatewayUrl = "", IsEnabled = false }, new PaymentConfig() { Id = 4, Method = PaymentType.Bank, PayType = PayType.Official, AppId = "", SecretKey = "", PublicKey = "", NotifyUrl = "", GatewayUrl = "", IsEnabled = false } ); } } }