package it.enea.cruise.model.structure;

import java.util.HashMap;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnore;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
public class TableCommentDTO {

	
	private List<DescriptionDTO> description;
	
 	@JsonIgnore
	private HashMap<String, DescriptionDTO> descriptionOrdered = new HashMap<String, DescriptionDTO>();
	
	private String developerComments;
	private String crudCode;
	
	
	public void setDescription(List<DescriptionDTO> description) {
		this.description = description;
		for (DescriptionDTO td : description) {
			String language = td.getLang();
			descriptionOrdered.put(language, td);
		}
		
	}
	
}
