using IRaCIS.Core.Domain.Share;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IRaCIS.Core.Domain.Models
{
    [Table("Dictionary")]
    public partial class Dictionary : Entity, IAuditUpdate, IAuditAdd
    {
        [JsonIgnore]
        public List<DoctorDictionary> DoctorDicRelationList { get; set; } = new List<DoctorDictionary>();

        public string ChildGroup { get; set; }

        public int ChildCodeEnum { get; set; }


        public DicDataTypeEnum DataTypeEnum { get; set; }


        [Column("Value")]
        public string Value { get; set; } = string.Empty;

        [Column("ValueCN")]
        public string ValueCN { get; set; } = string.Empty;


        [StringLength(512)]
        public string Description { get; set; } = string.Empty;

        public int ShowOrder { get; set; }


        public Guid UpdateUserId { get; set; }
        public DateTime UpdateTime { get; set; }
        public Guid CreateUserId { get; set; }
        public DateTime CreateTime { get; set; }


        public string Code { get; set; }

        public Guid? ParentId { get; set; }

        public bool IsEnable { get; set; }

        public Guid? ConfigTypeId { get; set; }

        [JsonIgnore]
        [ForeignKey("ConfigTypeId")]
        public Dictionary ConfigDictionary { get; set; }

        [JsonIgnore]
        [ForeignKey("ParentId")]
        public Dictionary Parent { get; set; }
        [JsonIgnore]
        public List<Dictionary> ChildList { get; set; } = new List<Dictionary>();




    }
}