PortBlog.API/PortBlog.API/Entities/Message.cs
Bangara Raju Kottedi 3a7edb23c7 Add JWT, OTP, and caching features
Upgraded projects to .NET 9.0 and added new projects `KBR.Cache`, `KBR.Shared`, and `KBR.Shared.Lite` to the solution. Introduced JWT authentication and OTP handling with new models, services, and configuration options. Updated database schema with new entities `Users` and `RefreshTokens`, and added migrations for schema changes. Implemented caching strategies using `AppDistributedCache` with support for in-memory, SQL Server, and Redis. Enhanced email handling with `MailHelpers` for domain replacement. Updated controllers, repositories, and configuration files to support new features.
2025-11-22 06:52:59 +05:30

43 lines
1.1 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PortBlog.API.Entities
{
public class Message
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
[Required]
[MaxLength(50)]
public string Name { get; set; } = string.Empty;
[Required]
[EmailAddress]
[MaxLength(100)]
public string FromEmail { get; set; } = string.Empty;
[Required]
[EmailAddress]
[MaxLength(100)]
public string ToEmail { get; set; } = string.Empty;
[Required]
[MaxLength(50)]
public string Subject { get; set; } = string.Empty;
[Required]
public string Content { get; set; } = string.Empty;
public int SentStatus { get; set; } = 0;
public DateTime CreatedDate { get; set; } = DateTime.Now;
public int CandidateId { get; set; }
[ForeignKey(nameof(CandidateId))]
public Candidate? Candidate { get; set; }
}
}