New table StockGroups added
This commit is contained in:
10
DataDomain/ShareModel.cs
Normal file
10
DataDomain/ShareModel.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace DataDomain
|
||||
{
|
||||
public class ShareModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string GroupName { get; set; }
|
||||
public string StockName { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
194
DatamodelLibrary/Migrations/20220201161420_StockGroups_table.Designer.cs
generated
Normal file
194
DatamodelLibrary/Migrations/20220201161420_StockGroups_table.Designer.cs
generated
Normal file
@ -0,0 +1,194 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using DatamodelLibrary;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace DatamodelLibrary.Migrations
|
||||
{
|
||||
[DbContext(typeof(StockContext))]
|
||||
[Migration("20220201161420_StockGroups_table")]
|
||||
partial class StockGroups_table
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "5.0.6");
|
||||
|
||||
modelBuilder.Entity("DataDomain.Address", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Destination")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Nation")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Street2")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Zipcode")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Addresses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataDomain.BackupRegister", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("BackedUp")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("BackupDbName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("BackupPath")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("DbName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("BackupRegings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataDomain.Person", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("AccountNo")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Born")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("ClearingNo")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Comments")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("HomeAddress")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("InvoiceAddress")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("NickName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Persons");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataDomain.PersonStock", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("PersonId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("StockId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("PersonStocks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataDomain.ShareModel", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("GroupName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("StockName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("StockGroups");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataDomain.StockMember", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("ActAmount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime?>("ActDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<decimal>("ActValue")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("BuyDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<decimal>("BuyValue")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<long>("PostAmount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime?>("SoldDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<decimal>("SoldStockPrice")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<decimal?>("SoldValue")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("StockExtId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("StockId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Stocks");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace DatamodelLibrary.Migrations
|
||||
{
|
||||
public partial class StockGroups_table : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "StockGroups",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
GroupName = table.Column<string>(type: "TEXT", nullable: true),
|
||||
StockName = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_StockGroups", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "StockGroups");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -123,6 +123,23 @@ namespace DatamodelLibrary.Migrations
|
||||
b.ToTable("PersonStocks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataDomain.ShareModel", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("GroupName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("StockName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("StockGroups");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataDomain.StockMember", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
|
||||
@ -15,6 +15,7 @@ namespace DatamodelLibrary
|
||||
public DbSet<Address> Addresses { get; set; }
|
||||
public DbSet<PersonStock> PersonStocks { get; set; }
|
||||
public DbSet<BackupRegister> BackupRegings { get; set; }
|
||||
public DbSet<ShareModel> StockGroups { get; set; }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder options)
|
||||
=> options.UseSqlite("Data Source=Stocks.db");
|
||||
|
||||
Binary file not shown.
BIN
StockInfoCore/Stocks.db-shm
Normal file
BIN
StockInfoCore/Stocks.db-shm
Normal file
Binary file not shown.
BIN
StockInfoCore/Stocks.db-wal
Normal file
BIN
StockInfoCore/Stocks.db-wal
Normal file
Binary file not shown.
Reference in New Issue
Block a user