| | | 1 | | // <auto-generated /> |
| | | 2 | | using System; |
| | | 3 | | using ClutterStock.Infrastructure.Database; |
| | | 4 | | using Microsoft.EntityFrameworkCore; |
| | | 5 | | using Microsoft.EntityFrameworkCore.Infrastructure; |
| | | 6 | | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
| | | 7 | | using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; |
| | | 8 | | |
| | | 9 | | #nullable disable |
| | | 10 | | |
| | | 11 | | namespace ClutterStock.Infrastructure.Migrations |
| | | 12 | | { |
| | | 13 | | [DbContext(typeof(ApplicationContext))] |
| | | 14 | | partial class ApplicationContextModelSnapshot : ModelSnapshot |
| | | 15 | | { |
| | | 16 | | protected override void BuildModel(ModelBuilder modelBuilder) |
| | | 17 | | { |
| | | 18 | | #pragma warning disable 612, 618 |
| | 5 | 19 | | modelBuilder |
| | 5 | 20 | | .HasAnnotation("ProductVersion", "10.0.7") |
| | 5 | 21 | | .HasAnnotation("Relational:MaxIdentifierLength", 63); |
| | | 22 | | |
| | 5 | 23 | | NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); |
| | | 24 | | |
| | 5 | 25 | | modelBuilder.Entity("ClutterStock.Entities.Item", b => |
| | 5 | 26 | | { |
| | 5 | 27 | | b.Property<int>("Id") |
| | 5 | 28 | | .ValueGeneratedOnAdd() |
| | 5 | 29 | | .HasColumnType("integer"); |
| | 5 | 30 | | |
| | 5 | 31 | | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); |
| | 5 | 32 | | |
| | 5 | 33 | | b.Property<string>("Category") |
| | 5 | 34 | | .HasMaxLength(100) |
| | 5 | 35 | | .HasColumnType("character varying(100)"); |
| | 5 | 36 | | |
| | 5 | 37 | | b.Property<DateTimeOffset>("CreatedAtUtc") |
| | 5 | 38 | | .HasColumnType("timestamp with time zone"); |
| | 5 | 39 | | |
| | 5 | 40 | | b.Property<string>("Description") |
| | 5 | 41 | | .HasMaxLength(2000) |
| | 5 | 42 | | .HasColumnType("character varying(2000)"); |
| | 5 | 43 | | |
| | 5 | 44 | | b.Property<string>("Name") |
| | 5 | 45 | | .IsRequired() |
| | 5 | 46 | | .HasMaxLength(200) |
| | 5 | 47 | | .HasColumnType("character varying(200)"); |
| | 5 | 48 | | |
| | 5 | 49 | | b.Property<string>("Notes") |
| | 5 | 50 | | .HasMaxLength(2000) |
| | 5 | 51 | | .HasColumnType("character varying(2000)"); |
| | 5 | 52 | | |
| | 5 | 53 | | b.Property<int>("RoomId") |
| | 5 | 54 | | .HasColumnType("integer"); |
| | 5 | 55 | | |
| | 5 | 56 | | b.Property<DateTimeOffset?>("UpdatedAtUtc") |
| | 5 | 57 | | .HasColumnType("timestamp with time zone"); |
| | 5 | 58 | | |
| | 5 | 59 | | b.HasKey("Id"); |
| | 5 | 60 | | |
| | 5 | 61 | | b.HasIndex("RoomId"); |
| | 5 | 62 | | |
| | 5 | 63 | | b.ToTable("Item", (string)null); |
| | 5 | 64 | | }); |
| | | 65 | | |
| | 5 | 66 | | modelBuilder.Entity("ClutterStock.Entities.Location", b => |
| | 5 | 67 | | { |
| | 5 | 68 | | b.Property<int>("Id") |
| | 5 | 69 | | .ValueGeneratedOnAdd() |
| | 5 | 70 | | .HasColumnType("integer"); |
| | 5 | 71 | | |
| | 5 | 72 | | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); |
| | 5 | 73 | | |
| | 5 | 74 | | b.Property<DateTimeOffset>("CreatedAtUtc") |
| | 5 | 75 | | .HasColumnType("timestamp with time zone"); |
| | 5 | 76 | | |
| | 5 | 77 | | b.Property<string>("Description") |
| | 5 | 78 | | .HasMaxLength(2000) |
| | 5 | 79 | | .HasColumnType("character varying(2000)"); |
| | 5 | 80 | | |
| | 5 | 81 | | b.Property<string>("Name") |
| | 5 | 82 | | .IsRequired() |
| | 5 | 83 | | .HasMaxLength(200) |
| | 5 | 84 | | .HasColumnType("character varying(200)"); |
| | 5 | 85 | | |
| | 5 | 86 | | b.Property<DateTimeOffset?>("UpdatedAtUtc") |
| | 5 | 87 | | .HasColumnType("timestamp with time zone"); |
| | 5 | 88 | | |
| | 5 | 89 | | b.HasKey("Id"); |
| | 5 | 90 | | |
| | 5 | 91 | | b.ToTable("Location", (string)null); |
| | 5 | 92 | | }); |
| | | 93 | | |
| | 5 | 94 | | modelBuilder.Entity("ClutterStock.Entities.Room", b => |
| | 5 | 95 | | { |
| | 5 | 96 | | b.Property<int>("Id") |
| | 5 | 97 | | .ValueGeneratedOnAdd() |
| | 5 | 98 | | .HasColumnType("integer"); |
| | 5 | 99 | | |
| | 5 | 100 | | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); |
| | 5 | 101 | | |
| | 5 | 102 | | b.Property<DateTimeOffset>("CreatedAtUtc") |
| | 5 | 103 | | .HasColumnType("timestamp with time zone"); |
| | 5 | 104 | | |
| | 5 | 105 | | b.Property<string>("Description") |
| | 5 | 106 | | .HasMaxLength(2000) |
| | 5 | 107 | | .HasColumnType("character varying(2000)"); |
| | 5 | 108 | | |
| | 5 | 109 | | b.Property<int>("LocationId") |
| | 5 | 110 | | .HasColumnType("integer"); |
| | 5 | 111 | | |
| | 5 | 112 | | b.Property<string>("Name") |
| | 5 | 113 | | .IsRequired() |
| | 5 | 114 | | .HasMaxLength(200) |
| | 5 | 115 | | .HasColumnType("character varying(200)"); |
| | 5 | 116 | | |
| | 5 | 117 | | b.Property<DateTimeOffset?>("UpdatedAtUtc") |
| | 5 | 118 | | .HasColumnType("timestamp with time zone"); |
| | 5 | 119 | | |
| | 5 | 120 | | b.HasKey("Id"); |
| | 5 | 121 | | |
| | 5 | 122 | | b.HasIndex("LocationId"); |
| | 5 | 123 | | |
| | 5 | 124 | | b.ToTable("Room", (string)null); |
| | 5 | 125 | | }); |
| | | 126 | | |
| | 5 | 127 | | modelBuilder.Entity("ClutterStock.Entities.Item", b => |
| | 5 | 128 | | { |
| | 5 | 129 | | b.HasOne("ClutterStock.Entities.Room", "Room") |
| | 5 | 130 | | .WithMany("Items") |
| | 5 | 131 | | .HasForeignKey("RoomId") |
| | 5 | 132 | | .OnDelete(DeleteBehavior.Cascade) |
| | 5 | 133 | | .IsRequired(); |
| | 5 | 134 | | |
| | 5 | 135 | | b.Navigation("Room"); |
| | 5 | 136 | | }); |
| | | 137 | | |
| | 5 | 138 | | modelBuilder.Entity("ClutterStock.Entities.Room", b => |
| | 5 | 139 | | { |
| | 5 | 140 | | b.HasOne("ClutterStock.Entities.Location", "Location") |
| | 5 | 141 | | .WithMany("Rooms") |
| | 5 | 142 | | .HasForeignKey("LocationId") |
| | 5 | 143 | | .OnDelete(DeleteBehavior.Cascade) |
| | 5 | 144 | | .IsRequired(); |
| | 5 | 145 | | |
| | 5 | 146 | | b.Navigation("Location"); |
| | 5 | 147 | | }); |
| | | 148 | | |
| | 5 | 149 | | modelBuilder.Entity("ClutterStock.Entities.Location", b => |
| | 5 | 150 | | { |
| | 5 | 151 | | b.Navigation("Rooms"); |
| | 5 | 152 | | }); |
| | | 153 | | |
| | 5 | 154 | | modelBuilder.Entity("ClutterStock.Entities.Room", b => |
| | 5 | 155 | | { |
| | 5 | 156 | | b.Navigation("Items"); |
| | 5 | 157 | | }); |
| | | 158 | | #pragma warning restore 612, 618 |
| | 5 | 159 | | } |
| | | 160 | | } |
| | | 161 | | } |