feat(api): добавлено поле lastLogon в таблицы Users, Hosts

This commit is contained in:
Mikhail Trubnikov
2023-12-06 11:08:14 +10:00
parent 437b1a4e7c
commit 052312738e
10 changed files with 5825 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,29 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PARR.DAL.Migrations
{
/// <inheritdoc />
public partial class TblUsersAddLastLogon : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTimeOffset>(
name: "LastLogon",
table: "Users",
type: "timestamp with time zone",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LastLogon",
table: "Users");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,29 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PARR.DAL.Migrations
{
/// <inheritdoc />
public partial class TblHostsAddLastLogon : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTimeOffset>(
name: "LastLogon",
table: "Hosts",
type: "timestamp with time zone",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LastLogon",
table: "Hosts");
}
}
}

View File

@@ -1624,6 +1624,9 @@ namespace PARR.DAL.Migrations
.IsRequired()
.HasColumnType("text");
b.Property<DateTimeOffset?>("LastLogon")
.HasColumnType("timestamp with time zone");
b.Property<int>("ResponseAreaCode")
.HasColumnType("integer");
@@ -2355,6 +2358,9 @@ namespace PARR.DAL.Migrations
.IsRequired()
.HasColumnType("text");
b.Property<DateTimeOffset?>("LastLogon")
.HasColumnType("timestamp with time zone");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");

View File

@@ -35,6 +35,8 @@ namespace PARR.DAL.Models
public int ResponseAreaCode { get; set; }
public DateTimeOffset? LastLogon { get; set; }
public ICollection<ApplicationInHost> ApplicationsInHosts { get; set; } = new HashSet<ApplicationInHost>();

View File

@@ -23,6 +23,8 @@ namespace PARR.DAL.Models
public string? Description { get; set; }
public DateTimeOffset? LastLogon { get; set; }
public ICollection<UsersInRole> Roles { get; set; } = new HashSet<UsersInRole>();
}