package net.northking.cctp.element.datetime;

import net.northking.cctp.element.core.AbstractLibrary;
import net.northking.cctp.element.core.annotation.Library;
import net.northking.cctp.element.core.type.LibraryConstant;
import net.northking.cctp.element.util.Javadoc2Libdoc;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * <p>这是一个用于处理日期和时间的测试组件库。</p>
 * 日期&时间组件库是平台基本库，支持创建和转换日期（例如：getDate），以及使用它们进行简单计算（例如：addTimeToDate）。
 */
@Library(scanBasePackage = "net.northking.cctp.element.datetime", infoClass = DateTimeLibrary.class)
public class DateTimeLibrary extends AbstractLibrary {

    private static final Logger logger = LoggerFactory.getLogger(DateTimeLibrary.class);
    private static final Javadoc2Libdoc JAVA_DOC_2_LIB_DOC = new Javadoc2Libdoc(DateTimeLibrary.class);
    private static final String NAME = "NK.DateTime";
    private static final String VERSION = "2.2";
    private static final String CH_NAME = "日期组件库";
    private static final Integer TYPE = LibraryConstant.LIB_TYPE_COMMON;

    @Override
    public String getName() {
        return NAME;
    }

    /**
     * 库中文名称
     */
    @Override
    public String getChName() {
        return CH_NAME;
    }

    @Override
    public String getVersion() {
        return VERSION;
    }

    /**
     * 组件库类别
     */
    @Override
    public Integer getType() {
        return TYPE;
    }

    @Override
    public Javadoc2Libdoc getLibDoc() {
        return JAVA_DOC_2_LIB_DOC;
    }

    @Override
    public void destroy() {
        logger.info("destroy done.");
    }
}