package com.ecep.contract.model;

import com.ecep.contract.ContractFileType;
import com.ecep.contract.vo.ContractFileTypeLocalVo;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 合同文件类型（多国语言支持）
 */
@Getter
@Setter
@Entity
@Table(name = "CONTRACT_FILE_TYPE_LOCAL")
@ToString(callSuper = true)
public class ContractFileTypeLocal extends BaseEnumEntity<ContractFileType> implements Voable<ContractFileTypeLocalVo> {
    /**
     * 建议的文件名
     */
    @Column(name = "SUGGEST_FILE_NAME")
    private String suggestFileName;

    @Column(name = "DESCRIPTION")
    private String description;

    @Override
    public ContractFileTypeLocalVo toVo() {
        ContractFileTypeLocalVo vo = new ContractFileTypeLocalVo();
        vo.setId(getId());
        vo.setLang(getLang());
        vo.setType(getType());
        vo.setValue(getValue());
        vo.setDescription(getDescription());
        vo.setSuggestFileName(suggestFileName);
        return vo;
    }
}
