{{#if entity.indexSubDE}}
package {{packageName}}.core.{{entity.module}}.mapping;

import org.mapstruct.*;
import {{packageName}}.core.{{entity.module}}.domain.{{entity.codeName}};
import {{packageName}}.core.{{entity.indexRelation.module}}.domain.{{entity.indexRelation.relEntity.codeName}};
import java.util.List;

@Mapper(componentModel = "spring", uses = {})
public interface {{entity.codeName}}InheritMapping {

    @Mappings({
            @Mapping(target ="focusNull",ignore = true),
        {{#each entity.indexRelation.lookup as |lookup|}}
            @Mapping(source ="{{camelCase lookup.codeName}}",target = "{{camelCase lookup.refCodeName}}"),
        {{/each}}
    })
    {{entity.indexRelation.relEntity.codeName}} to{{pascalCase entity.indexRelation.relEntity.codeName}}({{entity.codeName}} {{camelCase entity.codeName}});

    @Mappings({
            @Mapping(target ="focusNull",ignore = true),
        {{#each entity.indexRelation.lookup as |lookup|}}
            @Mapping(source ="{{camelCase lookup.refCodeName}}",target = "{{camelCase lookup.codeName}}"),
        {{/each}}
    })
    {{entity.codeName}} to{{pascalCase entity.codeName}}({{entity.indexRelation.relEntity.codeName}} {{camelCase entity.indexRelation.relEntity.codeName}});

    List<{{entity.indexRelation.relEntity.codeName}}> to{{pascalCase entity.indexRelation.relEntity.codeName}}(List<{{entity.codeName}}> list);

    List<{{entity.codeName}}> to{{pascalCase entity.codeName}}(List<{{entity.indexRelation.relEntity.codeName}}> list);

}
{{/if}}