Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
RawToast committed Nov 18, 2023
1 parent 35b5c32 commit eac74f6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
24 changes: 20 additions & 4 deletions src/main/scala/hygiene/domain/Authority.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,26 @@ case class Authority(name: String, id: Int, establishments: Int)
object Authority:
given Codec[Authority] = deriveCodec

enum AuthorityRating:
enum EstablishmentRatings:
case Standard(five: Int, four: Int, three: Int, two: Int, one: Int, zero: Int, exempt: Int)
case Scottish(pass: Int, improvementRequired: Int, exempt: Int)
case Exempt(count: Int)

object AuthorityRating:
given Codec[AuthorityRating] = deriveCodec
object EstablishmentRatings:
given Codec[EstablishmentRatings] = deriveCodec

enum RatingSummary:
case Standard(
five: String,
four: String,
three: String,
two: String,
one: String,
zero: String,
exempt: String
)
case Scottish(pass: String, improvementRequired: String, exempt: String)

object RatingSummary:
given Codec[RatingSummary] = deriveCodec

case class AuthoritySummary(name: String, ratings: RatingSummary)
2 changes: 1 addition & 1 deletion src/main/scala/hygiene/routes/AuthorityController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ object AuthorityController:
def apply[F[_]](using ev: Routes[F]): Routes[F] = ev

def impl[F[_]: Monad](
// ev: HygieneRatings[F],
ev: HygieneRatings[F],
authorityService: AuthorityService[F]
): Routes[F] = new Routes[F]:
val dsl = new Http4sDsl[F] {}
Expand Down

0 comments on commit eac74f6

Please sign in to comment.