<commit_before>package com.robocubs4205.cubscout.model.scorecard

/**
  * Created by trevor on 7/29/17.
  */
case class Scorecard(id: Long, gameId: Long)

sealed trait ScorecardSection {
  def id: Long

  def scorecardId: Long

  def index: Long

  def discriminator: String
}

sealed trait FieldSection extends ScorecardSection{
  def fieldType: FieldType
  final override val discriminator = "field"
  def isOptional:Boolean
}

final case class RequiredFieldSection(id: Long, scorecardId: Long, index: Long, fieldType: FieldType)
  extends FieldSection {
  override val isOptional = false
}

final case class OptionalFieldSection(id: Long, scorecardId: Long, index: Long, fieldType: FieldType,nullWhen:NullWhen,
                                checkboxMessage:String)
  extends FieldSection{
  override val isOptional = true
}

final case class ParagraphSection(id:Long,scorecardId:Long,index:Long,text:String) extends ScorecardSection{
  override def discriminator: String = "paragraph"
}

final case class TitleSection(id:Long,scorecardId:Long,index:Long,text:String) extends ScorecardSection{
  override def discriminator: String = "title"
}

sealed trait FieldType {

  case class Count() extends FieldType

  case class Rating() extends FieldType

  case class Boolean() extends FieldType

}


sealed trait NullWhen {

  case class Checked() extends NullWhen

  case class UnChecked() extends NullWhen

}
<commit_msg>Cleanup Scorecard-related classes, rename fieldType to `type`, add label field to FieldSection<commit_after>package com.robocubs4205.cubscout.model.scorecard

/**
  * Created by trevor on 7/29/17.
  */
case class Scorecard(id: Long, gameId: Long)

sealed trait ScorecardSection {
  def id: Long

  def scorecardId: Long

  def index: Long

  def discriminator: String
}

sealed trait FieldSection extends ScorecardSection{
  def `type`: FieldType
  final override val discriminator = "field"
  def isOptional:Boolean
  def label:String
}

final case class RequiredFieldSection(id: Long,
                                      scorecardId: Long,
                                      index: Long,
                                      `type`: FieldType,
                                      label:String)
  extends FieldSection {
  override val isOptional = false
}

final case class OptionalFieldSection(id: Long,
                                      scorecardId: Long,
                                      index: Long,
                                      `type`: FieldType,
                                      label:String,
                                      nullWhen:NullWhen,
                                      checkboxMessage:String)
  extends FieldSection{
  override val isOptional = true
}

final case class ParagraphSection(id:Long,scorecardId:Long,index:Long,text:String) extends ScorecardSection{
  override def discriminator: String = "paragraph"
}

final case class TitleSection(id:Long,scorecardId:Long,index:Long,text:String) extends ScorecardSection{
  override def discriminator: String = "title"
}

sealed trait FieldType

object FieldType{
  case object Count extends FieldType

  case object Rating extends FieldType

  case object Boolean extends FieldType
}


sealed trait NullWhen
object NullWhen{
  case object Checked extends NullWhen

  case object UnChecked extends NullWhen
}

{'fraction_non_alphanumeric': 0.0652890086852351, 'fraction_numerical': 0.005390835579514825, 'mean_word_length': 2.8346727898966706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4630273', 'n_tokens_mistral': 917, 'n_tokens_neox': 875, 'n_words': 282}