package com.trade.service.contract.service;


import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
@ConfigurationProperties(prefix = "contract.template")
public class ContractTemplateRepository {
    private Map<String, String> contractTemplates;

    public Map<String, String> getContractTemplates() {
        return contractTemplates;
    }

    public void setContractTemplates(Map<String, String> contractTemplates) {
        this.contractTemplates = contractTemplates;
    }

    public String getContractTemplateByCode(String code) {
        return contractTemplates.get(code);
    }
}
