//
using System;
using Flypaper.Storage;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Flypaper.Storage.Migrations
{
[DbContext(typeof(FlypaperDbContext))]
[Migration("20261121103849_AddExplanationRulesAndTokenWrite")]
partial class AddExplanationRulesAndTokenWrite
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.15");
modelBuilder.Entity("Flypaper.Storage.Entities.ExplanationRuleEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("Enabled")
.HasColumnType("INTEGER");
b.Property("Kind")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("TEXT");
b.Property("Note")
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("Pattern")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("Priority")
.HasColumnType("INTEGER");
b.Property("Text")
.IsRequired()
.HasMaxLength(600)
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("ExplanationRules");
});
modelBuilder.Entity("Flypaper.Storage.Entities.McpTokenEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CanWrite")
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("LastUsedAt")
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("TokenHash")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("TokenHash")
.IsUnique();
b.ToTable("McpTokens");
});
modelBuilder.Entity("Flypaper.Storage.Entities.SettingEntity", b =>
{
b.Property("Key")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Value")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Key");
b.ToTable("Settings");
});
modelBuilder.Entity("Flypaper.Storage.Entities.TrapEventEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Asn")
.HasColumnType("INTEGER");
b.Property("BytesSent")
.HasColumnType("INTEGER");
b.Property("City")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property("ClientInfo")
.HasMaxLength(2048)
.HasColumnType("TEXT");
b.Property("Country")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property("CountryCode")
.HasMaxLength(2)
.HasColumnType("TEXT");
b.Property("DurationMs")
.HasColumnType("INTEGER");
b.Property("EndedAt")
.HasColumnType("TEXT");
b.Property("Outcome")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("TEXT");
b.Property("Protocol")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("TEXT");
b.Property("Provider")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property("RemoteIp")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("SessionId")
.HasColumnType("TEXT");
b.Property("StartedAt")
.HasColumnType("TEXT");
b.Property("Strategy")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("Target")
.HasMaxLength(2048)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("Asn");
b.HasIndex("CountryCode");
b.HasIndex("RemoteIp");
b.HasIndex("StartedAt");
b.ToTable("TrapEvents");
});
#pragma warning restore 612, 618
}
}
}