Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
darkfrog26 committed May 2, 2024
1 parent 62324ce commit 7db5ca2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
13 changes: 0 additions & 13 deletions core/src/main/scala/lightdb/RecordDocumentCollection.scala

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package lightdb.model

import lightdb.{LightDB, RecordDocument}

abstract class RecordDocumentCollection[D <: RecordDocument[D]](collectionName: String, db: LightDB) extends Collection[D](collectionName, db) with RecordDocumentModel[D]
13 changes: 13 additions & 0 deletions core/src/main/scala/lightdb/model/RecordDocumentModel.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package lightdb.model

import cats.effect.IO
import fabric.Json
import lightdb.RecordDocument

trait RecordDocumentModel[D <: RecordDocument[D]] extends DocumentModel[D] {
override def preSetJson(json: Json, collection: AbstractCollection[D]): IO[Json] = IO {
json.modify("modified") { _ =>
System.currentTimeMillis()
}
}
}

0 comments on commit 7db5ca2

Please sign in to comment.