Lotto: refactor, each rule manage its own db data