-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
168 additions
and
167 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
common/src/main/scala/no/ndla/common/model/domain/myndla/ArenaGroup.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Part of NDLA common | ||
* Copyright (C) 2024 NDLA | ||
* | ||
* See LICENSE | ||
*/ | ||
|
||
package no.ndla.common.model.domain.myndla | ||
|
||
import com.scalatsi.TypescriptType.{TSLiteralString, TSUnion} | ||
import com.scalatsi.{TSNamedType, TSType} | ||
import enumeratum.* | ||
|
||
sealed trait ArenaGroup extends EnumEntry | ||
object ArenaGroup extends Enum[ArenaGroup] with CirceEnum[ArenaGroup] { | ||
case object ADMIN extends ArenaGroup | ||
override def values: IndexedSeq[ArenaGroup] = findValues | ||
|
||
implicit val enumTsType: TSNamedType[ArenaGroup] = | ||
TSType.alias[ArenaGroup]("ArenaGroup", TSUnion(values.map(e => TSLiteralString(e.entryName)))) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.