This repository has been archived on 2026-02-28. You can view files and clone it, but cannot push or open issues or pull requests.
2025-10-05 21:33:50 +02:00

42 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Spacebar.Db.Models;
[Table("audit_logs")]
public partial class AuditLog
{
[Key]
[Column("id", TypeName = "character varying")]
public string Id { get; set; } = null!;
[Column("user_id", TypeName = "character varying")]
public string? UserId { get; set; }
[Column("action_type")]
public int ActionType { get; set; }
[Column("options")]
public string? Options { get; set; }
[Column("changes")]
public string Changes { get; set; } = null!;
[Column("reason", TypeName = "character varying")]
public string? Reason { get; set; }
[Column("target_id", TypeName = "character varying")]
public string? TargetId { get; set; }
[ForeignKey("TargetId")]
[InverseProperty("AuditLogTargets")]
public virtual User? Target { get; set; }
[ForeignKey("UserId")]
[InverseProperty("AuditLogUsers")]
public virtual User? User { get; set; }
}