package service;

/**
 * Service工厂类，用于获取各种Service的实例
 */
public class ServiceFactory {
    private static final StudentService studentService = new StudentService();
    private static final TeacherService teacherService = new TeacherService();
    private static final LeaveRequestService leaveRequestService = new LeaveRequestService();

    /**
     * 私有构造函数，防止实例化
     */
    private ServiceFactory() {
        // 私有构造函数，阻止实例化
    }

    /**
     * 获取StudentService实例
     * @return StudentService实例
     */
    public static StudentService getStudentService() {
        return studentService;
    }

    /**
     * 获取TeacherService实例
     * @return TeacherService实例
     */
    public static TeacherService getTeacherService() {
        return teacherService;
    }

    /**
     * 获取LeaveRequestService实例
     * @return LeaveRequestService实例
     */
    public static LeaveRequestService getLeaveRequestService() {
        return leaveRequestService;
    }
}
