All checks were successful
BCards Deployment Pipeline / Run Tests (push) Successful in 4s
BCards Deployment Pipeline / PR Validation (push) Has been skipped
BCards Deployment Pipeline / Build and Push Image (push) Successful in 15m22s
BCards Deployment Pipeline / Deploy to Production (ARM - OCI) (push) Successful in 1m54s
BCards Deployment Pipeline / Deploy to Test (x86 - Local) (push) Has been skipped
BCards Deployment Pipeline / Cleanup Old Resources (push) Has been skipped
BCards Deployment Pipeline / Deployment Summary (push) Successful in 0s
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
50 lines
1.8 KiB
C#
50 lines
1.8 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace BCards.Web.ViewModels;
|
|
|
|
public class CreatePageViewModel
|
|
{
|
|
[Required(ErrorMessage = "Nome é obrigatório")]
|
|
[StringLength(50, ErrorMessage = "Nome deve ter no máximo 50 caracteres")]
|
|
public string DisplayName { get; set; } = string.Empty;
|
|
|
|
[Required(ErrorMessage = "Categoria é obrigatória")]
|
|
public string Category { get; set; } = string.Empty;
|
|
|
|
[Required(ErrorMessage = "Tipo de negócio é obrigatório")]
|
|
public string BusinessType { get; set; } = "individual";
|
|
|
|
[StringLength(200, ErrorMessage = "Bio deve ter no máximo 200 caracteres")]
|
|
public string Bio { get; set; } = string.Empty;
|
|
|
|
[Required(ErrorMessage = "Tema é obrigatório")]
|
|
public string SelectedTheme { get; set; } = "minimalist";
|
|
|
|
public string WhatsAppNumber { get; set; } = string.Empty;
|
|
|
|
public string FacebookUrl { get; set; } = string.Empty;
|
|
|
|
public string TwitterUrl { get; set; } = string.Empty;
|
|
|
|
public string InstagramUrl { get; set; } = string.Empty;
|
|
|
|
public List<CreateLinkViewModel> Links { get; set; } = new();
|
|
|
|
public string Slug { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class CreateLinkViewModel
|
|
{
|
|
[Required(ErrorMessage = "Título é obrigatório")]
|
|
[StringLength(50, ErrorMessage = "Título deve ter no máximo 50 caracteres")]
|
|
public string Title { get; set; } = string.Empty;
|
|
|
|
[Required(ErrorMessage = "URL é obrigatória")]
|
|
[Url(ErrorMessage = "URL inválida")]
|
|
public string Url { get; set; } = string.Empty;
|
|
|
|
[StringLength(100, ErrorMessage = "Descrição deve ter no máximo 100 caracteres")]
|
|
public string Description { get; set; } = string.Empty;
|
|
|
|
public string Icon { get; set; } = string.Empty;
|
|
} |