ปรับปรุงการเก็บ log

This commit is contained in:
LAPTOP-KB8JC2K2\acer
2021-05-19 21:25:40 +07:00
parent 9f106272c8
commit 0a104bc9c4
7 changed files with 1293 additions and 5 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,41 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace tb320eva.Migrations
{
public partial class AddLog : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "activity_log_eva",
columns: table => new
{
id = table.Column<int>(nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
log_name = table.Column<string>(maxLength: 191, nullable: true),
description = table.Column<string>(maxLength: 4000, nullable: true),
subject_id = table.Column<int>(nullable: true),
subject_type = table.Column<string>(maxLength: 191, nullable: true),
causer_id = table.Column<int>(nullable: true),
causer_type = table.Column<string>(maxLength: 191, nullable: true),
properties = table.Column<string>(maxLength: 8000, nullable: true),
ip_address = table.Column<string>(maxLength: 191, nullable: true),
mac_address = table.Column<string>(maxLength: 191, nullable: true),
created_at = table.Column<DateTime>(nullable: true),
updated_at = table.Column<DateTime>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_activity_log_eva", x => x.id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "activity_log_eva");
}
}
}

View File

@@ -19,6 +19,45 @@ namespace tb320eva.Migrations
.HasAnnotation("ProductVersion", "2.2.6-servicing-10079")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
modelBuilder.Entity("TodoAPI2.Models.activity_log_evaEntity", b =>
{
b.Property<int>("id")
.ValueGeneratedOnAdd();
b.Property<int?>("causer_id");
b.Property<string>("causer_type")
.HasMaxLength(191);
b.Property<DateTime?>("created_at");
b.Property<string>("description")
.HasMaxLength(4000);
b.Property<string>("ip_address")
.HasMaxLength(191);
b.Property<string>("log_name")
.HasMaxLength(191);
b.Property<string>("mac_address")
.HasMaxLength(191);
b.Property<string>("properties")
.HasMaxLength(8000);
b.Property<int?>("subject_id");
b.Property<string>("subject_type")
.HasMaxLength(191);
b.Property<DateTime?>("updated_at");
b.HasKey("id");
b.ToTable("activity_log_eva");
});
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b =>
{
b.Property<int>("id");