Initial TafsirQuran app with Gitea CI/CD deploy to k3s.
build-and-deploy / deploy (push) Successful in 10m50s

Blazor UI + ASP.NET API + Postgres; push to main builds images and rolls out namespace tafsirquran.
This commit is contained in:
2026-10-09 21:50:37 +03:30
commit 7f06856f45
124 changed files with 4729 additions and 0 deletions
@@ -0,0 +1,395 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using TafsirQuran.Infrastructure.Persistence;
#nullable disable
namespace TafsirQuran.Infrastructure.Persistence.Migrations
{
[DbContext(typeof(AppDbContext))]
partial class AppDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.10")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("TafsirQuran.Domain.Entities.AppUser", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("DisplayName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("PasswordHash")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("Email")
.IsUnique();
b.ToTable("Users");
});
modelBuilder.Entity("TafsirQuran.Domain.Entities.Ayah", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<int>("Number")
.HasColumnType("integer");
b.Property<int>("SurahId")
.HasColumnType("integer");
b.Property<string>("TextAr")
.IsRequired()
.HasColumnType("text");
b.Property<string>("TextFa")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("SurahId", "Number")
.IsUnique();
b.ToTable("Ayahs");
});
modelBuilder.Entity("TafsirQuran.Domain.Entities.Bookmark", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("DeviceId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<Guid>("EpisodeId")
.HasColumnType("uuid");
b.Property<string>("Note")
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<Guid?>("UserId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("EpisodeId");
b.HasIndex("UserId");
b.HasIndex("DeviceId", "UserId", "EpisodeId")
.IsUnique();
b.ToTable("Bookmarks");
});
modelBuilder.Entity("TafsirQuran.Domain.Entities.Favorite", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("DeviceId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<Guid>("EpisodeId")
.HasColumnType("uuid");
b.Property<Guid?>("UserId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("EpisodeId");
b.HasIndex("UserId");
b.HasIndex("DeviceId", "UserId", "EpisodeId")
.IsUnique();
b.ToTable("Favorites");
});
modelBuilder.Entity("TafsirQuran.Domain.Entities.ListeningProgress", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("DeviceId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<Guid>("EpisodeId")
.HasColumnType("uuid");
b.Property<double>("PositionSeconds")
.HasColumnType("double precision");
b.Property<DateTimeOffset>("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property<Guid?>("UserId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("EpisodeId");
b.HasIndex("UserId");
b.HasIndex("DeviceId", "UserId");
b.ToTable("ListeningProgresses");
});
modelBuilder.Entity("TafsirQuran.Domain.Entities.Surah", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("NameAr")
.IsRequired()
.HasMaxLength(80)
.HasColumnType("character varying(80)");
b.Property<string>("NameFa")
.IsRequired()
.HasMaxLength(80)
.HasColumnType("character varying(80)");
b.Property<int>("Number")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("Number")
.IsUnique();
b.ToTable("Surahs");
});
modelBuilder.Entity("TafsirQuran.Domain.Entities.Tafsir", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Author")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<string>("CoverUrl")
.HasColumnType("text");
b.Property<bool>("IsPublished")
.HasColumnType("boolean");
b.Property<string>("Slug")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.HasKey("Id");
b.HasIndex("Slug")
.IsUnique();
b.ToTable("Tafsirs");
});
modelBuilder.Entity("TafsirQuran.Domain.Entities.TafsirEpisode", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("AudioUrl")
.IsRequired()
.HasColumnType("text");
b.Property<int>("AyahNumber")
.HasColumnType("integer");
b.Property<int>("DurationSeconds")
.HasColumnType("integer");
b.Property<int>("SortOrder")
.HasColumnType("integer");
b.Property<string>("Summary")
.HasColumnType("text");
b.Property<int>("SurahId")
.HasColumnType("integer");
b.Property<Guid>("TafsirId")
.HasColumnType("uuid");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(300)
.HasColumnType("character varying(300)");
b.HasKey("Id");
b.HasIndex("SurahId");
b.HasIndex("TafsirId", "SortOrder");
b.ToTable("Episodes");
});
modelBuilder.Entity("TafsirQuran.Domain.Entities.Ayah", b =>
{
b.HasOne("TafsirQuran.Domain.Entities.Surah", "Surah")
.WithMany("Ayahs")
.HasForeignKey("SurahId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Surah");
});
modelBuilder.Entity("TafsirQuran.Domain.Entities.Bookmark", b =>
{
b.HasOne("TafsirQuran.Domain.Entities.TafsirEpisode", "Episode")
.WithMany()
.HasForeignKey("EpisodeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("TafsirQuran.Domain.Entities.AppUser", "User")
.WithMany("Bookmarks")
.HasForeignKey("UserId");
b.Navigation("Episode");
b.Navigation("User");
});
modelBuilder.Entity("TafsirQuran.Domain.Entities.Favorite", b =>
{
b.HasOne("TafsirQuran.Domain.Entities.TafsirEpisode", "Episode")
.WithMany()
.HasForeignKey("EpisodeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("TafsirQuran.Domain.Entities.AppUser", "User")
.WithMany("Favorites")
.HasForeignKey("UserId");
b.Navigation("Episode");
b.Navigation("User");
});
modelBuilder.Entity("TafsirQuran.Domain.Entities.ListeningProgress", b =>
{
b.HasOne("TafsirQuran.Domain.Entities.TafsirEpisode", "Episode")
.WithMany()
.HasForeignKey("EpisodeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("TafsirQuran.Domain.Entities.AppUser", "User")
.WithMany("ListeningProgresses")
.HasForeignKey("UserId");
b.Navigation("Episode");
b.Navigation("User");
});
modelBuilder.Entity("TafsirQuran.Domain.Entities.TafsirEpisode", b =>
{
b.HasOne("TafsirQuran.Domain.Entities.Surah", "Surah")
.WithMany("Episodes")
.HasForeignKey("SurahId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("TafsirQuran.Domain.Entities.Tafsir", "Tafsir")
.WithMany("Episodes")
.HasForeignKey("TafsirId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Surah");
b.Navigation("Tafsir");
});
modelBuilder.Entity("TafsirQuran.Domain.Entities.AppUser", b =>
{
b.Navigation("Bookmarks");
b.Navigation("Favorites");
b.Navigation("ListeningProgresses");
});
modelBuilder.Entity("TafsirQuran.Domain.Entities.Surah", b =>
{
b.Navigation("Ayahs");
b.Navigation("Episodes");
});
modelBuilder.Entity("TafsirQuran.Domain.Entities.Tafsir", b =>
{
b.Navigation("Episodes");
});
#pragma warning restore 612, 618
}
}
}