Skip to content

Commit

Permalink
Merge pull request #964 from gemini-hlsw/workflow-classes
Browse files Browse the repository at this point in the history
move workflow classes into core
  • Loading branch information
tpolecat authored Oct 24, 2024
2 parents 1e91fd9 + 89cb92c commit 349c2d0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright (c) 2016-2023 Association of Universities for Research in Astronomy, Inc. (AURA)
// For license information see LICENSE or https://opensource.org/licenses/BSD-3-Clause

package lucuma.core.enums

import lucuma.core.util.Enumerated

enum ObservationWorkflowState(val tag: String) derives Enumerated:
case Inactive extends ObservationWorkflowState("inactive")
case Undefined extends ObservationWorkflowState("undefined")
case Unapproved extends ObservationWorkflowState("unapproved")
case Defined extends ObservationWorkflowState("defined")
case Ready extends ObservationWorkflowState("ready")
case Ongoing extends ObservationWorkflowState("ongoing")
case Completed extends ObservationWorkflowState("completed")



Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) 2016-2023 Association of Universities for Research in Astronomy, Inc. (AURA)
// For license information see LICENSE or https://opensource.org/licenses/BSD-3-Clause

package lucuma.core.model

import cats.Eq
import cats.derived.*
import io.circe.Codec
import lucuma.core.enums.ObservationWorkflowState

final case class ObservationWorkflow(
state: ObservationWorkflowState,
validTransitions: List[ObservationWorkflowState],
validationErrors: List[ObservationValidation]
) derives Codec, Eq

0 comments on commit 349c2d0

Please sign in to comment.