Add project files.
This commit is contained in:
155
OemanTrader.EntityFramework/Migrations/20220519211347_stock-to-asset.Designer.cs
generated
Normal file
155
OemanTrader.EntityFramework/Migrations/20220519211347_stock-to-asset.Designer.cs
generated
Normal file
@ -0,0 +1,155 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using OemanTrader.EntityFramework;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace OemanTrader.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(OemanTraderDbContext))]
|
||||
[Migration("20220519211347_stock-to-asset")]
|
||||
partial class stocktoasset
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.4")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("OemanTrader.Domain.Models.Account", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<int>("AccountHolderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("Balance")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("AccountHolderId");
|
||||
|
||||
b.ToTable("Accounts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("OemanTrader.Domain.Models.AssetTransaction", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<int>("AccountId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateProcessed")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<bool>("IsPurchase")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("ShareAmount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("AccountId");
|
||||
|
||||
b.ToTable("AssetTransactions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("OemanTrader.Domain.Models.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateJoined")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("OemanTrader.Domain.Models.Account", b =>
|
||||
{
|
||||
b.HasOne("OemanTrader.Domain.Models.User", "AccountHolder")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountHolderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("AccountHolder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("OemanTrader.Domain.Models.AssetTransaction", b =>
|
||||
{
|
||||
b.HasOne("OemanTrader.Domain.Models.Account", "Account")
|
||||
.WithMany("AssetTransactions")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.OwnsOne("OemanTrader.Domain.Models.Asset", "Asset", b1 =>
|
||||
{
|
||||
b1.Property<int>("AssetTransactionId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b1.Property<double>("PricePerShare")
|
||||
.HasColumnType("float");
|
||||
|
||||
b1.Property<string>("Symbol")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b1.HasKey("AssetTransactionId");
|
||||
|
||||
b1.ToTable("AssetTransactions");
|
||||
|
||||
b1.WithOwner()
|
||||
.HasForeignKey("AssetTransactionId");
|
||||
});
|
||||
|
||||
b.Navigation("Account");
|
||||
|
||||
b.Navigation("Asset")
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("OemanTrader.Domain.Models.Account", b =>
|
||||
{
|
||||
b.Navigation("AssetTransactions");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user