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.
 
 
 
 
 

30 lines
663 B

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