Run pre-commit.
All checks were successful
/ Build and Test Application Snapshot (pull_request) Successful in 1m10s

This commit is contained in:
Pat Garrity 2024-05-19 12:56:21 -05:00
parent ea3fa65e4b
commit b261d0b6df
Signed by: pfm
GPG key ID: 5CA5D21BAB7F3A76
4 changed files with 54 additions and 52 deletions

View file

@ -1,22 +1,22 @@
package gs.smolban.model
import java.time.Instant
import cats.Show
import java.time.Instant
/**
* Describes an instant at which something was created. Opaque type for
/** Describes an instant at which something was created. Opaque type for
* `java.time.Instant`.
*/
opaque type CreatedAt = Instant
object CreatedAt:
/**
* Instantiate a new [[CreatedAt]].
*
* @param timestamp The underlying timestamp.
* @return The new instance.
*/
/** Instantiate a new [[CreatedAt]].
*
* @param timestamp
* The underlying timestamp.
* @return
* The new instance.
*/
def apply(timestamp: Instant): CreatedAt = timestamp
given CanEqual[CreatedAt, CreatedAt] = CanEqual.derived
@ -24,11 +24,11 @@ object CreatedAt:
given Show[CreatedAt] = _.toInstant().toString()
extension (createdAt: CreatedAt)
/**
* Unwrap this value.
*
* @return The underlying `Instant` value.
*/
/** Unwrap this value.
*
* @return
* The underlying `Instant` value.
*/
def toInstant(): Instant = createdAt
end CreatedAt

View file

@ -1,16 +1,18 @@
package gs.smolban.model
import gs.uuid.v0.UUID
import gs.slug.v0.Slug
import cats.Show
import gs.slug.v0.Slug
import gs.uuid.v0.UUID
/**
* Groups are the basic unit of organization in Smolban. Each [[Ticket]]
/** Groups are the basic unit of organization in Smolban. Each [[Ticket]]
* belongs to a single `Group`.
*
* @param id The unique identifier for the group.
* @param slug The unique slug for the group.
* @param createdAt The instant at which this group was created.
* @param id
* The unique identifier for the group.
* @param slug
* The unique slug for the group.
* @param createdAt
* The instant at which this group was created.
*/
case class Group(
id: Group.Id,
@ -20,19 +22,19 @@ case class Group(
object Group:
/**
* Unique identifier for a [[Group]]. This is an opaque type for a UUID.
*/
/** Unique identifier for a [[Group]]. This is an opaque type for a UUID.
*/
opaque type Id = UUID
object Id:
/**
* Instantiate a new [[Group.Id]].
*
* @param id The underlying UUID.
* @return The new [[Group.Id]] instance.
*/
/** Instantiate a new [[Group.Id]].
*
* @param id
* The underlying UUID.
* @return
* The new [[Group.Id]] instance.
*/
def apply(id: UUID): Id = id
given CanEqual[Id, Id] = CanEqual.derived
@ -40,11 +42,11 @@ object Group:
given Show[Id] = _.toUUID().withoutDashes()
extension (id: Id)
/**
* Unwrap this Group ID.
*
* @return The underlying UUID value.
*/
/** Unwrap this Group ID.
*
* @return
* The underlying UUID value.
*/
def toUUID(): UUID = id
end Id

View file

@ -10,21 +10,21 @@ case class Ticket(
object Ticket:
/**
* Unique identifier - relative to some [[Group]] - for a [[Ticket]]. This is
* an opaque type for a Long. In general, [[Ticket]] identifiers are sequences
* within a group.
*/
/** Unique identifier - relative to some [[Group]] - for a [[Ticket]]. This is
* an opaque type for a Long. In general, [[Ticket]] identifiers are
* sequences within a group.
*/
opaque type Id = Long
object Id:
/**
* Instantiate a new [[Ticket.Id]].
*
* @param id The underlying Long.
* @return The new [[Ticket.Id]] instance.
*/
/** Instantiate a new [[Ticket.Id]].
*
* @param id
* The underlying Long.
* @return
* The new [[Ticket.Id]] instance.
*/
def apply(id: Long): Id = id
given CanEqual[Id, Id] = CanEqual.derived
@ -32,11 +32,11 @@ object Ticket:
given Show[Id] = _.toLong().toString()
extension (id: Id)
/**
* Unwrap this Ticket ID.
*
* @return The underlying Long value.
*/
/** Unwrap this Ticket ID.
*
* @return
* The underlying Long value.
*/
def toLong(): Long = id
end Id