class TaskRecurringSchedule { Task lastGeneratedSubTask Period period Integer recurEvery = 1 Date startDate = new Date() Date lastGeneratedDate Date nextDueDate boolean isEnabled = true // static hasMany = [] static belongsTo = [task: Task] static constraints = { lastGeneratedDate(blank:true, nullable:true) lastGeneratedSubTask(blank:true, nullable:true) } String toString() { "Recur every ${recurEvery} ${period}" } }