using ReC.Domain.Constants; using ReC.Domain.Entities; using System.ComponentModel.DataAnnotations.Schema; namespace ReC.Domain.Views; /// /// 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. /// [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 ProfileView? Profile { get; set; } public string? ProfileName { get; set; } public ProfileType? 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? EndpointAuthTypeName { get; set; } public string? EndpointAuthApiKey { get; set; } public string? EndpointAuthApiValue { get; set; } public ApiKeyLocation? EndpointAuthApiKeyAddTo { get; set; } public string? EndpointAuthApiKeyAddToName { 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 RestType? RestType { get; set; } public string? RestTypeName { get; set; } public string? PreprocessingQuery { get; set; } public string? HeaderQuery { get; set; } public string? BodyQuery { get; set; } public string? PostprocessingQuery { get; set; } public ErrorAction? ErrorAction { get; set; } public string? ErrorActionName { get; set; } }