package com.brframework.commoncms.core.layout.column;

import com.google.common.collect.Lists;
import com.brframework.commoncms.annatotion.column.TimeColumn;
import com.brframework.commoncms.core.layout.AbstractPanelLayoutColumn;
import lombok.Data;

import java.lang.reflect.Field;
import java.time.LocalTime;
import java.util.List;

/**
 * 时间
 * @author xu
 * @date 2018/9/26 15:03
 * @see TimeColumn
 */
@Data
public class LayoutTimeColumn extends AbstractPanelLayoutColumn {

    private static final String TYPE = "TIME";
    private String key;
    private String title;

    @Override
    public String getKey() {
        return key;
    }

    @Override
    public String getTitle() {
        return title;
    }

    @Override
    public String getType() {
        return TYPE;
    }

    @Override
    public void create(Field columnField) throws Throwable {
        init(columnField);
    }

    @Override
    public List<Class<?>> supportType() {
        return Lists.newArrayList(
                LocalTime.class
        );
    }

}
