2026-02-18 10:43:27 -05:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
|
|
namespace OTSSignsOrchestrator.Core.Models.DTOs;
|
|
|
|
|
|
|
|
|
|
public class CreateInstanceDto
|
|
|
|
|
{
|
|
|
|
|
[Required, MaxLength(100)]
|
|
|
|
|
public string CustomerName { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
/// <summary>Exactly 3 lowercase letters used to derive all resource names.</summary>
|
|
|
|
|
[Required, MaxLength(3), MinLength(3), RegularExpression("^[a-z]{3}$", ErrorMessage = "Abbreviation must be exactly 3 lowercase letters.")]
|
|
|
|
|
public string CustomerAbbrev { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
/// <summary>SSH host to deploy to.</summary>
|
|
|
|
|
public Guid? SshHostId { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>Pangolin Newt ID (optional — tunnel service excluded if not provided).</summary>
|
|
|
|
|
[MaxLength(500)]
|
|
|
|
|
public string? NewtId { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>Pangolin Newt Secret (optional — tunnel service excluded if not provided).</summary>
|
|
|
|
|
[MaxLength(500)]
|
|
|
|
|
public string? NewtSecret { get; set; }
|
|
|
|
|
|
|
|
|
|
// ── CIFS / SMB credentials (optional — falls back to global settings) ──
|
|
|
|
|
|
|
|
|
|
[MaxLength(200)]
|
|
|
|
|
public string? CifsServer { get; set; }
|
|
|
|
|
|
|
|
|
|
[MaxLength(500)]
|
2026-02-18 16:15:54 -05:00
|
|
|
public string? CifsShareName { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>Optional subfolder within the share (e.g. "ots_cms"). Omit to use the share root.</summary>
|
|
|
|
|
[MaxLength(500)]
|
|
|
|
|
public string? CifsShareFolder { get; set; }
|
2026-02-18 10:43:27 -05:00
|
|
|
|
|
|
|
|
[MaxLength(200)]
|
|
|
|
|
public string? CifsUsername { get; set; }
|
|
|
|
|
|
|
|
|
|
[MaxLength(500)]
|
|
|
|
|
public string? CifsPassword { get; set; }
|
|
|
|
|
|
|
|
|
|
[MaxLength(500)]
|
|
|
|
|
public string? CifsExtraOptions { get; set; }
|
|
|
|
|
}
|