package com.njcn.filesync.config;

import lombok.Data;

/**
 * Description:
 * Date: 2025/10/16  下午 2:57【需求编号】
 *
 * @author clam
 * @version V1.0.0
 */
@Data
public class ServerConfig {

    private String host;
    private int port = 22;
    private String username;
    private String password;
    private String privateKeyPath;
    private String basePath;
    private String serverType; // "windows" 或 "linux"

    public boolean isWindows() {
        return "windows".equalsIgnoreCase(serverType);
    }

    public boolean usePasswordAuth() {
        return password != null && !password.trim().isEmpty();
    }

    public boolean useKeyAuth() {
        return privateKeyPath != null && !privateKeyPath.trim().isEmpty();
    }
}
