using Microsoft.EntityFrameworkCore;
using PARR.Domain.Constants;
using PARR.Domain.Entities.Base;
using PARR.Domain.Enums;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace PARR.Domain.Entities.Job
{
    [Table("GroupTypes", Schema = DatabaseSchemas.Job)]
    [Comment("Таблица типов групп работ")]
    public class JobGroupType : IBaseEntity
    {
        [Key]
        public Guid Id { get; set; }

        public DateTimeOffset DateCreated { get; set; }

        [NotMapped]
        public DateTimeOffset? DateModified { get; set; }

        public required JobGroupTypesEnum Code { get; set; }

        public required string Name { get; set; }

        public required string Description { get; set; }

        public ICollection<JobGroup> JobGroups { get; set; } = new HashSet<JobGroup>();
    }
}
