| | | 1 | | // <auto-generated /> |
| | | 2 | | using System; |
| | | 3 | | using ClientManager.Shared.Data; |
| | | 4 | | using Microsoft.EntityFrameworkCore; |
| | | 5 | | using Microsoft.EntityFrameworkCore.Infrastructure; |
| | | 6 | | using Microsoft.EntityFrameworkCore.Migrations; |
| | | 7 | | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
| | | 8 | | using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; |
| | | 9 | | |
| | | 10 | | #nullable disable |
| | | 11 | | |
| | | 12 | | namespace ClientManager.Worker.Migrations |
| | | 13 | | { |
| | | 14 | | [DbContext(typeof(AppDbContext))] |
| | | 15 | | [Migration("20251029073631_InitialCreate")] |
| | | 16 | | partial class InitialCreate |
| | | 17 | | { |
| | | 18 | | /// <inheritdoc /> |
| | | 19 | | protected override void BuildTargetModel(ModelBuilder modelBuilder) |
| | | 20 | | { |
| | | 21 | | #pragma warning disable 612, 618 |
| | 0 | 22 | | modelBuilder |
| | 0 | 23 | | .HasAnnotation("ProductVersion", "9.0.10") |
| | 0 | 24 | | .HasAnnotation("Relational:MaxIdentifierLength", 63); |
| | | 25 | | |
| | 0 | 26 | | NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); |
| | | 27 | | |
| | 0 | 28 | | modelBuilder.Entity("ClientManager.Shared.Models.Client", b => |
| | 0 | 29 | | { |
| | 0 | 30 | | b.Property<Guid>("Id") |
| | 0 | 31 | | .ValueGeneratedOnAdd() |
| | 0 | 32 | | .HasColumnType("uuid"); |
| | 0 | 33 | | |
| | 0 | 34 | | b.Property<string>("Email") |
| | 0 | 35 | | .HasColumnType("text"); |
| | 0 | 36 | | |
| | 0 | 37 | | b.Property<string>("FirstName") |
| | 0 | 38 | | .IsRequired() |
| | 0 | 39 | | .HasMaxLength(100) |
| | 0 | 40 | | .HasColumnType("character varying(100)"); |
| | 0 | 41 | | |
| | 0 | 42 | | b.Property<string>("LastName") |
| | 0 | 43 | | .IsRequired() |
| | 0 | 44 | | .HasMaxLength(100) |
| | 0 | 45 | | .HasColumnType("character varying(100)"); |
| | 0 | 46 | | |
| | 0 | 47 | | b.HasKey("Id"); |
| | 0 | 48 | | |
| | 0 | 49 | | b.ToTable("Clients"); |
| | 0 | 50 | | }); |
| | | 51 | | |
| | 0 | 52 | | modelBuilder.Entity("ClientManager.Shared.Models.Phone", b => |
| | 0 | 53 | | { |
| | 0 | 54 | | b.Property<Guid>("Id") |
| | 0 | 55 | | .ValueGeneratedOnAdd() |
| | 0 | 56 | | .HasColumnType("uuid"); |
| | 0 | 57 | | |
| | 0 | 58 | | b.Property<Guid>("ClientId") |
| | 0 | 59 | | .HasColumnType("uuid"); |
| | 0 | 60 | | |
| | 0 | 61 | | b.Property<string>("Number") |
| | 0 | 62 | | .IsRequired() |
| | 0 | 63 | | .HasColumnType("text"); |
| | 0 | 64 | | |
| | 0 | 65 | | b.Property<string>("Type") |
| | 0 | 66 | | .IsRequired() |
| | 0 | 67 | | .HasColumnType("text"); |
| | 0 | 68 | | |
| | 0 | 69 | | b.HasKey("Id"); |
| | 0 | 70 | | |
| | 0 | 71 | | b.HasIndex("ClientId"); |
| | 0 | 72 | | |
| | 0 | 73 | | b.ToTable("Phones"); |
| | 0 | 74 | | }); |
| | | 75 | | |
| | 0 | 76 | | modelBuilder.Entity("ClientManager.Shared.Models.Phone", b => |
| | 0 | 77 | | { |
| | 0 | 78 | | b.HasOne("ClientManager.Shared.Models.Client", "Client") |
| | 0 | 79 | | .WithMany("Phones") |
| | 0 | 80 | | .HasForeignKey("ClientId") |
| | 0 | 81 | | .OnDelete(DeleteBehavior.Cascade) |
| | 0 | 82 | | .IsRequired(); |
| | 0 | 83 | | |
| | 0 | 84 | | b.Navigation("Client"); |
| | 0 | 85 | | }); |
| | | 86 | | |
| | 0 | 87 | | modelBuilder.Entity("ClientManager.Shared.Models.Client", b => |
| | 0 | 88 | | { |
| | 0 | 89 | | b.Navigation("Phones"); |
| | 0 | 90 | | }); |
| | | 91 | | #pragma warning restore 612, 618 |
| | 0 | 92 | | } |
| | | 93 | | } |
| | | 94 | | } |