class TaskRecurringSchedule {

    Task task
    Task lastGeneratedSubTask
    Period period

    Integer recurEvery
    Date startDate = new Date()
    Date lastGeneratedDate
    Date nextDueDate
    boolean isEnabled = true

//     static hasMany = []

    static belongsTo = [Task]

    static constraints = {
        lastGeneratedDate(blank:true, nullable:true)
        lastGeneratedSubTask(blank:true, nullable:true)
    }

    String toString() {
        "Recur every ${recurEvery} ${period}"
    }
}

