feat(api): добавлено поле lastLogon в таблицы Users, Hosts
This commit is contained in:
2869
PARR.DAL/Migrations/20231206005200_TblUsersAddLastLogon.Designer.cs
generated
Normal file
2869
PARR.DAL/Migrations/20231206005200_TblUsersAddLastLogon.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
29
PARR.DAL/Migrations/20231206005200_TblUsersAddLastLogon.cs
Normal file
29
PARR.DAL/Migrations/20231206005200_TblUsersAddLastLogon.cs
Normal 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");
|
||||
}
|
||||
}
|
||||
}
|
||||
2872
PARR.DAL/Migrations/20231206010010_TblHostsAddLastLogon.Designer.cs
generated
Normal file
2872
PARR.DAL/Migrations/20231206010010_TblHostsAddLastLogon.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
29
PARR.DAL/Migrations/20231206010010_TblHostsAddLastLogon.cs
Normal file
29
PARR.DAL/Migrations/20231206010010_TblHostsAddLastLogon.cs
Normal 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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
|
||||
@@ -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>();
|
||||
|
||||
|
||||
@@ -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>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user