package com.yutou.napcat.handle;

import com.yutou.qqbot.utlis.ConfigTools;
import lombok.Data;

public class Record extends BaseHandle<Record.RecordInfo> {

    public Record() {
        super("record");
    }

    public Record(String file) {
        super("record");
        data = new RecordInfo(file);
    }

    public Record(String file, boolean proxy) {
        super("record");
        data = new RecordInfo(file);
        data.proxy = proxy ? "1" : "0";
    }


    @Data
    public static class RecordInfo {
        String file;
        int magic;
        String url;
        String cache;
        String proxy;
        String timeout;

        public RecordInfo(String file) {
            this.file = ConfigTools.getServerUrl()+file;
        }

    }
}
