32 lines
767 B
C#
32 lines
767 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace PortBlog.API.Entities
|
|
{
|
|
public class Hobby : BaseEntity
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int HobbyId { get; set; }
|
|
|
|
[Required]
|
|
[MaxLength(100)]
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
[MaxLength(500)]
|
|
public string Description { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
public int Order { get; set; }
|
|
|
|
[MaxLength(50)]
|
|
public string? Icon { get; set; }
|
|
|
|
public int ResumeId { get; set; }
|
|
|
|
[ForeignKey(nameof(ResumeId))]
|
|
public Resume? Resume { get; set; }
|
|
}
|
|
}
|