using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace DigitalData.UserManager.Domain.Entities
{
    [Table("TBDD_GROUPS_USER", Schema = "dbo")]
    public class GroupOfUser : BaseEntity
    {
        [Required]
        [Column("USER_ID")]
        public int UserId { get; set; }

        [Required]
        [Column("GROUP_ID")]
        public int GroupId { get; set; }

        [StringLength(200)]
        public string? Comment { get; set; }

        [ForeignKey("UserId")]
        public virtual User? User { get; set; }

        [ForeignKey("GroupId")]
        public virtual Group? Group { get; set; }
    }
}
