public void Configure(EntityTypeBuilder <User> builder)
        {
            builder.ToTable("User");

            builder.HasIndex(e => e.ExternalId)
            .HasName("UNIQ_B28B6F38C05FB297")
            .IsUnique();

            builder.HasIndex(e => e.DisplayName)
            .HasName("UNIQ_B28B6F38A0D96FBF")
            .IsUnique();

            builder.HasIndex(e => e.Email)
            .HasName("UNIQ_B28B6F3892FC23A8")
            .IsUnique();

            builder.HasGuidKey();

            builder.Property(e => e.ExternalId)
            .HasColumnName("externalId")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(127));

            builder.Property(e => e.DisplayName)
            .IsRequired()
            .HasColumnName("displayName")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(35));

            builder.Property(e => e.Email)
            .IsRequired()
            .HasColumnName("email")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(180));
        }
        public void Configure(EntityTypeBuilder <GameRace> builder)
        {
            builder.ToTable("GameRace");

            builder.HasIndex(e => e.GameFactionId)
            .HasName("IDX_D51A7CF883048B90");

            builder.HasGuidKey();

            builder.Property(e => e.GameId)
            .IsRequired()
            .HasColumnName("gameId")
            .HasColumnType(MySqlBuilderTypes.UnsignedInt);

            builder.Property(e => e.Name)
            .IsRequired()
            .HasColumnName("name")
            .HasUtf8ColumnType((MySqlBuilderTypes.String(20)));

            builder.Property(e => e.GameFactionId)
            .HasColumnName("gameFactionId")
            .HasForeignKeyColumnType();
            builder.HasOne(d => d.GameFaction)
            .WithMany()
            .HasForeignKey(d => d.GameFactionId)
            .OnDelete(DeleteBehavior.ClientSetNull)
            .HasConstraintName("FK_D51A7CF883048B90");
        }
Beispiel #3
0
        public void Configure(EntityTypeBuilder <FeatureUse> builder)
        {
            builder.ToTable("FeatureUse");

            builder.HasIndex(e => e.UsedById)
            .HasName("IDX_E504F432FCEF271C");

            builder.HasGuidKey();

            builder.Property(e => e.Feature)
            .IsRequired()
            .HasColumnName("feature")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(255));

            builder.Property(e => e.RawData)
            .HasColumnName("rawData")
            .HasUtf8ColumnType(MySqlBuilderTypes.LongText);

            builder.Property(e => e.UsedOn)
            .HasColumnName("usedOn")
            .HasColumnType(MySqlBuilderTypes.DateTime);

            builder.Property(e => e.UsedById)
            .HasColumnName("usedById")
            .HasForeignKeyColumnType();
            builder.HasOne(d => d.UsedBy)
            .WithMany()
            .HasForeignKey(d => d.UsedById)
            .HasConstraintName("FK_E504F432FCEF271C");
        }
