Skip to main content

Overview

The DirectorTecnico entity represents a technical director (coach) in the tournament management system. Each technical director can be assigned to multiple teams and contains personal information including name, identification document, and contact details.

Properties

int
Unique identifier for the technical director.
string
required
Full name of the technical director.Validation Rules:
  • Required field (cannot be empty)
  • Must contain only letters, spaces, and periods
  • Minimum length: 3 characters
  • Maximum length: 30 characters
  • Cannot start or end with whitespace
  • Regex pattern: ^(?!^\s)(?!.*\s$)[a-zA-ZÀ-ÿ\s\.]+$
Display Name: “Nombre del D.T.”Error Messages:
  • Pattern mismatch: “Valor Incorrecto. Ingrese solo letras”
  • Required: “El nombre del D.T es obligatorio.”
  • Max length: “El nombre no puede contener más de 30 caracteres”
  • Min length: “El nombre no puede contener menos de 3 caracteres”
string
required
Identification document number of the technical director.Validation Rules:
  • Required field (cannot be empty)
  • Must contain only numbers (no periods or spaces)
  • Minimum length: 7 characters
  • Maximum length: 11 characters
  • Cannot be all zeros
  • Cannot contain only repeated digits
  • Regex pattern: ^(?!0+$|(\d)\1+$|(\d)(?:\d\1)+$)\d{7,11}$
Display Name: “Documento del D.T. (Sin puntos ni espacios)”Error Messages:
  • Pattern mismatch: “Valor Incorrecto. Ingrese un documento valido(Solo números sin puntos ni espacios. Min.7 Max. 11.No se permite el mismo número repetido unicamente.)”
  • Required: “El documento del D.T es obligatorio.”
  • Max length: “El documento no puede contener más de 11 caracteres”
  • Min length: “El documento no puede contener menos de 7 caracteres”
string
required
Contact phone number of the technical director.Validation Rules:
  • Required field (cannot be empty)
  • Minimum length: 7 characters
  • Maximum length: 12 characters
  • Can contain digits, parentheses, plus signs, spaces, and hyphens
  • Cannot contain only repeated digits
  • Regex pattern: ^(?!^(\d)\1+$)[\d()+\s\-]{7,12}$
Display Name: “Teléfono del D.T.”Error Messages:
  • Pattern mismatch: “Valor Incorrecto. Ingrese un teléfono valido(Minimo 7-Maximo 12 digitos). No se permite repetir el mismo numero”
  • Required: “El teléfono del D.T es obligatorio.”
  • Max length: “El teléfono no puede contener más de 12 caracteres”
  • Min length: “El teléfono no puede contener menos de 7 caracteres”
List<Equipo>
Collection of teams associated with this technical director.Default Value: Empty listRelationship: One-to-Many (One technical director can coach multiple teams)

Relationships

Teams (Equipos)

List<Equipo>
A technical director can be associated with multiple teams. This is a one-to-many relationship where the technical director is the parent entity.Navigation Property: EquiposRelated Entity: Equipo

Validation Attributes

The DirectorTecnico entity uses the following Data Annotations for validation:
  • [Required] - Ensures all fields (Nombre, Documento, Telefono) are mandatory
  • [RegularExpression] - Validates format using complex regex patterns
  • [MaxLength] / [MinLength] - Enforces character length constraints
  • [Display] - Provides user-friendly display names
  • [DisplayFormat] - Configures empty string handling

Code Examples

Entity Definition

Creating a Technical Director

Valid Examples

Invalid Examples

These examples will fail validation:

Database Mapping

The DirectorTecnico entity is mapped to a database table with the same name. The Id property serves as the primary key and is auto-generated.
  • Equipo - Teams coached by this technical director
  • Jugador - Players indirectly related through teams
  • Municipio - Municipalities where teams are located