package jnpf.model.cultivate.vo.learn.info;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author: peng.hao
 * @create: 2024/9/13:18:39
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TimeDifference {

    private long hours;

    private long minutes;

    private long seconds;

    @Override
    public String toString() {
        if (hours == 0 && minutes == 0 && seconds == 0) {
            return "-";
        }
        if (hours == 0 && minutes == 0 && seconds > 0 ) {
            return seconds +"秒";
        }
        if (hours == 0 && minutes >0 && seconds >0) {
            return minutes +"分"+ seconds +"秒";
        }
        return   hours +"时"+ minutes +"分"+ seconds +"秒";
    }
}
