Source

Texa / grails-app / domain / com / koyanainc / bc / TodoItem.groovy

package com.koyanainc.bc

class TodoItem {

    String content
    Integer listPosition = 0

    Date createdOn
    Date completedOn

    //Integer creator
    Person creator
    Person completer
    ResponsibleParty responsibleParty

    Boolean completed = false
    Integer commentsCount = 0

    static belongsTo = [todoList:TodoList]

    static constraints = {

        listPosition(nullable:true)
        commentsCount(min:0)

        responsibleParty(nullable:true)
        completedOn(nullable:true)

        completer(nullable:true)
    }

    static mapping = {
        id generator: 'assigned'

    }

}