contact-management-system / ContactManagementAPI /Migrations /20260220171919_AddContactBankAccountsTable.Designer.cs
| // <auto-generated /> | |
| using System; | |
| using ContactManagementAPI.Data; | |
| using Microsoft.EntityFrameworkCore; | |
| using Microsoft.EntityFrameworkCore.Infrastructure; | |
| using Microsoft.EntityFrameworkCore.Metadata; | |
| using Microsoft.EntityFrameworkCore.Migrations; | |
| using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | |
| namespace ContactManagementAPI.Migrations | |
| { | |
| [] | |
| [] | |
| partial class AddContactBankAccountsTable | |
| { | |
| /// <inheritdoc /> | |
| protected override void BuildTargetModel(ModelBuilder modelBuilder) | |
| { | |
| modelBuilder | |
| .HasAnnotation("ProductVersion", "8.0.0") | |
| .HasAnnotation("Relational:MaxIdentifierLength", 128); | |
| SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); | |
| modelBuilder.Entity("ContactManagementAPI.Models.AppUser", b => | |
| { | |
| b.Property<int>("Id") | |
| .ValueGeneratedOnAdd() | |
| .HasColumnType("int"); | |
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); | |
| b.Property<DateTime>("CreatedAt") | |
| .HasColumnType("datetime2"); | |
| b.Property<string>("FullName") | |
| .HasMaxLength(200) | |
| .HasColumnType("nvarchar(200)"); | |
| b.Property<int>("GroupId") | |
| .HasColumnType("int"); | |
| b.Property<bool>("IsActive") | |
| .HasColumnType("bit"); | |
| b.Property<bool>("IsAdmin") | |
| .HasColumnType("bit"); | |
| b.Property<string>("PasswordHash") | |
| .IsRequired() | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<DateTime>("UpdatedAt") | |
| .HasColumnType("datetime2"); | |
| b.Property<string>("UserName") | |
| .IsRequired() | |
| .HasMaxLength(100) | |
| .HasColumnType("nvarchar(100)"); | |
| b.HasKey("Id"); | |
| b.HasIndex("GroupId"); | |
| b.HasIndex("UserName") | |
| .IsUnique(); | |
| b.ToTable("AppUsers"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.Contact", b => | |
| { | |
| b.Property<int>("Id") | |
| .ValueGeneratedOnAdd() | |
| .HasColumnType("int"); | |
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); | |
| b.Property<string>("AadharNumber") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("Address") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("BankAccountNumber") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("BankName") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("BranchName") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("City") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("Country") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<DateTime>("CreatedAt") | |
| .HasColumnType("datetime2"); | |
| b.Property<DateTime?>("DateOfBirth") | |
| .HasColumnType("datetime2"); | |
| b.Property<string>("DrivingLicenseNumber") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("Email") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("FirstName") | |
| .IsRequired() | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("Gender") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<int?>("GroupId") | |
| .HasColumnType("int"); | |
| b.Property<string>("IfscCode") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("LastName") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("Mobile1") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("Mobile2") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("Mobile3") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("NickName") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("OtherDetails") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("PassportNumber") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("PhotoPath") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("PostalCode") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("State") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<DateTime>("UpdatedAt") | |
| .HasColumnType("datetime2"); | |
| b.Property<string>("VotersId") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("WhatsAppNumber") | |
| .HasColumnType("nvarchar(max)"); | |
| b.HasKey("Id"); | |
| b.HasIndex("GroupId"); | |
| b.ToTable("Contacts"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.ContactBankAccount", b => | |
| { | |
| b.Property<int>("Id") | |
| .ValueGeneratedOnAdd() | |
| .HasColumnType("int"); | |
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); | |
| b.Property<string>("AccountNumber") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("BankName") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("BranchName") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<int>("ContactId") | |
| .HasColumnType("int"); | |
| b.Property<DateTime>("CreatedAt") | |
| .HasColumnType("datetime2"); | |
| b.Property<string>("IfscCode") | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<DateTime>("UpdatedAt") | |
| .HasColumnType("datetime2"); | |
| b.HasKey("Id"); | |
| b.HasIndex("ContactId"); | |
| b.ToTable("ContactBankAccounts"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.ContactDocument", b => | |
| { | |
| b.Property<int>("Id") | |
| .ValueGeneratedOnAdd() | |
| .HasColumnType("int"); | |
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); | |
| b.Property<int>("ContactId") | |
| .HasColumnType("int"); | |
| b.Property<string>("ContentType") | |
| .IsRequired() | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("DocumentPath") | |
| .IsRequired() | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("DocumentType") | |
| .IsRequired() | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("FileName") | |
| .IsRequired() | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<long>("FileSize") | |
| .HasColumnType("bigint"); | |
| b.Property<DateTime>("UploadedAt") | |
| .HasColumnType("datetime2"); | |
| b.HasKey("Id"); | |
| b.HasIndex("ContactId"); | |
| b.ToTable("ContactDocuments"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.ContactGroup", b => | |
| { | |
| b.Property<int>("Id") | |
| .ValueGeneratedOnAdd() | |
| .HasColumnType("int"); | |
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); | |
| b.Property<DateTime>("CreatedAt") | |
| .HasColumnType("datetime2"); | |
| b.Property<string>("Description") | |
| .IsRequired() | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("Name") | |
| .IsRequired() | |
| .HasColumnType("nvarchar(max)"); | |
| b.HasKey("Id"); | |
| b.ToTable("ContactGroups"); | |
| b.HasData( | |
| new | |
| { | |
| Id = 1, | |
| CreatedAt = new DateTime(2026, 2, 20, 22, 49, 18, 470, DateTimeKind.Local).AddTicks(4198), | |
| Description = "Family members", | |
| Name = "Family" | |
| }, | |
| new | |
| { | |
| Id = 2, | |
| CreatedAt = new DateTime(2026, 2, 20, 22, 49, 18, 470, DateTimeKind.Local).AddTicks(4211), | |
| Description = "Friends", | |
| Name = "Friends" | |
| }, | |
| new | |
| { | |
| Id = 3, | |
| CreatedAt = new DateTime(2026, 2, 20, 22, 49, 18, 470, DateTimeKind.Local).AddTicks(4213), | |
| Description = "Business contacts", | |
| Name = "Business" | |
| }, | |
| new | |
| { | |
| Id = 4, | |
| CreatedAt = new DateTime(2026, 2, 20, 22, 49, 18, 470, DateTimeKind.Local).AddTicks(4214), | |
| Description = "School contacts", | |
| Name = "School" | |
| }, | |
| new | |
| { | |
| Id = 5, | |
| CreatedAt = new DateTime(2026, 2, 20, 22, 49, 18, 470, DateTimeKind.Local).AddTicks(4216), | |
| Description = "Church members", | |
| Name = "Church" | |
| }, | |
| new | |
| { | |
| Id = 6, | |
| CreatedAt = new DateTime(2026, 2, 20, 22, 49, 18, 470, DateTimeKind.Local).AddTicks(4217), | |
| Description = "Other contacts", | |
| Name = "Others" | |
| }, | |
| new | |
| { | |
| Id = 7, | |
| CreatedAt = new DateTime(2026, 2, 20, 22, 49, 18, 470, DateTimeKind.Local).AddTicks(4218), | |
| Description = "College contacts", | |
| Name = "College" | |
| }, | |
| new | |
| { | |
| Id = 8, | |
| CreatedAt = new DateTime(2026, 2, 20, 22, 49, 18, 470, DateTimeKind.Local).AddTicks(4220), | |
| Description = "Alcoholics Anonymous", | |
| Name = "AA" | |
| }); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.ContactPhoto", b => | |
| { | |
| b.Property<int>("Id") | |
| .ValueGeneratedOnAdd() | |
| .HasColumnType("int"); | |
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); | |
| b.Property<int>("ContactId") | |
| .HasColumnType("int"); | |
| b.Property<string>("ContentType") | |
| .IsRequired() | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<string>("FileName") | |
| .IsRequired() | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<long>("FileSize") | |
| .HasColumnType("bigint"); | |
| b.Property<bool>("IsProfilePhoto") | |
| .HasColumnType("bit"); | |
| b.Property<string>("PhotoPath") | |
| .IsRequired() | |
| .HasColumnType("nvarchar(max)"); | |
| b.Property<DateTime>("UploadedAt") | |
| .HasColumnType("datetime2"); | |
| b.HasKey("Id"); | |
| b.HasIndex("ContactId"); | |
| b.ToTable("ContactPhotos"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.GroupRight", b => | |
| { | |
| b.Property<int>("Id") | |
| .ValueGeneratedOnAdd() | |
| .HasColumnType("int"); | |
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); | |
| b.Property<bool>("IsGranted") | |
| .HasColumnType("bit"); | |
| b.Property<string>("RightKey") | |
| .IsRequired() | |
| .HasMaxLength(100) | |
| .HasColumnType("nvarchar(100)"); | |
| b.Property<int>("UserGroupId") | |
| .HasColumnType("int"); | |
| b.HasKey("Id"); | |
| b.HasIndex("UserGroupId", "RightKey") | |
| .IsUnique(); | |
| b.ToTable("GroupRights"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.UserGroup", b => | |
| { | |
| b.Property<int>("Id") | |
| .ValueGeneratedOnAdd() | |
| .HasColumnType("int"); | |
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); | |
| b.Property<DateTime>("CreatedAt") | |
| .HasColumnType("datetime2"); | |
| b.Property<string>("Description") | |
| .HasMaxLength(500) | |
| .HasColumnType("nvarchar(500)"); | |
| b.Property<string>("Name") | |
| .IsRequired() | |
| .HasMaxLength(150) | |
| .HasColumnType("nvarchar(150)"); | |
| b.HasKey("Id"); | |
| b.HasIndex("Name") | |
| .IsUnique(); | |
| b.ToTable("UserGroups"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.UserRight", b => | |
| { | |
| b.Property<int>("Id") | |
| .ValueGeneratedOnAdd() | |
| .HasColumnType("int"); | |
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); | |
| b.Property<int>("AppUserId") | |
| .HasColumnType("int"); | |
| b.Property<bool>("IsGranted") | |
| .HasColumnType("bit"); | |
| b.Property<string>("RightKey") | |
| .IsRequired() | |
| .HasMaxLength(100) | |
| .HasColumnType("nvarchar(100)"); | |
| b.HasKey("Id"); | |
| b.HasIndex("AppUserId", "RightKey") | |
| .IsUnique(); | |
| b.ToTable("UserRights"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.AppUser", b => | |
| { | |
| b.HasOne("ContactManagementAPI.Models.UserGroup", "Group") | |
| .WithMany("Users") | |
| .HasForeignKey("GroupId") | |
| .OnDelete(DeleteBehavior.SetNull) | |
| .IsRequired(); | |
| b.Navigation("Group"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.Contact", b => | |
| { | |
| b.HasOne("ContactManagementAPI.Models.ContactGroup", "Group") | |
| .WithMany("Contacts") | |
| .HasForeignKey("GroupId") | |
| .OnDelete(DeleteBehavior.SetNull); | |
| b.Navigation("Group"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.ContactBankAccount", b => | |
| { | |
| b.HasOne("ContactManagementAPI.Models.Contact", "Contact") | |
| .WithMany("BankAccounts") | |
| .HasForeignKey("ContactId") | |
| .OnDelete(DeleteBehavior.Cascade) | |
| .IsRequired(); | |
| b.Navigation("Contact"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.ContactDocument", b => | |
| { | |
| b.HasOne("ContactManagementAPI.Models.Contact", "Contact") | |
| .WithMany("Documents") | |
| .HasForeignKey("ContactId") | |
| .OnDelete(DeleteBehavior.Cascade) | |
| .IsRequired(); | |
| b.Navigation("Contact"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.ContactPhoto", b => | |
| { | |
| b.HasOne("ContactManagementAPI.Models.Contact", "Contact") | |
| .WithMany("Photos") | |
| .HasForeignKey("ContactId") | |
| .OnDelete(DeleteBehavior.Cascade) | |
| .IsRequired(); | |
| b.Navigation("Contact"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.GroupRight", b => | |
| { | |
| b.HasOne("ContactManagementAPI.Models.UserGroup", "UserGroup") | |
| .WithMany("GroupRights") | |
| .HasForeignKey("UserGroupId") | |
| .OnDelete(DeleteBehavior.Cascade) | |
| .IsRequired(); | |
| b.Navigation("UserGroup"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.UserRight", b => | |
| { | |
| b.HasOne("ContactManagementAPI.Models.AppUser", "AppUser") | |
| .WithMany("UserRights") | |
| .HasForeignKey("AppUserId") | |
| .OnDelete(DeleteBehavior.Cascade) | |
| .IsRequired(); | |
| b.Navigation("AppUser"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.AppUser", b => | |
| { | |
| b.Navigation("UserRights"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.Contact", b => | |
| { | |
| b.Navigation("BankAccounts"); | |
| b.Navigation("Documents"); | |
| b.Navigation("Photos"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.ContactGroup", b => | |
| { | |
| b.Navigation("Contacts"); | |
| }); | |
| modelBuilder.Entity("ContactManagementAPI.Models.UserGroup", b => | |
| { | |
| b.Navigation("GroupRights"); | |
| b.Navigation("Users"); | |
| }); | |
| } | |
| } | |
| } | |