//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Nocr.TextMatcher.Persistence;
#nullable disable
namespace Nocr.TextMatcher.Migrator.Migrations
{
[DbContext(typeof(TextMatcherContext))]
partial class TextMatcherContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.3")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
modelBuilder.Entity("Nocr.TextMatcher.AppServices.TextMatches.TextMatch", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("ChatUsername")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("varchar(1024)");
b.Property("CreatedDateTime")
.HasColumnType("datetime(6)");
b.Property("From")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("varchar(512)");
b.Property("MessageId")
.HasColumnType("int");
b.Property("MessageOccuredDateTime")
.HasColumnType("datetime(6)");
b.Property("MessageText")
.IsRequired()
.HasMaxLength(4096)
.HasColumnType("varchar(4096)");
b.Property("SubscriptionId")
.HasColumnType("bigint");
b.Property("UserId")
.HasColumnType("bigint");
b.Property("Version")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("UserId")
.HasDatabaseName("IX_TextMatches_UserId");
b.HasIndex("MessageId", "SubscriptionId")
.HasDatabaseName("IX_TextMatches_MessageId_SubscriptionId");
b.ToTable("TextMatches", (string)null);
});
modelBuilder.Entity("Nocr.TextMatcher.AppServices.TextSubscriptions.TextSubscription", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("Active")
.HasColumnType("tinyint(1)");
b.Property("ChatUsername")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("varchar(1024)");
b.Property("CreatedDateTime")
.HasColumnType("datetime(6)");
b.Property("Rule")
.HasColumnType("int");
b.Property("Template")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("varchar(1024)");
b.Property("UserId")
.HasColumnType("bigint");
b.HasKey("Id");
b.ToTable("TextSubscriptions");
});
#pragma warning restore 612, 618
}
}
}