LogEntry Entity
This commit is contained in:
parent
d5a49b946a
commit
53a5464445
5 changed files with 98 additions and 1 deletions
14
api/src/Kurs.Platform.Domain/Entities/Host/LogEntry.cs
Normal file
14
api/src/Kurs.Platform.Domain/Entities/Host/LogEntry.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities;
|
||||
|
||||
namespace Kurs.Platform.Entities;
|
||||
|
||||
public class LogEntry : Entity<Guid>
|
||||
{
|
||||
public string? Message { get; set; }
|
||||
public string? MessageTemplate { get; set; }
|
||||
public string? Level { get; set; }
|
||||
public DateTime? TimeStamp { get; set; }
|
||||
public string? Exception { get; set; }
|
||||
public string? Properties { get; set; }
|
||||
}
|
||||
|
|
@ -38,6 +38,7 @@ public class PlatformDbContext :
|
|||
ITenantManagementDbContext
|
||||
{
|
||||
#region Saas
|
||||
public DbSet<LogEntry> LogEntries { get; set; }
|
||||
public DbSet<Tenant> Tenants { get; set; }
|
||||
public DbSet<TenantConnectionString> TenantConnectionStrings { get; set; }
|
||||
public DbSet<AiBot> AiBots { get; set; }
|
||||
|
|
@ -2391,5 +2392,11 @@ public class PlatformDbContext :
|
|||
.HasForeignKey(x => x.PartnerId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
|
||||
builder.Entity<LogEntry>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.LogEntry)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251103110012_Initial")]
|
||||
[Migration("20251103131643_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -5509,6 +5509,34 @@ namespace Kurs.Platform.Migrations
|
|||
b.ToTable("Sas_H_ListFormImportExecute", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.LogEntry", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Exception")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Level")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Message")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MessageTemplate")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Properties")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("TimeStamp")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Plat_H_LogEntry", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.MaterialGroup", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -1634,6 +1634,23 @@ namespace Kurs.Platform.Migrations
|
|||
table.UniqueConstraint("AK_Plat_H_LanguageKey_ResourceName_Key", x => new { x.ResourceName, x.Key });
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Plat_H_LogEntry",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Message = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
MessageTemplate = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Level = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
TimeStamp = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
Exception = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Properties = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Plat_H_LogEntry", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Plat_H_NotificationRule",
|
||||
columns: table => new
|
||||
|
|
@ -6216,6 +6233,9 @@ namespace Kurs.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Plat_H_LanguageText");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Plat_H_LogEntry");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Plat_H_Notification");
|
||||
|
||||
|
|
@ -5506,6 +5506,34 @@ namespace Kurs.Platform.Migrations
|
|||
b.ToTable("Sas_H_ListFormImportExecute", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.LogEntry", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Exception")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Level")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Message")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MessageTemplate")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Properties")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("TimeStamp")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Plat_H_LogEntry", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.MaterialGroup", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
|
|||
Loading…
Reference in a new issue