seedPermiision for subAcount
This commit is contained in:
@@ -26,6 +26,7 @@ using AccountManagement.Domain.SubAccountPermissionSubtitle2Agg;
|
||||
using AccountManagement.Domain.SubAccountPermissionSubtitle3Agg;
|
||||
using AccountManagement.Domain.SubAccountPermissionSubtitle4Agg;
|
||||
using AccountManagement.Domain.SubAccountRoleAgg;
|
||||
using AccountMangement.Infrastructure.EFCore.Seed;
|
||||
|
||||
namespace AccountMangement.Infrastructure.EFCore
|
||||
{
|
||||
@@ -76,7 +77,8 @@ namespace AccountMangement.Infrastructure.EFCore
|
||||
{
|
||||
var assembly = typeof(AccountMapping).Assembly;
|
||||
modelBuilder.ApplyConfigurationsFromAssembly(assembly);
|
||||
base.OnModelCreating(modelBuilder);
|
||||
SubAccountPermissionSeeder.Seed(modelBuilder);
|
||||
base.OnModelCreating(modelBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
|
||||
@@ -8,11 +8,10 @@ namespace AccountMangement.Infrastructure.EFCore.Mappings
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<SubAccountPermissionSubtitle1> builder)
|
||||
{
|
||||
builder.HasKey(x => x.id);
|
||||
builder.HasKey(x => x.id);
|
||||
builder.ToTable("SubAccountPermissionSubtitle1");
|
||||
builder.Property(x => x.Code).HasMaxLength(15).IsRequired();
|
||||
builder.Property(x => x.Code).HasMaxLength(15).IsRequired();
|
||||
builder.Property(x => x.Title).HasMaxLength(50).IsRequired();
|
||||
|
||||
builder.HasMany(x => x.Children).WithOne(x => x.Parent).HasForeignKey(x => x.ParentId);
|
||||
}
|
||||
}
|
||||
|
||||
1737
AccountMangement.Infrastructure.EFCore/Migrations/20250104133725_SeedPermission.Designer.cs
generated
Normal file
1737
AccountMangement.Infrastructure.EFCore/Migrations/20250104133725_SeedPermission.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,408 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
||||
|
||||
namespace AccountMangement.Infrastructure.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class SeedPermission : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.InsertData(
|
||||
table: "SubAccountPermissionSubtitle1",
|
||||
columns: new[] { "id", "Code", "CreationDate", "Title" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 102L, 102, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2250), "عملیات کارگاه" },
|
||||
{ 103L, 103, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2262), "عملیات پرسنل" },
|
||||
{ 104L, 104, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2263), "فیش حقوقی غیر رسمی" },
|
||||
{ 106L, 106, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2265), "حضور و غیاب" },
|
||||
{ 110L, 110, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2267), "کارپوشه" },
|
||||
{ 111L, 111, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2268), "صورت حساب های مالی" },
|
||||
{ 112L, 112, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2268), "مدیریت کاربران" },
|
||||
{ 113L, 113, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2264), "گزارشات" }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
columns: new[] { "id", "Code", "CreationDate", "ParentId", "Title" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 10201L, 10201, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2358), 102L, "لیست قرارداد" },
|
||||
{ 10202L, 10202, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2361), 102L, "لیست فیش حقوقی" },
|
||||
{ 10203L, 10203, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2363), 102L, "لیست بیمه" },
|
||||
{ 10204L, 10204, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2365), 102L, "گزارش وضعیت پرسنل به صورت گروهی" },
|
||||
{ 10205L, 10205, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2366), 102L, "گزارش وضعیت پرسنل به صورت انفرادی" },
|
||||
{ 10206L, 10206, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2368), 102L, "لیست کل پرسنل" },
|
||||
{ 10301L, 10301, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2370), 103L, "ثبت مرخصی" },
|
||||
{ 10302L, 10302, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2372), 103L, "لیست کل مرخصی" },
|
||||
{ 10303L, 10303, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2374), 103L, "عملیات مدارک پرسنل" },
|
||||
{ 10304L, 10304, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2377), 103L, "عملیات پرداخت حقوق پرسنل" },
|
||||
{ 10305L, 10305, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2378), 103L, "عملیات وام" },
|
||||
{ 10306L, 10306, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2380), 103L, "عملیات پاداش" },
|
||||
{ 10307L, 10307, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2382), 103L, "عملیات مساعده" },
|
||||
{ 10308L, 10308, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2383), 103L, "عملیات جرایم" },
|
||||
{ 10402L, 10402, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2385), 104L, "تنظیم گروه بندی و حقوق پرسنل" },
|
||||
{ 10403L, 10403, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2387), 104L, "لیست فیش حقوقی موقت" },
|
||||
{ 10404L, 10404, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2388), 104L, "لیست فیش حقوقی نهایی" },
|
||||
{ 10601L, 10601, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2394), 106L, "ارتقا یا تغییر سرویس حضور غیاب" },
|
||||
{ 10602L, 10602, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2395), 106L, "آپلود عکس پرسنل" },
|
||||
{ 10603L, 10603, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2400), 106L, "حضور و غیاب جاری" },
|
||||
{ 10604L, 10604, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2398), 106L, "سوابق حضور و غیاب" },
|
||||
{ 10605L, 10605, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2401), 106L, "عملیات گروهبندی" },
|
||||
{ 10606L, 10606, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2404), 106L, "تنظیم ساعت فعالیت مجموعه" },
|
||||
{ 10607L, 10607, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2406), 106L, "تنظیمات حساب کاربری دوربین" },
|
||||
{ 11001L, 11001, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2408), 110L, "حضور و غیاب کارپوشه" },
|
||||
{ 11002L, 11002, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2411), 110L, "قرارداد و فیش حقوقی کارپوشه" },
|
||||
{ 11003L, 11003, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2413), 110L, "بیمه کارپوشه" },
|
||||
{ 11301L, 11301, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2391), 113L, "گزارشات تجمیع حقوق پرسنل" }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
columns: new[] { "id", "Code", "CreationDate", "ParentId", "Title" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 1030501L, 1030501, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2701), 10305L, "ایجاد وام" },
|
||||
{ 1030502L, 1030502, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2706), 10305L, "ویرایش وام" },
|
||||
{ 1030503L, 1030503, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2710), 10305L, "حذف وام" },
|
||||
{ 1030601L, 1030601, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2713), 10306L, "ایجاد پاداش" },
|
||||
{ 1030602L, 1030602, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2716), 10306L, "ویرایش پاداش" },
|
||||
{ 1030603L, 1030603, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2748), 10306L, "حذف پاداش" },
|
||||
{ 1030701L, 1030701, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2751), 10307L, "ایجاد مساعده" },
|
||||
{ 1030702L, 1030702, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2755), 10307L, "ویرایش مساعده" },
|
||||
{ 1030703L, 1030703, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2759), 10307L, "حذف مساعده" },
|
||||
{ 1030801L, 1030801, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2763), 10308L, "ایجاد جریمه" },
|
||||
{ 1030802L, 1030802, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2766), 10308L, "ایجاد عنوان جریمه" },
|
||||
{ 1030803L, 1030803, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2770), 10308L, "ویرایش جریمه" },
|
||||
{ 1030804L, 1030804, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2773), 10308L, "حذف جریمه" },
|
||||
{ 1040201L, 1040201, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2799), 10402L, "تنظیمات محاسبه فیش حقوقی" },
|
||||
{ 1040301L, 1040301, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2776), 10403L, "ایجاد فیش حقوقی غیر رسمی موقت" },
|
||||
{ 1040302L, 1040302, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2780), 10403L, "پرینت فیش حقوقی غیر رسمی موقت" },
|
||||
{ 1040303L, 1040303, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2784), 10403L, "حذف فیش حقوقی غیر رسمی موقت" },
|
||||
{ 1040401L, 1040401, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2788), 10404L, "ایجاد فیش حقوقی غیر رسمی نهایی" },
|
||||
{ 1040402L, 1040402, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2792), 10404L, "پرینت فیش حقوقی غیر رسمی نهایی" },
|
||||
{ 1040403L, 1040403, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2796), 10404L, "حذف فیش حقوقی غیر رسمی نهایی" },
|
||||
{ 1060201L, 1060201, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2804), 10602L, "ویرایش عکس پرسنل" },
|
||||
{ 1060202L, 1060202, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2808), 10602L, "فعال و غیر فعال کردن پرسنل" },
|
||||
{ 1060203L, 1060203, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2812), 10602L, "ویرایش نام مستعار" },
|
||||
{ 1060401L, 1060401, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2816), 10604L, "ویرایش و افزودن سوابق حضور و غیاب" },
|
||||
{ 1060402L, 1060402, new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2821), 10604L, "حذف سوابق حضور و غیاب" }
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle1",
|
||||
keyColumn: "id",
|
||||
keyValue: 111L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle1",
|
||||
keyColumn: "id",
|
||||
keyValue: 112L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10201L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10202L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10203L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10204L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10205L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10206L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10301L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10302L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10303L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10304L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10601L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10603L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10605L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10606L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10607L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 11001L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 11002L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 11003L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 11301L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1030501L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1030502L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1030503L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1030601L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1030602L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1030603L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1030701L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1030702L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1030703L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1030801L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1030802L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1030803L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1030804L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1040201L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1040301L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1040302L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1040303L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1040401L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1040402L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1040403L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1060201L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1060202L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1060203L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1060401L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle3",
|
||||
keyColumn: "id",
|
||||
keyValue: 1060402L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle1",
|
||||
keyColumn: "id",
|
||||
keyValue: 102L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle1",
|
||||
keyColumn: "id",
|
||||
keyValue: 110L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle1",
|
||||
keyColumn: "id",
|
||||
keyValue: 113L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10305L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10306L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10307L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10308L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10402L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10403L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10404L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10602L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle2",
|
||||
keyColumn: "id",
|
||||
keyValue: 10604L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle1",
|
||||
keyColumn: "id",
|
||||
keyValue: 103L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle1",
|
||||
keyColumn: "id",
|
||||
keyValue: 104L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SubAccountPermissionSubtitle1",
|
||||
keyColumn: "id",
|
||||
keyValue: 106L);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -472,6 +472,64 @@ namespace AccountMangement.Infrastructure.EFCore.Migrations
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("SubAccountPermissionSubtitle1", (string)null);
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
id = 102L,
|
||||
Code = 102,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2250),
|
||||
Title = "عملیات کارگاه"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 103L,
|
||||
Code = 103,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2262),
|
||||
Title = "عملیات پرسنل"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 104L,
|
||||
Code = 104,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2263),
|
||||
Title = "فیش حقوقی غیر رسمی"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 113L,
|
||||
Code = 113,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2264),
|
||||
Title = "گزارشات"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 106L,
|
||||
Code = 106,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2265),
|
||||
Title = "حضور و غیاب"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 110L,
|
||||
Code = 110,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2267),
|
||||
Title = "کارپوشه"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 111L,
|
||||
Code = 111,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2268),
|
||||
Title = "صورت حساب های مالی"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 112L,
|
||||
Code = 112,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2268),
|
||||
Title = "مدیریت کاربران"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.SubAccountPermissionSubtitle2Agg.SubAccountPermissionSubtitle2", b =>
|
||||
@@ -502,6 +560,232 @@ namespace AccountMangement.Infrastructure.EFCore.Migrations
|
||||
b.HasIndex("ParentId");
|
||||
|
||||
b.ToTable("SubAccountPermissionSubtitle2", (string)null);
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
id = 10201L,
|
||||
Code = 10201,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2358),
|
||||
ParentId = 102L,
|
||||
Title = "لیست قرارداد"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10202L,
|
||||
Code = 10202,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2361),
|
||||
ParentId = 102L,
|
||||
Title = "لیست فیش حقوقی"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10203L,
|
||||
Code = 10203,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2363),
|
||||
ParentId = 102L,
|
||||
Title = "لیست بیمه"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10204L,
|
||||
Code = 10204,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2365),
|
||||
ParentId = 102L,
|
||||
Title = "گزارش وضعیت پرسنل به صورت گروهی"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10205L,
|
||||
Code = 10205,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2366),
|
||||
ParentId = 102L,
|
||||
Title = "گزارش وضعیت پرسنل به صورت انفرادی"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10206L,
|
||||
Code = 10206,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2368),
|
||||
ParentId = 102L,
|
||||
Title = "لیست کل پرسنل"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10301L,
|
||||
Code = 10301,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2370),
|
||||
ParentId = 103L,
|
||||
Title = "ثبت مرخصی"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10302L,
|
||||
Code = 10302,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2372),
|
||||
ParentId = 103L,
|
||||
Title = "لیست کل مرخصی"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10303L,
|
||||
Code = 10303,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2374),
|
||||
ParentId = 103L,
|
||||
Title = "عملیات مدارک پرسنل"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10304L,
|
||||
Code = 10304,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2377),
|
||||
ParentId = 103L,
|
||||
Title = "عملیات پرداخت حقوق پرسنل"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10305L,
|
||||
Code = 10305,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2378),
|
||||
ParentId = 103L,
|
||||
Title = "عملیات وام"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10306L,
|
||||
Code = 10306,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2380),
|
||||
ParentId = 103L,
|
||||
Title = "عملیات پاداش"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10307L,
|
||||
Code = 10307,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2382),
|
||||
ParentId = 103L,
|
||||
Title = "عملیات مساعده"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10308L,
|
||||
Code = 10308,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2383),
|
||||
ParentId = 103L,
|
||||
Title = "عملیات جرایم"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10402L,
|
||||
Code = 10402,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2385),
|
||||
ParentId = 104L,
|
||||
Title = "تنظیم گروه بندی و حقوق پرسنل"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10403L,
|
||||
Code = 10403,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2387),
|
||||
ParentId = 104L,
|
||||
Title = "لیست فیش حقوقی موقت"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10404L,
|
||||
Code = 10404,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2388),
|
||||
ParentId = 104L,
|
||||
Title = "لیست فیش حقوقی نهایی"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 11301L,
|
||||
Code = 11301,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2391),
|
||||
ParentId = 113L,
|
||||
Title = "گزارشات تجمیع حقوق پرسنل"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10601L,
|
||||
Code = 10601,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2394),
|
||||
ParentId = 106L,
|
||||
Title = "ارتقا یا تغییر سرویس حضور غیاب"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10602L,
|
||||
Code = 10602,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2395),
|
||||
ParentId = 106L,
|
||||
Title = "آپلود عکس پرسنل"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10604L,
|
||||
Code = 10604,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2398),
|
||||
ParentId = 106L,
|
||||
Title = "سوابق حضور و غیاب"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10603L,
|
||||
Code = 10603,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2400),
|
||||
ParentId = 106L,
|
||||
Title = "حضور و غیاب جاری"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10605L,
|
||||
Code = 10605,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2401),
|
||||
ParentId = 106L,
|
||||
Title = "عملیات گروهبندی"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10606L,
|
||||
Code = 10606,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2404),
|
||||
ParentId = 106L,
|
||||
Title = "تنظیم ساعت فعالیت مجموعه"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 10607L,
|
||||
Code = 10607,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2406),
|
||||
ParentId = 106L,
|
||||
Title = "تنظیمات حساب کاربری دوربین"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 11001L,
|
||||
Code = 11001,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2408),
|
||||
ParentId = 110L,
|
||||
Title = "حضور و غیاب کارپوشه"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 11002L,
|
||||
Code = 11002,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2411),
|
||||
ParentId = 110L,
|
||||
Title = "قرارداد و فیش حقوقی کارپوشه"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 11003L,
|
||||
Code = 11003,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2413),
|
||||
ParentId = 110L,
|
||||
Title = "بیمه کارپوشه"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.SubAccountPermissionSubtitle3Agg.SubAccountPermissionSubtitle3", b =>
|
||||
@@ -532,6 +816,208 @@ namespace AccountMangement.Infrastructure.EFCore.Migrations
|
||||
b.HasIndex("ParentId");
|
||||
|
||||
b.ToTable("SubAccountPermissionSubtitle3", (string)null);
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
id = 1030501L,
|
||||
Code = 1030501,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2701),
|
||||
ParentId = 10305L,
|
||||
Title = "ایجاد وام"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1030502L,
|
||||
Code = 1030502,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2706),
|
||||
ParentId = 10305L,
|
||||
Title = "ویرایش وام"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1030503L,
|
||||
Code = 1030503,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2710),
|
||||
ParentId = 10305L,
|
||||
Title = "حذف وام"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1030601L,
|
||||
Code = 1030601,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2713),
|
||||
ParentId = 10306L,
|
||||
Title = "ایجاد پاداش"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1030602L,
|
||||
Code = 1030602,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2716),
|
||||
ParentId = 10306L,
|
||||
Title = "ویرایش پاداش"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1030603L,
|
||||
Code = 1030603,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2748),
|
||||
ParentId = 10306L,
|
||||
Title = "حذف پاداش"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1030701L,
|
||||
Code = 1030701,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2751),
|
||||
ParentId = 10307L,
|
||||
Title = "ایجاد مساعده"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1030702L,
|
||||
Code = 1030702,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2755),
|
||||
ParentId = 10307L,
|
||||
Title = "ویرایش مساعده"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1030703L,
|
||||
Code = 1030703,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2759),
|
||||
ParentId = 10307L,
|
||||
Title = "حذف مساعده"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1030801L,
|
||||
Code = 1030801,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2763),
|
||||
ParentId = 10308L,
|
||||
Title = "ایجاد جریمه"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1030802L,
|
||||
Code = 1030802,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2766),
|
||||
ParentId = 10308L,
|
||||
Title = "ایجاد عنوان جریمه"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1030803L,
|
||||
Code = 1030803,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2770),
|
||||
ParentId = 10308L,
|
||||
Title = "ویرایش جریمه"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1030804L,
|
||||
Code = 1030804,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2773),
|
||||
ParentId = 10308L,
|
||||
Title = "حذف جریمه"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1040301L,
|
||||
Code = 1040301,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2776),
|
||||
ParentId = 10403L,
|
||||
Title = "ایجاد فیش حقوقی غیر رسمی موقت"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1040302L,
|
||||
Code = 1040302,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2780),
|
||||
ParentId = 10403L,
|
||||
Title = "پرینت فیش حقوقی غیر رسمی موقت"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1040303L,
|
||||
Code = 1040303,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2784),
|
||||
ParentId = 10403L,
|
||||
Title = "حذف فیش حقوقی غیر رسمی موقت"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1040401L,
|
||||
Code = 1040401,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2788),
|
||||
ParentId = 10404L,
|
||||
Title = "ایجاد فیش حقوقی غیر رسمی نهایی"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1040402L,
|
||||
Code = 1040402,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2792),
|
||||
ParentId = 10404L,
|
||||
Title = "پرینت فیش حقوقی غیر رسمی نهایی"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1040403L,
|
||||
Code = 1040403,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2796),
|
||||
ParentId = 10404L,
|
||||
Title = "حذف فیش حقوقی غیر رسمی نهایی"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1040201L,
|
||||
Code = 1040201,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2799),
|
||||
ParentId = 10402L,
|
||||
Title = "تنظیمات محاسبه فیش حقوقی"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1060201L,
|
||||
Code = 1060201,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2804),
|
||||
ParentId = 10602L,
|
||||
Title = "ویرایش عکس پرسنل"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1060202L,
|
||||
Code = 1060202,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2808),
|
||||
ParentId = 10602L,
|
||||
Title = "فعال و غیر فعال کردن پرسنل"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1060203L,
|
||||
Code = 1060203,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2812),
|
||||
ParentId = 10602L,
|
||||
Title = "ویرایش نام مستعار"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1060401L,
|
||||
Code = 1060401,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2816),
|
||||
ParentId = 10604L,
|
||||
Title = "ویرایش و افزودن سوابق حضور و غیاب"
|
||||
},
|
||||
new
|
||||
{
|
||||
id = 1060402L,
|
||||
Code = 1060402,
|
||||
CreationDate = new DateTime(2025, 1, 4, 17, 7, 24, 472, DateTimeKind.Local).AddTicks(2821),
|
||||
ParentId = 10604L,
|
||||
Title = "حذف سوابق حضور و غیاب"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.SubAccountPermissionSubtitle4Agg.SubAccountPermissionSubtitle4", b =>
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
|
||||
using _0_Framework.InfraStructure;
|
||||
using AccountManagement.Application.Contracts.SubAccountPermissionSubtitle;
|
||||
using AccountManagement.Domain.SubAccountAgg;
|
||||
using AccountManagement.Domain.SubAccountPermissionSubtitle1Agg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using AccountManagement.Domain.SubAccountAgg;
|
||||
|
||||
namespace AccountMangement.Infrastructure.EFCore.Repository
|
||||
{
|
||||
public class SubAccountPermissionSubtitle1Repository : RepositoryBase<long, SubAccountPermissionSubtitle1>,
|
||||
ISubAccountPermissionSubtitle1Repository
|
||||
{
|
||||
private readonly AccountContext _context;
|
||||
public class SubAccountPermissionSubtitle1Repository : RepositoryBase<long, SubAccountPermissionSubtitle1>,
|
||||
ISubAccountPermissionSubtitle1Repository
|
||||
{
|
||||
private readonly AccountContext _context;
|
||||
|
||||
public SubAccountPermissionSubtitle1Repository(AccountContext context) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public SubAccountPermissionSubtitle1Repository(AccountContext context) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public List<SubAccountPermissionSubtitleViewModel> GetAllWithChildren()
|
||||
{
|
||||
public List<SubAccountPermissionSubtitleViewModel> GetAllWithChildren()
|
||||
{
|
||||
return _context.SubAccountPermissionSubtitle1Collection.Include(x => x.Children)
|
||||
.ThenInclude(x => x.Children)
|
||||
.ThenInclude(x => x.Children).AsSplitQuery().Select(x => new SubAccountPermissionSubtitleViewModel
|
||||
@@ -52,26 +52,26 @@ namespace AccountMangement.Infrastructure.EFCore.Repository
|
||||
|
||||
}
|
||||
|
||||
public List<int> GetAllPermissionCodes()
|
||||
{
|
||||
var data = GetAllWithChildren();
|
||||
return Flatten(data);
|
||||
public List<int> GetAllPermissionCodes()
|
||||
{
|
||||
var data = GetAllWithChildren();
|
||||
return Flatten(data);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public List<int> Flatten(List<SubAccountPermissionSubtitleViewModel> hierarchy)
|
||||
{
|
||||
var flatList = new List<int>();
|
||||
foreach (var item in hierarchy)
|
||||
{
|
||||
flatList.Add(item.Code);
|
||||
if (item.Children != null && item.Children.Any())
|
||||
{
|
||||
flatList.AddRange(Flatten(item.Children.ToList()));
|
||||
}
|
||||
}
|
||||
public List<int> Flatten(List<SubAccountPermissionSubtitleViewModel> hierarchy)
|
||||
{
|
||||
var flatList = new List<int>();
|
||||
foreach (var item in hierarchy)
|
||||
{
|
||||
flatList.Add(item.Code);
|
||||
if (item.Children != null && item.Children.Any())
|
||||
{
|
||||
flatList.AddRange(Flatten(item.Children.ToList()));
|
||||
}
|
||||
}
|
||||
|
||||
return flatList;
|
||||
}
|
||||
}
|
||||
return flatList;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
using _0_Framework.Application;
|
||||
using AccountManagement.Domain.SubAccountPermissionSubtitle1Agg;
|
||||
using AccountManagement.Domain.SubAccountPermissionSubtitle2Agg;
|
||||
using AccountManagement.Domain.SubAccountPermissionSubtitle3Agg;
|
||||
using AccountManagement.Domain.SubAccountPermissionSubtitle4Agg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace AccountMangement.Infrastructure.EFCore.Seed
|
||||
{
|
||||
public static class SubAccountPermissionSeeder
|
||||
{
|
||||
public static void Seed(ModelBuilder builder)
|
||||
{
|
||||
|
||||
|
||||
PropertyInfo[] properties = typeof(SubAccountPermissionHelper).GetProperties(BindingFlags.Static | BindingFlags.Public);
|
||||
var permissionsList = properties
|
||||
.Where(x => x.PropertyType == typeof(SubAccountPermissionDto)).Select(x => (SubAccountPermissionDto)x.GetValue(null)).ToList();
|
||||
|
||||
List<SubAccountPermissionSubtitle1> result1 = permissionsList.Where(x => x.ParentId == 0)
|
||||
.Select(x => new SubAccountPermissionSubtitle1(x.Name, x.Code) { id = x.Id }).ToList();
|
||||
|
||||
|
||||
List<SubAccountPermissionSubtitle2> result2 = permissionsList.Where(x => result1.Any(y => y.id == x.ParentId))
|
||||
.Select(x => new SubAccountPermissionSubtitle2(x.Name, x.Code, x.ParentId) { id = x.Id }).ToList();
|
||||
|
||||
|
||||
List<SubAccountPermissionSubtitle3> result3 = permissionsList.Where(x => result2.Any(y => y.id == x.ParentId))
|
||||
.Select(x => new SubAccountPermissionSubtitle3(x.Name, x.Code, x.ParentId) { id = x.Id }).ToList();
|
||||
|
||||
|
||||
List<SubAccountPermissionSubtitle4> result4 = permissionsList.Where(x => result3.Any(y => y.id == x.ParentId))
|
||||
.Select(x => new SubAccountPermissionSubtitle4(x.Name, x.Code, x.ParentId) { id = x.Id }).ToList();
|
||||
|
||||
builder.Entity<SubAccountPermissionSubtitle1>().HasData(result1);
|
||||
builder.Entity<SubAccountPermissionSubtitle2>().HasData(result2);
|
||||
builder.Entity<SubAccountPermissionSubtitle3>().HasData(result3);
|
||||
builder.Entity<SubAccountPermissionSubtitle4>().HasData(result4);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user