The ASP.NET Core solution (mws.api/mws.application/mws.domain/ mws.infrastructure) existed only as untracked working files. Adding it to version control, plus a .gitignore for build output and local tooling directories, so the CQRS/mediator refactor plan has a real git history to branch and diff against.
366 lines
12 KiB
C#
366 lines
12 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Mws.Infrastructure.Persistence;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace Mws.Infrastructure.Migrations
|
|
{
|
|
[DbContext(typeof(AppDbContext))]
|
|
[Migration("20260812124332_AddMemberDocumentPermissions")]
|
|
partial class AddMemberDocumentPermissions
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "10.0.10")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Mws.Domain.Documents.Document", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Content")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid?>("ParentId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("ProjectId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasMaxLength(300)
|
|
.HasColumnType("character varying(300)");
|
|
|
|
b.Property<string>("Type")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("character varying(20)");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid?>("UpdatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ParentId");
|
|
|
|
b.HasIndex("ProjectId", "ParentId");
|
|
|
|
b.ToTable("documents", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Mws.Domain.Projects.Project", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Description")
|
|
.HasMaxLength(2000)
|
|
.HasColumnType("character varying(2000)");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("character varying(200)");
|
|
|
|
b.Property<string>("Status")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("character varying(20)");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("projects", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Mws.Domain.Projects.ProjectMember", b =>
|
|
{
|
|
b.Property<Guid>("ProjectId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("CanCreateDocuments")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("CanDeleteDocuments")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("CanEditDocuments")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("CanViewDocuments")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("Role")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("character varying(20)");
|
|
|
|
b.HasKey("ProjectId", "UserId");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("project_members", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Mws.Domain.Roles.Role", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<bool>("IsSystem")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("character varying(100)");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("roles", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Mws.Domain.Roles.RolePermission", b =>
|
|
{
|
|
b.Property<Guid>("RoleId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Screen")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("character varying(50)");
|
|
|
|
b.Property<bool>("CanCreate")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("CanDelete")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("CanEdit")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("CanView")
|
|
.HasColumnType("boolean");
|
|
|
|
b.HasKey("RoleId", "Screen");
|
|
|
|
b.ToTable("role_permissions", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Mws.Domain.Tasks.TaskItem", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid?>("AssigneeId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime?>("DueDate")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Priority")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("character varying(20)");
|
|
|
|
b.Property<Guid>("ProjectId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Status")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("character varying(20)");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasMaxLength(300)
|
|
.HasColumnType("character varying(300)");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AssigneeId");
|
|
|
|
b.HasIndex("ProjectId");
|
|
|
|
b.HasIndex("Status");
|
|
|
|
b.ToTable("tasks", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Mws.Domain.Users.User", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("DisplayName")
|
|
.IsRequired()
|
|
.HasMaxLength(150)
|
|
.HasColumnType("character varying(150)");
|
|
|
|
b.Property<bool>("IsActive")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("character varying(200)");
|
|
|
|
b.Property<Guid>("RoleId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Username")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("character varying(100)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.HasIndex("Username")
|
|
.IsUnique();
|
|
|
|
b.ToTable("users", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Mws.Domain.Documents.Document", b =>
|
|
{
|
|
b.HasOne("Mws.Domain.Documents.Document", "Parent")
|
|
.WithMany("Children")
|
|
.HasForeignKey("ParentId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Parent");
|
|
});
|
|
|
|
modelBuilder.Entity("Mws.Domain.Projects.ProjectMember", b =>
|
|
{
|
|
b.HasOne("Mws.Domain.Projects.Project", "Project")
|
|
.WithMany("Members")
|
|
.HasForeignKey("ProjectId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Mws.Domain.Users.User", "User")
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Project");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("Mws.Domain.Roles.RolePermission", b =>
|
|
{
|
|
b.HasOne("Mws.Domain.Roles.Role", "Role")
|
|
.WithMany("Permissions")
|
|
.HasForeignKey("RoleId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Role");
|
|
});
|
|
|
|
modelBuilder.Entity("Mws.Domain.Tasks.TaskItem", b =>
|
|
{
|
|
b.HasOne("Mws.Domain.Users.User", "Assignee")
|
|
.WithMany()
|
|
.HasForeignKey("AssigneeId")
|
|
.OnDelete(DeleteBehavior.SetNull);
|
|
|
|
b.Navigation("Assignee");
|
|
});
|
|
|
|
modelBuilder.Entity("Mws.Domain.Users.User", b =>
|
|
{
|
|
b.HasOne("Mws.Domain.Roles.Role", "Role")
|
|
.WithMany()
|
|
.HasForeignKey("RoleId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Role");
|
|
});
|
|
|
|
modelBuilder.Entity("Mws.Domain.Documents.Document", b =>
|
|
{
|
|
b.Navigation("Children");
|
|
});
|
|
|
|
modelBuilder.Entity("Mws.Domain.Projects.Project", b =>
|
|
{
|
|
b.Navigation("Members");
|
|
});
|
|
|
|
modelBuilder.Entity("Mws.Domain.Roles.Role", b =>
|
|
{
|
|
b.Navigation("Permissions");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|