mirror of
https://github.com/BarkProductions/barkman.git
synced 2026-08-11 11:42:03 +00:00
292 lines
10 KiB
C#
292 lines
10 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
using barkmanapi;
|
|
|
|
#nullable disable
|
|
|
|
namespace barkmanapi.Migrations
|
|
{
|
|
[DbContext(typeof(BarkContext))]
|
|
partial class BarkContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "9.0.1")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("barkmanapi.Customers", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Address")
|
|
.HasColumnType("text")
|
|
.HasColumnName("address");
|
|
|
|
b.Property<string>("BillingTerms")
|
|
.HasColumnType("text")
|
|
.HasColumnName("billing_terms");
|
|
|
|
b.Property<string>("Company")
|
|
.HasColumnType("text")
|
|
.HasColumnName("company");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasColumnType("text")
|
|
.HasColumnName("email");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text")
|
|
.HasColumnName("name");
|
|
|
|
b.Property<string>("Notes")
|
|
.HasColumnType("text")
|
|
.HasColumnName("notes");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.HasColumnType("text")
|
|
.HasColumnName("phone_number");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_customers");
|
|
|
|
b.ToTable("customers", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("barkmanapi.InventoryItems", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Barcode")
|
|
.IsRequired()
|
|
.HasColumnType("text")
|
|
.HasColumnName("barcode");
|
|
|
|
b.Property<string>("Brand")
|
|
.IsRequired()
|
|
.HasColumnType("text")
|
|
.HasColumnName("brand");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text")
|
|
.HasColumnName("name");
|
|
|
|
b.Property<string>("Notes")
|
|
.HasColumnType("text")
|
|
.HasColumnName("notes");
|
|
|
|
b.Property<float?>("RentalPrice")
|
|
.HasColumnType("real")
|
|
.HasColumnName("rental_price");
|
|
|
|
b.Property<float?>("ReplacementCost")
|
|
.HasColumnType("real")
|
|
.HasColumnName("replacement_cost");
|
|
|
|
b.Property<string>("SerialNumber")
|
|
.HasColumnType("text")
|
|
.HasColumnName("serial_number");
|
|
|
|
b.Property<string>("StatusId")
|
|
.HasColumnType("text")
|
|
.HasColumnName("status_id");
|
|
|
|
b.Property<float?>("Weight")
|
|
.HasColumnType("real")
|
|
.HasColumnName("weight");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_inventory");
|
|
|
|
b.HasIndex("Barcode")
|
|
.IsUnique()
|
|
.HasDatabaseName("ix_inventory_barcode");
|
|
|
|
b.HasIndex("StatusId")
|
|
.HasDatabaseName("ix_inventory_status_id");
|
|
|
|
b.ToTable("inventory", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("barkmanapi.ItemStatus", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("text")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text")
|
|
.HasColumnName("name");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_item_status");
|
|
|
|
b.ToTable("item_status", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("barkmanapi.JobItems", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ItemId")
|
|
.IsRequired()
|
|
.HasColumnType("text")
|
|
.HasColumnName("item_id");
|
|
|
|
b.Property<int?>("JobsId")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("jobs_id");
|
|
|
|
b.Property<string>("OrderId")
|
|
.IsRequired()
|
|
.HasColumnType("text")
|
|
.HasColumnName("order_id");
|
|
|
|
b.Property<int>("Quantity")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("quantity");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_job_items");
|
|
|
|
b.HasIndex("JobsId")
|
|
.HasDatabaseName("ix_job_items_jobs_id");
|
|
|
|
b.ToTable("job_items", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("barkmanapi.JobStatus", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("text")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text")
|
|
.HasColumnName("name");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_job_status");
|
|
|
|
b.ToTable("job_status", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("barkmanapi.Jobs", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Address")
|
|
.HasColumnType("text")
|
|
.HasColumnName("address");
|
|
|
|
b.Property<int>("CustomerId")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("customer_id");
|
|
|
|
b.Property<DateTimeOffset>("EndDate")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("end_date");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text")
|
|
.HasColumnName("name");
|
|
|
|
b.Property<string>("Notes")
|
|
.HasColumnType("text")
|
|
.HasColumnName("notes");
|
|
|
|
b.Property<DateTimeOffset>("StartDate")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("start_date");
|
|
|
|
b.Property<string>("StatusId")
|
|
.HasColumnType("text")
|
|
.HasColumnName("status_id");
|
|
|
|
b.Property<decimal>("TotalPrice")
|
|
.HasColumnType("numeric")
|
|
.HasColumnName("total_price");
|
|
|
|
b.Property<string>("Venue")
|
|
.HasColumnType("text")
|
|
.HasColumnName("venue");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_jobs");
|
|
|
|
b.HasIndex("StatusId")
|
|
.HasDatabaseName("ix_jobs_status_id");
|
|
|
|
b.ToTable("jobs", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("barkmanapi.InventoryItems", b =>
|
|
{
|
|
b.HasOne("barkmanapi.ItemStatus", "Status")
|
|
.WithMany()
|
|
.HasForeignKey("StatusId")
|
|
.HasConstraintName("fk_inventory_item_status_status_id");
|
|
|
|
b.Navigation("Status");
|
|
});
|
|
|
|
modelBuilder.Entity("barkmanapi.JobItems", b =>
|
|
{
|
|
b.HasOne("barkmanapi.Jobs", null)
|
|
.WithMany("Items")
|
|
.HasForeignKey("JobsId")
|
|
.HasConstraintName("fk_job_items_jobs_jobs_id");
|
|
});
|
|
|
|
modelBuilder.Entity("barkmanapi.Jobs", b =>
|
|
{
|
|
b.HasOne("barkmanapi.JobStatus", "Status")
|
|
.WithMany()
|
|
.HasForeignKey("StatusId")
|
|
.HasConstraintName("fk_jobs_job_status_status_id");
|
|
|
|
b.Navigation("Status");
|
|
});
|
|
|
|
modelBuilder.Entity("barkmanapi.Jobs", b =>
|
|
{
|
|
b.Navigation("Items");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|