package cn.ey.biz.module.external.api.fd.feign.reqdto;

import java.util.List;

import cn.ey.biz.module.external.api.fd.feign.reqdto.CommonRequest.OperationInfo;
import cn.ey.biz.module.external.api.fd.feign.reqdto.ExternalEngmentRequest.Operate;
import lombok.Data;

@Data
public class ExternalEngmentRoleRequest {
	
	private String datajson;
	
	@Data
	public static class ExternalEngmentRoleDataJson extends CommonRequest {

		List<EngmentRoleInfo> data;
			
	}
	
	@Data
	public static class EngmentRoleInfo{
		
		private OperationInfo operationinfo;	
		
		private ExternalEngmentRoleReqMainTable mainTable;
		
		private List<Detail1Record> detail1;
		
		/**
		 * 人员
		 */
		private List<RoleRecord> detail2;
		
		/**
		 * 
		 */
		private List<RoleRecord> detail4;
		
		/**
		 * 活动
		 */
		private List<ActivityRecord> detail3;

	}
	
	@Data
	public static class ExternalEngmentRoleReqMainTable {
		
		//项目编号	engagement_code	varchar(10)	mainTable	
		private String engagement_code;
		
		//项目编号	engagement_code	varchar(10)	mainTable	
		private String engagement_code1;
			
	}
	
//	@Data
//	public static class Operate {
//		/**
//		 * SaveOrUpdate 新增或修改/Save 新增/Update 修改/Delete 删
//		 */
//		private String action;
//		
//		/**
//		 * SaveOrUpdate 新增或修改/Save 新增/Update 修改/Delete 删
//		 */
//		private String actionDescribe;
//	}
	
	@Data
	public static class Detail1Record {
		
		private Operate operate;
		
		private Detail1Data data;

	}
	
	@Data
	public static class ActivityRecord {
		
		private Operate operate;
		
		private Activity data;	

	}
	
	@Data
	public static class RoleRecord {
		
		private Operate operate;
		
		private Role data;

	}
	
	@Data
	public static class Detail1Data {

	}
	
	@Data
	public static class Activity {
		
		//id	id	int	detail3		是	
		private Long id;
		
		//活动编号	activity	varchar(255)	detail3	
		private String activity;
		
		//活动描述 varchar(255)
		private String activity_description;

	}
	
	@Data
	public static class Role {
		
		//id	id	int	detail2		是	
		private Long id;
		
		//人员角色	role	varchar(255)	detail2	
		private String role;
		
		//人员GPN	role_gpn	varchar(255)	detail2		
		private String role_gpn;
		
		//是否有效	sfyx	int(11)	detail2			枚举：[0:否,1:是]
	    private String sfyx;
	    
	    /**生效日期	sxsj1	char(10)		传入格式：yyyy-MM-dd*/
	    private String sxsj1;
	    
	    /**失效日期	sxsj2	char(10)	detail4			传入格式：yyyy-MM-dd*/
	    private String sxsj2;
	  
	}
	
	


}
