concept domain model in category scala

appears as: domain models, domain models, domain model
Scala in Action

This is an excerpt from Manning's book Scala in Action.

The build.scala file declares all the dependences and settings you need to start working on the Akkaoogle project. Once all the dependencies are downloaded you’re ready to implement the Akkaoogle application. The next section builds the domain models you need to implement the internal vendor service. I test drove most of the application, but I won’t show you test cases here. I encourage you to go through the test cases in this chapter’s accompanying codebase. Even better, write tests for the code used throughout the rest of the chapter.

12.3.3. Implementing the domain models

You need a way to implement the products provided by internal vendors and also a model that represents external vendors. To reduce duplication between domain models, create a common trait called Model that extends the KeyedEntity trait provided by Squeryl. This trait provides an id field that acts as a primary key in the database for all the domain models: