You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

28 lines
573 B

package com.example.user
import scala.concurrent.Future
import java.time.Instant
/**
* An implementation dependent DAO. This could be implemented by Slick, Cassandra, or a REST API.
*/
trait CarDAO {
def lookup(id: String): Future[Option[Car]]
def all: Future[Seq[Car]]
def update(user: Car): Future[Int]
def delete(id: String): Future[Int]
def create(user: Car): Future[Int]
def close(): Future[Unit]
}
/**
* Implementation independent aggregate root.
*/
case class Car(id: String, model: String, createdAt: Instant, updatedAt: Option[Instant])