
//--------------------------------------------------------------------
//	   生成时间 2022-03-21 17:13:43 
//     对此文件的更改可能会导致不正确的行为，并且如果重新生成代码，这些更改将会丢失。
using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
	///<summary>
	///DataInspection
	///</summary>
	[Table("DataInspection")]
	public class DataInspection : Entity, IAuditAdd
	{

		/// <summary>
		/// 创建时间
		/// </summary>
		public DateTime CreateTime { get; set; }

		/// <summary>
		/// 创建用户ID
		/// </summary>
		public Guid CreateUserId { get; set; }



		/// <summary>
		/// 项目iD
		/// </summary>
		
		public Guid? TrialId { get; set; }

		/// <summary>
		/// 中心
		/// </summary>
		public Guid? SiteId { get; set; }

		/// <summary>
		/// 受试者
		/// </summary>
		public Guid? SubjectId { get; set; }

		/// <summary>
		/// 访视
		/// </summary>
		public Guid? SubjectVisitId { get; set; }


		public Guid? VisitTaskId { get; set; }

		public VisitTask VisitTask { get; set; }

		/// <summary>
		/// IP地址
		/// </summary>
		public string IP { get; set; } = string.Empty;

		/// <summary>
		/// 修改原因
		/// </summary>
		[Required]
		public string Reason { get; set; } = string.Empty;

		/// <summary>
		/// 是否有签名
		/// </summary>
		public bool IsSign { get; set; }

		/// <summary>
		/// 签名ID
		/// </summary>
		public Guid? SignId { get; set; }

		/// <summary>
		/// 父类ID
		/// </summary>

		public Guid? ParentId { get; set; }

		/// <summary>
		/// 子类
		/// </summary>
		public Guid? ChildrenTypeId { get; set; }
		/// <summary>
		/// 对象类型
		/// </summary>
		public Guid? ObjectTypeId { get; set; }

		/// <summary>
		/// 操作类型
		/// </summary>
		public Guid? OptTypeId { get; set; }

		/// <summary>
		/// 功能模块
		/// </summary>
		public Guid? ModuleTypeId { get; set; }


		/// <summary>
		/// Json 对象
		/// </summary>

		public string JsonDetail { get; set; } = string.Empty;

		/// <summary>
		/// 创建人名称
		/// </summary>
		public string CreateUserName { get; set; } = string.Empty;

		public string CreateUserRealName { get; set; } = string.Empty;
		/// <summary>
		/// 角色名称
		/// </summary>
		public string RoleName { get; set; } = string.Empty;



		/// <summary>
		/// 标识
		/// </summary>
		public string Identification { get; set; } = string.Empty;


		/// <summary>
		/// 稽查的对象Id 
		/// </summary>
		public Guid? GeneralId { get; set; }



		/// <summary>
		/// 批次Id
		/// </summary>
		public Guid BatchId { get; set; }


		/// <summary>
		/// 稽查对象，关联的父对象Id
		/// </summary>
		public Guid? ObjectRelationParentId { get; set; }

		public Guid? ObjectRelationParentId2 { get; set; }

		public Guid? ObjectRelationParentId3 { get; set; }


		public string EntityName { get; set; }


		public Guid? TrialReadingCriterionId { get; set; }

		public Guid? DoctorUserId { get; set; }

        [ForeignKey("TrialReadingCriterionId")]
		public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; }

	}



}
