Domain Models
BiddingParticipant
Represents participants in public procurement bidding processes. Namespace:modelTable:
BiddingParticipants
Primary key
Unique reference code for participant tracking
true for individual, false for legal entityFull name or company name
National ID or Tax ID (NIT)
Landline phone number
Mobile phone number
Physical address
City of residence/operation
Contact email address
Registration timestamp
Filename of uploaded proposal PDF
Foreign key to Master (announcement/convocatoria)
Navigation property to related announcement
Category
Service categories for organizational offerings. Namespace:modelTable:
Categories
Primary key
Category display name
URL-friendly slug
HTML content describing the category
Cover image filename
Active/inactive status
Creation timestamp
Last modification timestamp
Descriptionfield marked with[AllowHtml]and[DataType(DataType.MultilineText)]
Document
Legal and official documents with file attachments. Namespace:modelTable:
Documents
Primary key
Document title
URL-friendly identifier
Associated project/announcement name
HTML description of document
Creation date
Last update date
Optional foreign key to Master
Navigation property to Master
Collection of attached files
Product
Services and products offered by the organization. Namespace:modelTable:
Products
Primary key
Product/service name
URL-friendly slug
Icon filename or CSS class
HTML description
Creation timestamp
PQRSD
Petitions, Complaints, Claims, Suggestions, and Congratulations. Namespace:modelTable:
PQRSDs
Primary key (unique identifier)
Name of submitter
Contact email
Subject/title of request
Detailed description (HTML)
Type: Petición, Queja, Reclamo, Sugerencia, Felicitación
Submission date
Optional attachment filename
Administrative response
Response status
Date of response
Employee
Organizational employees and staff members. Namespace:modelTable:
Employees
Primary key
Full name of employee
Employee photo filename
Job title or position
Record creation timestamp (auto-set in constructor)
Master
Multi-purpose polymorphic entity used for three distinct content types: blog posts, brigade events, and bidding announcements. The entity type is determined by Boolean flags. Namespace:modelTable:
Masters
Primary key
Title/name of the entry
URL-friendly slug generated from NameMaster
HTML content body (marked with
[AllowHtml] and [DataType(DataType.MultilineText)])Cover image filename (stored in different folders based on type)
Active/inactive status for display
Blog Post Properties
Set to
true for blog posts/news articlesAuthor name for blog posts
Brigade Event Properties
Set to
true for brigade/health campaign eventsScheduled date of the brigade event
Bidding Announcement Properties
Set to
true for public procurement announcementsBidding period start date
Bidding period end date
Audit Properties
Record creation timestamp
Last modification timestamp
Navigation Properties
Related bidding participants (when
NacionLicitante = true)File attachments directly linked to this Master entry
Related Document entities (additional documentation)
Entity Type Patterns
The Master table uses a Single Table Inheritance pattern where Boolean flags determine the entity type:Design Notes
The Master entity consolidates three content types into a single table. Only one of the Boolean flags (
Blog, Brigade, NacionLicitante) should be true per record.Cover images are stored in different folders based on entity type:
- Blog:
/images/blog/ - Brigade:
/images/brigade/ - NacionLicitante:
/images/nacionLicitante/
Deleting a Master entry cascades to:
- BiddingParticipants (for announcements)
- FileDocument (direct attachments)
- Documents (related documentation)
FileDocument
File attachment entity for linking PDF and other documents to Master entries or Document records. Supports multiple file attachments per parent entity. Namespace:modelTable:
FileDocuments
Primary key
Display name or title of the file
Physical filename stored on server (URL-friendly slug)
Optional Foreign Keys
Foreign key to Document entity (nullable)
Navigation property to parent Document
Foreign key to Master entity (nullable)
Navigation property to parent Master
Relationship Rules
A FileDocument can be attached to either a Document or a Master, but not both:Common Usage Scenarios
Bidding Announcement Files - Technical specifications, terms of reference, and annexes are attached to Master entries where
NacionLicitante = trueLegal Document Files - Statutes, resolutions, and official documents are attached to Document entities
Multiple Attachments - A single Document or Master can have multiple FileDocument entries, each representing a separate PDF
File Processing Flow
When creating FileDocument entries, the system:- Extracts the original filename from IFormFile
- Formats the filename to URL-friendly slug (removes spaces, special characters)
- Uploads the physical file to
/images/filesDocuments/folder - Creates FileDocument record with:
NameFile: Original or display nameRouteFile: Formatted filename on disk- Foreign key to parent entity
Deletion Cascade
When parent entities are deleted, FileDocument entries are removed along with physical files:Data Transfer Objects (DTOs)
BiddingParticipantCreateDTO
DTO for creating new bidding participants. Namespace:modelDTOs
Person type selection
Max 150 characters
Max 20 characters
Landline number
Max 10 characters
Max 150 characters
Max 50 characters
Must be valid email format
PDF file, max 10MB
Associated announcement ID
[PdfSizes]- Max 10MB[ValidateExtensionPDF]- Must be.pdf[EmailAddress]- Valid email format[Required]and[MaxLength]attributes on fields
CategoryCreateDto
DTO for creating service categories. Namespace:modelDTOs
Max 150 characters, no special characters
HTML content (multiline)
Image file (JPG, JPEG, GIF, PNG), max 2MB
Active status
[RegularExpression(@"^[-a-zA-Z0-9ñÑáéíóúáéíóúÁÉÍÓÚ ]{1,150}$")]- No special characters[ValidateExtensionImg]- Image formats only[ImageSizes]- Max 2MB
CategoryEditDto
DTO for updating categories. Namespace:modelDTOs
Category ID
Display name (read-only in edit)
Updated HTML content
New image (optional, keeps existing if null)
Active status
BlogCreateDto
DTO for creating blog posts. Namespace:modelDTOs
Blog post title
HTML content
Author name
Cover image (max 2MB)
DocumentCreateDTO
DTO for creating documents with multiple files. Namespace:modelDTOs
Document title
HTML description
Optional project association
Collection of PDF files to attach
Custom Validation Attributes
ImageSizes
Validates image file size. Location:modelDTOs.CustomValidationsMax Size: 2MB (2,097,152 bytes)
PdfSizes
Validates PDF file size. Location:modelDTOs.CustomValidationsMax Size: 10MB (10,485,760 bytes)
ValidateExtensionImg
Validates image file extensions. Allowed:.jpg, .jpeg, .gif, .png
ValidateExtensionPDF
Validates PDF file extension. Allowed:.pdf
Relationships
One-to-Many
One announcement can have multiple participants
One document can have multiple file attachments
One master entry can have multiple files
One master can be associated with multiple documents
Foreign Keys
Database Configuration
Entity configurations are located insrc/persistenDatabase/Config/:
BiddingParticipantConfig.csCategoryConfig.csDocumentConfig.csEmployeeConfig.csFileDocumentConfig.csMasterConfig.csPQRSDConfig.csProductConfig.cs
- Primary keys
- Foreign key relationships
- Column types and constraints
- Index definitions
- Default values