Beispiel #4
0
        public void Configure(EntityTypeBuilder <GameGuild> builder)
        {
            builder.ToTable("GameGuild");

            builder.HasIndex(e => e.GameRealmId)
            .HasName("IDX_B48152AFFA96DBDA");

            builder.HasGuidKey();

            builder.Property(e => e.GameId)
            .IsRequired()
            .HasColumnName("gameId")
            .HasColumnType(MySqlBuilderTypes.UnsignedInt);

            builder.Property(e => e.Name)
            .IsRequired()
            .HasColumnName("name")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(100));

            builder.Property(e => e.GameRealmId)
            .HasColumnName("gameRealmId")
            .HasForeignKeyColumnType();
            builder.HasOne(d => d.GameRealm)
            .WithMany()
            .HasForeignKey(d => d.GameRealmId)
            .OnDelete(DeleteBehavior.ClientSetNull)
            .HasConstraintName("FK_B48152AFFA96DBDA");
        }
        public void Configure(EntityTypeBuilder <FeatureToggle> builder)
        {
            builder.ToTable("FeatureToggle");

            builder.HasIndex(e => e.UserId)
            .HasName("IDX_D25E05DD612E729E");

            builder.HasGuidKey();

            builder.Property(e => e.Feature)
            .IsRequired()
            .HasColumnName("feature")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(255));

            builder.Property(e => e.Toggle)
            .HasColumnName("toggle");

            builder.Property(e => e.UserId)
            .HasColumnName("userId")
            .HasForeignKeyColumnType();
            builder.HasOne(d => d.User)
            .WithMany()
            .HasForeignKey(d => d.UserId)
            .OnDelete(DeleteBehavior.ClientSetNull)
            .HasConstraintName("FK_D25E05DD612E729E");
        }
        public void Configure(EntityTypeBuilder <MailSend> builder)
        {
            builder.ToTable("MailSend");

            builder.HasGuidKey();

            builder.Property(e => e.FromAddress)
            .IsRequired()
            .HasColumnName("fromAddress")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(255));

            builder.Property(e => e.SendOn)
            .IsRequired()
            .HasColumnName("sendOn")
            .HasColumnType(MySqlBuilderTypes.DateTime);

            builder.Property(e => e.Subject)
            .IsRequired()
            .HasColumnName("subject")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(255));

            builder.Property(e => e.ToAddress)
            .IsRequired()
            .HasColumnName("toAddress")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(255));
        }
        public void Configure(EntityTypeBuilder <CalendarExport> builder)
        {
            builder.ToTable("CalendarExport");

            builder.HasIndex(e => e.UserId)
            .HasName("IDX_6E28848862DEB3E8");

            builder.HasGuidKey();

            builder.Property(e => e.ExportAbsence)
            .IsRequired()
            .HasColumnName("exportAbsence");

            builder.Property(e => e.ExportNew)
            .IsRequired()
            .HasColumnName("exportNew");

            builder.Property(e => e.Secret)
            .IsRequired()
            .HasColumnName("secret")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(100));

            builder.Property(e => e.UserId)
            .HasColumnName("userId")
            .HasForeignKeyColumnType();
            builder.HasOne(d => d.User)
            .WithMany()
            .HasForeignKey(d => d.UserId)
            .OnDelete(DeleteBehavior.ClientSetNull)
            .HasConstraintName("FK_6E28848862DEB3E8");
        }
        public void Configure(EntityTypeBuilder <ActivityQueueItem> builder)
        {
            builder.ToTable("ActivityQueueItem");

            builder.HasIndex(e => e.ActivityById)
            .HasName("IDX_8A274BCA93C757EE");

            builder.HasGuidKey();

            builder.Property(e => e.ActivityOn)
            .IsRequired()
            .HasColumnName("activityOn")
            .HasColumnType(MySqlBuilderTypes.DateTime);

            builder.Property(e => e.ActivityType)
            .IsRequired()
            .HasColumnName("activityType")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(255));

            builder.Property(e => e.ProcessedOn)
            .HasColumnName("processedOn")
            .HasColumnType(MySqlBuilderTypes.DateTime);

            builder.Property(e => e.RawData)
            .HasColumnName("rawData")
            .HasUtf8ColumnType(MySqlBuilderTypes.LongText);

            builder.Property(e => e.ActivityById)
            .HasColumnName("activityById")
            .HasForeignKeyColumnType();
            builder.HasOne(d => d.ActivityBy)
            .WithMany()
            .HasForeignKey(d => d.ActivityById)
            .HasConstraintName("FK_8A274BCA93C757EE");
        }
        public void Configure(EntityTypeBuilder <GameCharacter> builder)
        {
            builder.ToTable("GameCharacter");

            builder.HasIndex(e => e.GameRealmId)
            .HasName("IDX_92AF3B34FA96DBDA");

            builder.HasGuidKey();

            builder.TimeVersioned();

            builder.Property(e => e.Name)
            .IsRequired()
            .HasColumnName("name")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(255));

            builder.Property(e => e.GameRealmId)
            .HasColumnName("gameRealmId")
            .HasForeignKeyColumnType();
            builder.HasOne(d => d.GameRealm)
            .WithMany()
            .HasForeignKey(d => d.GameRealmId)
            .OnDelete(DeleteBehavior.ClientSetNull)
            .HasConstraintName("FK_92AF3B34FA96DBDA");
        }
        public void Configure(EntityTypeBuilder <Setting> builder)
        {
            builder.ToTable("Setting");

            builder.HasIndex(e => e.UserId)
            .HasName("IDX_50C9810462DEB3E8");

            builder.HasGuidKey();

            builder.Property(e => e.Name)
            .IsRequired()
            .HasColumnName("name")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(255));

            builder.Property(e => e.Value)
            .IsRequired()
            .HasColumnName("value")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(2048));

            builder.Property(e => e.UserId)
            .HasColumnName("userId")
            .HasForeignKeyColumnType();
            builder.HasOne(d => d.User)
            .WithMany()
            .HasForeignKey(d => d.UserId)
            .OnDelete(DeleteBehavior.ClientSetNull)
            .HasConstraintName("FK_50C9810462DEB3E8");
        }
        public void Configure(EntityTypeBuilder <Topic> builder)
        {
            builder.ToTable("Topic");

            builder.HasIndex(e => e.ForumId)
            .HasName("IDX_5C81F11F7830F151");

            builder.HasIndex(e => e.LastPostPosterId)
            .HasName("IDX_5C81F11F22F0147C");

            builder.HasIndex(e => e.PosterId)
            .HasName("IDX_5C81F11F581A197");

            builder.HasGuidKey();

            builder.Property(e => e.LastPostDate)
            .HasColumnName("lastPostDate")
            .HasColumnType(MySqlBuilderTypes.DateTime);

            builder.Property(e => e.PostDate)
            .HasColumnName("postDate")
            .HasColumnType(MySqlBuilderTypes.DateTime);

            builder.Property(e => e.Subject)
            .IsRequired()
            .HasColumnName("subject")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(255));

            builder.Property(e => e.ForumId)
            .HasColumnName("forumId")
            .HasForeignKeyColumnType();
            builder.HasOne(d => d.Forum)
            .WithMany()
            .HasForeignKey(d => d.ForumId)
            .HasConstraintName("FK_5C81F11F7830F151");

            builder.Property(e => e.LastPostPosterId)
            .HasColumnName("lastPostPosterId")
            .HasForeignKeyColumnType();
            builder.HasOne(d => d.LastPostPoster)
            .WithMany()
            .HasForeignKey(d => d.LastPostPosterId)
            .HasConstraintName("FK_5C81F11F22F0147C");

            builder.Property(e => e.PosterId)
            .HasColumnName("posterId")
            .HasForeignKeyColumnType();
            builder.HasOne(d => d.Poster)
            .WithMany()
            .HasForeignKey(d => d.PosterId)
            .OnDelete(DeleteBehavior.ClientSetNull)
            .HasConstraintName("FK_5C81F11F581A197");
        }
        public void Configure(EntityTypeBuilder <GameClass> builder)
        {
            builder.ToTable("GameClass");

            builder.HasGuidKey();

            builder.Property(e => e.GameId)
            .HasColumnName("gameId")
            .HasColumnType(MySqlBuilderTypes.UnsignedInt);

            builder.Property(e => e.Name)
            .IsRequired()
            .HasColumnName("name")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(20));
        }
        public void Configure(EntityTypeBuilder <Forum> builder)
        {
            builder.ToTable("Forum");

            builder.HasIndex(e => e.LastPostPosterId)
            .HasName("IDX_44EA91C922F0147C");

            builder.HasIndex(e => e.LastPostTopicId)
            .HasName("IDX_44EA91C91CA16452");

            builder.HasGuidKey();

            builder.Property(e => e.Name)
            .IsRequired()
            .HasColumnName("name")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(255));

            builder.Property(e => e.Description)
            .IsRequired()
            .HasColumnName("description")
            .HasUtf8ColumnType(MySqlBuilderTypes.Text);

            builder.Property(e => e.LastPostDate)
            .HasColumnName("lastPostDate")
            .HasColumnType(MySqlBuilderTypes.DateTime);

            builder.Property(e => e.LastPostPosterId)
            .HasColumnName("lastPostPosterId")
            .HasForeignKeyColumnType();
            builder.HasOne(d => d.LastPostPoster)
            .WithMany()
            .HasForeignKey(d => d.LastPostPosterId)
            .HasConstraintName("FK_44EA91C922F0147C");

            builder.Property(e => e.LastPostTopicId)
            .HasColumnName("lastPostTopicId")
            .HasForeignKeyColumnType();
            builder.HasOne(d => d.LastPostTopic)
            .WithMany()
            .HasForeignKey(d => d.LastPostTopicId)
            .HasConstraintName("FK_44EA91C91CA16452");
        }
        public void Configure(EntityTypeBuilder <Comment> builder)
        {
            builder.ToTable("Comment");

            builder.HasIndex(e => e.GroupId)
            .HasName("IDX_5BC96BF0ED8188B0");

            builder.HasIndex(e => e.PosterId)
            .HasName("IDX_5BC96BF0581A197");

            builder.HasGuidKey();

            builder.Property(e => e.Content)
            .HasColumnName("content")
            .IsRequired()
            .HasUtf8ColumnType(MySqlBuilderTypes.String((4096)));

            builder.Property(e => e.PostDate)
            .HasColumnName("postDate")
            .HasColumnType(MySqlBuilderTypes.DateTime);

            builder.Property(e => e.GroupId)
            .HasColumnName("groupId")
            .HasForeignKeyColumnType();
            builder.HasOne(d => d.Group)
            .WithMany()
            .HasForeignKey(d => d.GroupId)
            .HasConstraintName("FK_5BC96BF0ED8188B0");

            builder.Property(e => e.PosterId)
            .HasColumnName("posterId")
            .HasForeignKeyColumnType();
            builder.HasOne(d => d.Poster)
            .WithMany()
            .HasForeignKey(d => d.PosterId)
            .HasConstraintName("FK_5BC96BF0581A197");
        }
        public void Configure(EntityTypeBuilder <Event> builder)
        {
            builder.ToTable("Event");

            builder.HasIndex(e => e.OrganiserId)
            .HasName("IDX_FA6F25A34BDD3C8");

            builder.HasGuidKey();

            builder.Property(e => e.Name)
            .IsRequired()
            .HasColumnName("name")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(100));

            builder.Property(e => e.Description)
            .HasColumnName("description")
            .HasUtf8ColumnType(MySqlBuilderTypes.String(4096));

            builder.Property(e => e.StartTime)
            .IsRequired()
            .HasColumnName("startTime")
            .HasColumnType(MySqlBuilderTypes.DateTime);

            builder.Property(e => e.InviteTime)
            .IsRequired()
            .HasColumnName("inviteTime")
            .HasColumnType(MySqlBuilderTypes.DateTime);

            builder.Property(e => e.EndTime)
            .IsRequired()
            .HasColumnName("endTime")
            .HasColumnType(MySqlBuilderTypes.DateTime);

            builder.Property(e => e.LastModifiedTime)
            .IsRequired()
            .HasColumnName("lastModifiedTime")
            .HasColumnType(MySqlBuilderTypes.DateTime);

            builder.Property(e => e.State)
            .IsRequired()
            .HasColumnName("state")
            .HasColumnType(MySqlBuilderTypes.Enum);

            builder.Property(e => e.OrganiserId)
            .HasColumnName("organiserId")
            .HasForeignKeyColumnType();
            builder.HasOne(d => d.Organiser)
            .WithMany()
            .HasForeignKey(d => d.OrganiserId)
            .OnDelete(DeleteBehavior.ClientSetNull)
            .HasConstraintName("FK_FA6F25A34BDD3C8");

            builder.Property(e => e.CommentGroupId)
            .HasColumnName("commentGroupId")
            .HasForeignKeyColumnType();
            builder.HasOne(d => d.CommentGroup)
            .WithMany()
            .HasForeignKey(d => d.CommentGroupId)
            .OnDelete(DeleteBehavior.ClientSetNull)
            .HasConstraintName("FK_FA6F25A34BDD4B9");
        }