mirror of
https://github.com/techgarage-ir/MTWireGuard.git
synced 2025-08-30 06:39:27 +02:00
Update db migrations with new objects and fields
This commit is contained in:
parent
115f657738
commit
24c99bf691
17 changed files with 1450 additions and 0 deletions
91
Application/Migrations/20230906130735_AddDataUsage.Designer.cs
generated
Normal file
91
Application/Migrations/20230906130735_AddDataUsage.Designer.cs
generated
Normal file
|
@ -0,0 +1,91 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using MTWireGuard.Application;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace MTWireGuard.Application.Migrations
|
||||
{
|
||||
[DbContext(typeof(DBContext))]
|
||||
[Migration("20230906130735_AddDataUsage")]
|
||||
partial class AddDataUsage
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.5");
|
||||
|
||||
modelBuilder.Entity("MTWireGuard.Application.Models.DataUsage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("RX")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("TX")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("UserID")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("UserReset")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("DataUsages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MTWireGuard.Application.Models.Mikrotik.WGPeerDBModel", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime?>("Expire")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("ExpireID")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("PrivateKey")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("PublicKey")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("RX")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("TX")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("PrivateKey")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("PublicKey")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("Users");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue