Files
ReC/src/ReC.Domain/Entities/RecActionView.cs
TekH f8c5502905 Refactor auth type properties to use strong enum type
Changed Type in EndpointAuth and EndpointAuthType in RecActionView from string? to EndpointAuthType? for improved type safety and clarity. This enforces the use of a specific enum for authentication types instead of plain strings.
2025-12-12 13:58:39 +01:00

87 lines
2.3 KiB
C#

using ReC.Domain.Constants;
using System.ComponentModel.DataAnnotations.Schema;
namespace ReC.Domain.Entities;
/// <summary>
/// Represents the VWREC_ACTION view from the database.
///
/// All properties are defined as nullable to provide flexibility in case the underlying view
/// changes in production (e.g., columns added, removed, or modified). This approach prevents
/// runtime mapping errors and ensures the application can handle schema changes without
/// requiring immediate code updates.
/// </summary>
[Table("VWREC_ACTION", Schema = "dbo")]
public class RecActionView
{
public required long Id { get; set; }
[ForeignKey("Id")]
public RecAction? Root { get; set; }
public long? ProfileId { get; set; }
[ForeignKey("ProfileId")]
public Profile? Profile { get; set; }
public string? ProfileName { get; set; }
public string? ProfileType { get; set; }
public byte? Sequence { get; set; }
public long? EndpointId { get; set; }
[ForeignKey("EndpointId")]
public Endpoint? Endpoint { get; set; }
public string? EndpointUri { get; set; }
public long? EndpointAuthId { get; set; }
[ForeignKey("EndpointAuthId")]
public EndpointAuth? EndpointAuth { get; set; }
public EndpointAuthType? EndpointAuthType { get; set; }
public string? EndpointAuthApiKey { get; set; }
public string? EndpointAuthApiValue { get; set; }
public ApiKeyLocation? EndpointAuthApiKeyAddTo { get; set; }
public string? EndpointAuthToken { get; set; }
public string? EndpointAuthUsername { get; set; }
public string? EndpointAuthPassword { get; set; }
public string? EndpointAuthDomain { get; set; }
public string? EndpointAuthWorkstation { get; set; }
public short? EndpointParamsId { get; set; }
public short? SqlConnectionId { get; set; }
[ForeignKey("SqlConnectionId")]
public Connection? SqlConnection { get; set; }
public string? SqlConnectionServer { get; set; }
public string? SqlConnectionDb { get; set; }
public string? SqlConnectionUsername { get; set; }
public string? SqlConnectionPassword { get; set; }
public string? RestType { get; set; }
public string? PreprocessingQuery { get; set; }
public string? HeaderQuery { get; set; }
public string? BodyQuery { get; set; }
public string? PostprocessingQuery { get; set; }
}