// using System; using IOL.GreatOffice.Api.Data.Database; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace IOL.GreatOffice.Api.Migrations { [DbContext(typeof(MainAppDatabase))] [Migration("20221030090557_MoreMinorChanges")] partial class MoreMinorChanges { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "6.0.10") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("CustomerCustomerGroup", b => { b.Property("CustomersId") .HasColumnType("uuid") .HasColumnName("customers_id"); b.Property("GroupsId") .HasColumnType("uuid") .HasColumnName("groups_id"); b.HasKey("CustomersId", "GroupsId") .HasName("pk_customer_customer_group"); b.HasIndex("GroupsId") .HasDatabaseName("ix_customer_customer_group_groups_id"); b.ToTable("customer_customer_group", (string)null); }); modelBuilder.Entity("CustomerProject", b => { b.Property("CustomersId") .HasColumnType("uuid") .HasColumnName("customers_id"); b.Property("ProjectsId") .HasColumnType("uuid") .HasColumnName("projects_id"); b.HasKey("CustomersId", "ProjectsId") .HasName("pk_customer_project"); b.HasIndex("ProjectsId") .HasDatabaseName("ix_customer_project_projects_id"); b.ToTable("customer_project", (string)null); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.ApiAccessToken", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("AllowCreate") .HasColumnType("boolean") .HasColumnName("allow_create"); b.Property("AllowDelete") .HasColumnType("boolean") .HasColumnName("allow_delete"); b.Property("AllowRead") .HasColumnType("boolean") .HasColumnName("allow_read"); b.Property("AllowUpdate") .HasColumnType("boolean") .HasColumnName("allow_update"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("Deleted") .HasColumnType("boolean") .HasColumnName("deleted"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("ExpiryDate") .HasColumnType("timestamp with time zone") .HasColumnName("expiry_date"); b.Property("ModifiedAt") .HasColumnType("timestamp with time zone") .HasColumnName("modified_at"); b.Property("UserId") .HasColumnType("uuid") .HasColumnName("user_id"); b.HasKey("Id") .HasName("pk_api_access_tokens"); b.HasIndex("UserId") .HasDatabaseName("ix_api_access_tokens_user_id"); b.ToTable("api_access_tokens", (string)null); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.Customer", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("Address1") .HasColumnType("text") .HasColumnName("address1"); b.Property("Address2") .HasColumnType("text") .HasColumnName("address2"); b.Property("Country") .HasColumnType("text") .HasColumnName("country"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("CreatedById") .HasColumnType("uuid") .HasColumnName("created_by_id"); b.Property("Currency") .HasColumnType("text") .HasColumnName("currency"); b.Property("CustomerNumber") .HasColumnType("text") .HasColumnName("customer_number"); b.Property("DefaultReference") .HasColumnType("text") .HasColumnName("default_reference"); b.Property("Deleted") .HasColumnType("boolean") .HasColumnName("deleted"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("DeletedById") .HasColumnType("uuid") .HasColumnName("deleted_by_id"); b.Property("Description") .HasColumnType("text") .HasColumnName("description"); b.Property("Email") .HasColumnType("text") .HasColumnName("email"); b.Property("ModifiedAt") .HasColumnType("timestamp with time zone") .HasColumnName("modified_at"); b.Property("ModifiedById") .HasColumnType("uuid") .HasColumnName("modified_by_id"); b.Property("Name") .HasColumnType("text") .HasColumnName("name"); b.Property("ORGNumber") .HasColumnType("text") .HasColumnName("org_number"); b.Property("Phone") .HasColumnType("text") .HasColumnName("phone"); b.Property("PostalCity") .HasColumnType("text") .HasColumnName("postal_city"); b.Property("PostalCode") .HasColumnType("text") .HasColumnName("postal_code"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UserId") .HasColumnType("uuid") .HasColumnName("user_id"); b.Property("VATNumber") .HasColumnType("text") .HasColumnName("vat_number"); b.Property("Website") .HasColumnType("text") .HasColumnName("website"); b.HasKey("Id") .HasName("pk_customers"); b.HasIndex("UserId") .HasDatabaseName("ix_customers_user_id"); b.ToTable("customers", (string)null); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.CustomerContact", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("CreatedById") .HasColumnType("uuid") .HasColumnName("created_by_id"); b.Property("CustomerId") .HasColumnType("uuid") .HasColumnName("customer_id"); b.Property("Deleted") .HasColumnType("boolean") .HasColumnName("deleted"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("DeletedById") .HasColumnType("uuid") .HasColumnName("deleted_by_id"); b.Property("Email") .HasColumnType("text") .HasColumnName("email"); b.Property("FirstName") .HasColumnType("text") .HasColumnName("first_name"); b.Property("LastName") .HasColumnType("text") .HasColumnName("last_name"); b.Property("ModifiedAt") .HasColumnType("timestamp with time zone") .HasColumnName("modified_at"); b.Property("ModifiedById") .HasColumnType("uuid") .HasColumnName("modified_by_id"); b.Property("Note") .HasColumnType("text") .HasColumnName("note"); b.Property("Phone") .HasColumnType("text") .HasColumnName("phone"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UserId") .HasColumnType("uuid") .HasColumnName("user_id"); b.Property("WorkTitle") .HasColumnType("text") .HasColumnName("work_title"); b.HasKey("Id") .HasName("pk_customer_contacts"); b.HasIndex("CustomerId") .HasDatabaseName("ix_customer_contacts_customer_id"); b.ToTable("customer_contacts", (string)null); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.CustomerEvent", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("CreatedById") .HasColumnType("uuid") .HasColumnName("created_by_id"); b.Property("CustomerId") .HasColumnType("uuid") .HasColumnName("customer_id"); b.Property("Deleted") .HasColumnType("boolean") .HasColumnName("deleted"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("DeletedById") .HasColumnType("uuid") .HasColumnName("deleted_by_id"); b.Property("ModifiedAt") .HasColumnType("timestamp with time zone") .HasColumnName("modified_at"); b.Property("ModifiedById") .HasColumnType("uuid") .HasColumnName("modified_by_id"); b.Property("Note") .HasColumnType("text") .HasColumnName("note"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("Title") .HasColumnType("text") .HasColumnName("title"); b.Property("UserId") .HasColumnType("uuid") .HasColumnName("user_id"); b.HasKey("Id") .HasName("pk_customer_events"); b.HasIndex("CustomerId") .HasDatabaseName("ix_customer_events_customer_id"); b.ToTable("customer_events", (string)null); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.CustomerGroup", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("CreatedById") .HasColumnType("uuid") .HasColumnName("created_by_id"); b.Property("Deleted") .HasColumnType("boolean") .HasColumnName("deleted"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("DeletedById") .HasColumnType("uuid") .HasColumnName("deleted_by_id"); b.Property("ModifiedAt") .HasColumnType("timestamp with time zone") .HasColumnName("modified_at"); b.Property("ModifiedById") .HasColumnType("uuid") .HasColumnName("modified_by_id"); b.Property("Name") .HasColumnType("text") .HasColumnName("name"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UserId") .HasColumnType("uuid") .HasColumnName("user_id"); b.HasKey("Id") .HasName("pk_customer_groups"); b.ToTable("customer_groups", (string)null); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.ForgotPasswordRequest", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("UserId") .HasColumnType("uuid") .HasColumnName("user_id"); b.HasKey("Id") .HasName("pk_forgot_password_requests"); b.HasIndex("UserId") .HasDatabaseName("ix_forgot_password_requests_user_id"); b.ToTable("forgot_password_requests", (string)null); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.Project", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("CreatedById") .HasColumnType("uuid") .HasColumnName("created_by_id"); b.Property("Deleted") .HasColumnType("boolean") .HasColumnName("deleted"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("DeletedById") .HasColumnType("uuid") .HasColumnName("deleted_by_id"); b.Property("Description") .HasColumnType("text") .HasColumnName("description"); b.Property("ModifiedAt") .HasColumnType("timestamp with time zone") .HasColumnName("modified_at"); b.Property("ModifiedById") .HasColumnType("uuid") .HasColumnName("modified_by_id"); b.Property("Name") .HasColumnType("text") .HasColumnName("name"); b.Property("Start") .HasColumnType("timestamp with time zone") .HasColumnName("start"); b.Property("Stop") .HasColumnType("timestamp with time zone") .HasColumnName("stop"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UserId") .HasColumnType("uuid") .HasColumnName("user_id"); b.HasKey("Id") .HasName("pk_projects"); b.ToTable("projects", (string)null); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.ProjectLabel", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("Color") .HasColumnType("text") .HasColumnName("color"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("CreatedById") .HasColumnType("uuid") .HasColumnName("created_by_id"); b.Property("Deleted") .HasColumnType("boolean") .HasColumnName("deleted"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("DeletedById") .HasColumnType("uuid") .HasColumnName("deleted_by_id"); b.Property("ModifiedAt") .HasColumnType("timestamp with time zone") .HasColumnName("modified_at"); b.Property("ModifiedById") .HasColumnType("uuid") .HasColumnName("modified_by_id"); b.Property("ProjectId") .HasColumnType("uuid") .HasColumnName("project_id"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UserId") .HasColumnType("uuid") .HasColumnName("user_id"); b.Property("Value") .HasColumnType("text") .HasColumnName("value"); b.HasKey("Id") .HasName("pk_project_labels"); b.HasIndex("ProjectId") .HasDatabaseName("ix_project_labels_project_id"); b.ToTable("project_labels", (string)null); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.ProjectMember", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("Deleted") .HasColumnType("boolean") .HasColumnName("deleted"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("ModifiedAt") .HasColumnType("timestamp with time zone") .HasColumnName("modified_at"); b.Property("ProjectId") .HasColumnType("uuid") .HasColumnName("project_id"); b.Property("Role") .HasColumnType("integer") .HasColumnName("role"); b.Property("UserId") .HasColumnType("uuid") .HasColumnName("user_id"); b.HasKey("Id") .HasName("pk_project_members"); b.HasIndex("ProjectId") .HasDatabaseName("ix_project_members_project_id"); b.HasIndex("UserId") .HasDatabaseName("ix_project_members_user_id"); b.ToTable("project_members", (string)null); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.Tenant", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("ContactEmail") .HasColumnType("text") .HasColumnName("contact_email"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("CreatedById") .HasColumnType("uuid") .HasColumnName("created_by_id"); b.Property("Deleted") .HasColumnType("boolean") .HasColumnName("deleted"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("DeletedById") .HasColumnType("uuid") .HasColumnName("deleted_by_id"); b.Property("Description") .HasColumnType("text") .HasColumnName("description"); b.Property("MasterUserId") .HasColumnType("uuid") .HasColumnName("master_user_id"); b.Property("MasterUserPassword") .HasColumnType("text") .HasColumnName("master_user_password"); b.Property("ModifiedAt") .HasColumnType("timestamp with time zone") .HasColumnName("modified_at"); b.Property("ModifiedById") .HasColumnType("uuid") .HasColumnName("modified_by_id"); b.Property("Name") .HasColumnType("text") .HasColumnName("name"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UserId") .HasColumnType("uuid") .HasColumnName("user_id"); b.HasKey("Id") .HasName("pk_tenants"); b.ToTable("tenants", (string)null); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.TimeCategory", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("Color") .HasColumnType("text") .HasColumnName("color"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("CreatedById") .HasColumnType("uuid") .HasColumnName("created_by_id"); b.Property("Deleted") .HasColumnType("boolean") .HasColumnName("deleted"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("DeletedById") .HasColumnType("uuid") .HasColumnName("deleted_by_id"); b.Property("ModifiedAt") .HasColumnType("timestamp with time zone") .HasColumnName("modified_at"); b.Property("ModifiedById") .HasColumnType("uuid") .HasColumnName("modified_by_id"); b.Property("Name") .HasColumnType("text") .HasColumnName("name"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UserId") .HasColumnType("uuid") .HasColumnName("user_id"); b.HasKey("Id") .HasName("pk_time_categories"); b.ToTable("time_categories", (string)null); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.TimeEntry", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("CategoryId") .HasColumnType("uuid") .HasColumnName("category_id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("CreatedById") .HasColumnType("uuid") .HasColumnName("created_by_id"); b.Property("Deleted") .HasColumnType("boolean") .HasColumnName("deleted"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("DeletedById") .HasColumnType("uuid") .HasColumnName("deleted_by_id"); b.Property("Description") .HasColumnType("text") .HasColumnName("description"); b.Property("ModifiedAt") .HasColumnType("timestamp with time zone") .HasColumnName("modified_at"); b.Property("ModifiedById") .HasColumnType("uuid") .HasColumnName("modified_by_id"); b.Property("Start") .HasColumnType("timestamp with time zone") .HasColumnName("start"); b.Property("Stop") .HasColumnType("timestamp with time zone") .HasColumnName("stop"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UserId") .HasColumnType("uuid") .HasColumnName("user_id"); b.HasKey("Id") .HasName("pk_time_entries"); b.HasIndex("CategoryId") .HasDatabaseName("ix_time_entries_category_id"); b.ToTable("time_entries", (string)null); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.TimeLabel", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("Color") .HasColumnType("text") .HasColumnName("color"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("CreatedById") .HasColumnType("uuid") .HasColumnName("created_by_id"); b.Property("Deleted") .HasColumnType("boolean") .HasColumnName("deleted"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("DeletedById") .HasColumnType("uuid") .HasColumnName("deleted_by_id"); b.Property("ModifiedAt") .HasColumnType("timestamp with time zone") .HasColumnName("modified_at"); b.Property("ModifiedById") .HasColumnType("uuid") .HasColumnName("modified_by_id"); b.Property("Name") .HasColumnType("text") .HasColumnName("name"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("TimeEntryId") .HasColumnType("uuid") .HasColumnName("time_entry_id"); b.Property("UserId") .HasColumnType("uuid") .HasColumnName("user_id"); b.HasKey("Id") .HasName("pk_time_labels"); b.HasIndex("TimeEntryId") .HasDatabaseName("ix_time_labels_time_entry_id"); b.ToTable("time_labels", (string)null); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.User", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("Deleted") .HasColumnType("boolean") .HasColumnName("deleted"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("Email") .HasColumnType("text") .HasColumnName("email"); b.Property("FirstName") .HasColumnType("text") .HasColumnName("first_name"); b.Property("LastName") .HasColumnType("text") .HasColumnName("last_name"); b.Property("ModifiedAt") .HasColumnType("timestamp with time zone") .HasColumnName("modified_at"); b.Property("Password") .HasColumnType("text") .HasColumnName("password"); b.Property("Username") .HasColumnType("text") .HasColumnName("username"); b.HasKey("Id") .HasName("pk_users"); b.ToTable("users", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.DataProtectionKey", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer") .HasColumnName("id"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("FriendlyName") .HasColumnType("text") .HasColumnName("friendly_name"); b.Property("Xml") .HasColumnType("text") .HasColumnName("xml"); b.HasKey("Id") .HasName("pk_data_protection_keys"); b.ToTable("data_protection_keys", (string)null); }); modelBuilder.Entity("TenantUser", b => { b.Property("TenantsId") .HasColumnType("uuid") .HasColumnName("tenants_id"); b.Property("UsersId") .HasColumnType("uuid") .HasColumnName("users_id"); b.HasKey("TenantsId", "UsersId") .HasName("pk_tenant_user"); b.HasIndex("UsersId") .HasDatabaseName("ix_tenant_user_users_id"); b.ToTable("tenant_user", (string)null); }); modelBuilder.Entity("CustomerCustomerGroup", b => { b.HasOne("IOL.GreatOffice.Api.Data.Database.Customer", null) .WithMany() .HasForeignKey("CustomersId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_customer_customer_group_customers_customers_id"); b.HasOne("IOL.GreatOffice.Api.Data.Database.CustomerGroup", null) .WithMany() .HasForeignKey("GroupsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_customer_customer_group_customer_groups_groups_id"); }); modelBuilder.Entity("CustomerProject", b => { b.HasOne("IOL.GreatOffice.Api.Data.Database.Customer", null) .WithMany() .HasForeignKey("CustomersId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_customer_project_customers_customers_id"); b.HasOne("IOL.GreatOffice.Api.Data.Database.Project", null) .WithMany() .HasForeignKey("ProjectsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_customer_project_projects_projects_id"); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.ApiAccessToken", b => { b.HasOne("IOL.GreatOffice.Api.Data.Database.User", "User") .WithMany() .HasForeignKey("UserId") .HasConstraintName("fk_api_access_tokens_users_user_id"); b.Navigation("User"); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.Customer", b => { b.HasOne("IOL.GreatOffice.Api.Data.Database.User", "Owner") .WithMany() .HasForeignKey("UserId") .HasConstraintName("fk_customers_users_user_id"); b.Navigation("Owner"); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.CustomerContact", b => { b.HasOne("IOL.GreatOffice.Api.Data.Database.Customer", "Customer") .WithMany("Contacts") .HasForeignKey("CustomerId") .HasConstraintName("fk_customer_contacts_customers_customer_id"); b.Navigation("Customer"); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.CustomerEvent", b => { b.HasOne("IOL.GreatOffice.Api.Data.Database.Customer", "Customer") .WithMany("Events") .HasForeignKey("CustomerId") .HasConstraintName("fk_customer_events_customers_customer_id"); b.Navigation("Customer"); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.ForgotPasswordRequest", b => { b.HasOne("IOL.GreatOffice.Api.Data.Database.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_forgot_password_requests_users_user_id"); b.Navigation("User"); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.ProjectLabel", b => { b.HasOne("IOL.GreatOffice.Api.Data.Database.Project", "Project") .WithMany("Labels") .HasForeignKey("ProjectId") .HasConstraintName("fk_project_labels_projects_project_id"); b.Navigation("Project"); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.ProjectMember", b => { b.HasOne("IOL.GreatOffice.Api.Data.Database.Project", "Project") .WithMany("Members") .HasForeignKey("ProjectId") .HasConstraintName("fk_project_members_projects_project_id"); b.HasOne("IOL.GreatOffice.Api.Data.Database.User", "User") .WithMany() .HasForeignKey("UserId") .HasConstraintName("fk_project_members_users_user_id"); b.Navigation("Project"); b.Navigation("User"); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.TimeEntry", b => { b.HasOne("IOL.GreatOffice.Api.Data.Database.TimeCategory", "Category") .WithMany() .HasForeignKey("CategoryId") .HasConstraintName("fk_time_entries_time_categories_category_id"); b.Navigation("Category"); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.TimeLabel", b => { b.HasOne("IOL.GreatOffice.Api.Data.Database.TimeEntry", null) .WithMany("Labels") .HasForeignKey("TimeEntryId") .HasConstraintName("fk_time_labels_time_entries_time_entry_id"); }); modelBuilder.Entity("TenantUser", b => { b.HasOne("IOL.GreatOffice.Api.Data.Database.Tenant", null) .WithMany() .HasForeignKey("TenantsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_tenant_user_tenants_tenants_id"); b.HasOne("IOL.GreatOffice.Api.Data.Database.User", null) .WithMany() .HasForeignKey("UsersId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_tenant_user_users_users_id"); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.Customer", b => { b.Navigation("Contacts"); b.Navigation("Events"); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.Project", b => { b.Navigation("Labels"); b.Navigation("Members"); }); modelBuilder.Entity("IOL.GreatOffice.Api.Data.Database.TimeEntry", b => { b.Navigation("Labels"); }); #pragma warning restore 612, 618 } } }