diff --git a/.bsp/sbt.json b/.bsp/sbt.json new file mode 100644 index 00000000..2143a223 --- /dev/null +++ b/.bsp/sbt.json @@ -0,0 +1 @@ +{"name":"sbt","version":"1.9.7","bspVersion":"2.1.0-M1","languages":["scala"],"argv":["/usr/lib/jvm/java-17-amazon-corretto/bin/java","-Xms100m","-Xmx100m","-classpath","/home/jcole/.cache/sbt/boot/sbt-launch/1.9.7/sbt-launch-1.9.7.jar","-Dsbt.script=/usr/bin/sbt","xsbt.boot.Boot","-bsp"]} \ No newline at end of file diff --git a/app/com/coleji/neptune/API/CacheableResult.scala b/app/com/coleji/neptune/API/CacheableResult.scala index 61329c41..6c51b3f0 100644 --- a/app/com/coleji/neptune/API/CacheableResult.scala +++ b/app/com/coleji/neptune/API/CacheableResult.scala @@ -102,12 +102,10 @@ trait CacheableResult[T <: ParamsObject, U] { CacheableResult.resultMap.remove(cacheKey) } }) - p.future.onFailure({ - case _: Throwable => { - CacheableResult.waiting(cacheKey) -= p - if (CacheableResult.waiting(cacheKey).isEmpty) { - CacheableResult.resultMap.remove(cacheKey) - } + p.future.failed.foreach(e => { + CacheableResult.waiting(cacheKey) -= p + if (CacheableResult.waiting(cacheKey).isEmpty) { + CacheableResult.resultMap.remove(cacheKey) } }) p.future @@ -129,11 +127,9 @@ trait CacheableResult[T <: ParamsObject, U] { println("done son; completing all queued") result })) - p.future.onFailure({ - case _: Throwable => { - println("Failure detected; cleaning up") - CacheableResult.inUse.remove(cacheKey) - } + p.future.failed.foreach(e => { + println("Failure detected; cleaning up") + CacheableResult.inUse.remove(cacheKey) }) p.future } diff --git a/app/com/coleji/neptune/API/ResultError.scala b/app/com/coleji/neptune/API/ResultError.scala index 05bbc815..d6c83229 100644 --- a/app/com/coleji/neptune/API/ResultError.scala +++ b/app/com/coleji/neptune/API/ResultError.scala @@ -13,7 +13,7 @@ case class ResultError ( case class ParseError( code: String, message: String, - parseErrors: Seq[(String, Seq[String])] + parseErrors: collection.Seq[(String, collection.Seq[String])] ) { implicit val format = Json.format[ParseError] def asJsObject: JsObject = JsObject(Map("error" -> Json.toJson(this))) @@ -37,7 +37,7 @@ object ResultError { message="JSON parameters were not correct." ) - val PARSE_FAILURE: Seq[(JsPath, Seq[JsonValidationError])] => JsObject = (errors: Seq[(JsPath, Seq[JsonValidationError])]) => ParseError( + val PARSE_FAILURE: collection.Seq[(JsPath, collection.Seq[JsonValidationError])] => JsObject = (errors: collection.Seq[(JsPath, collection.Seq[JsonValidationError])]) => ParseError( code="parse_failure", message="Request was not valid.", parseErrors=errors.map(t => (t._1.toString(), t._2.flatMap(errs => errs.messages))) diff --git a/app/com/coleji/neptune/Core/Boot/ServerBootLoader.scala b/app/com/coleji/neptune/Core/Boot/ServerBootLoader.scala index 1f4926f1..10267f06 100644 --- a/app/com/coleji/neptune/Core/Boot/ServerBootLoader.scala +++ b/app/com/coleji/neptune/Core/Boot/ServerBootLoader.scala @@ -2,8 +2,8 @@ package com.coleji.neptune.Core.Boot import com.coleji.neptune.Core._ import com.coleji.neptune.Util.PropertiesWrapper -import com.redis.RedisClientPool import play.api.inject.ApplicationLifecycle +import redis.clients.jedis.JedisPool import scala.concurrent.Future @@ -62,7 +62,7 @@ object ServerBootLoader { println("Using DB Driver: " + dbDriver) val dbConnection = getDBPools(dbDriver) - val redisPool = new RedisClientPool(paramFile.getOptionalString("RedisHost").getOrElse("localhost"), 6379) + val redisPool = new JedisPool(paramFile.getOptionalString("RedisHost").getOrElse("localhost"), 6379) lifecycle match { case Some(lc) => lc.addStopHook(() => Future.successful({ println("**************************** Stop hook: closing pools **********************") diff --git a/app/com/coleji/neptune/Core/CacheableFactory.scala b/app/com/coleji/neptune/Core/CacheableFactory.scala index 4cc97fad..d6eb3e73 100644 --- a/app/com/coleji/neptune/Core/CacheableFactory.scala +++ b/app/com/coleji/neptune/Core/CacheableFactory.scala @@ -39,7 +39,7 @@ abstract class CacheableFactory[T_KeyConfig, T_Result] { } catch { case e: InvalidClassException => { val rte = new RuntimeException("****** Deserialization failed for cache key " + key, e) - Sentry.capture(rte) + Sentry.captureException(rte) rte.printStackTrace() populate(rc, config) } diff --git a/app/com/coleji/neptune/Core/ParsedRequest.scala b/app/com/coleji/neptune/Core/ParsedRequest.scala index ff812b28..c26f4ca2 100644 --- a/app/com/coleji/neptune/Core/ParsedRequest.scala +++ b/app/com/coleji/neptune/Core/ParsedRequest.scala @@ -46,7 +46,7 @@ object ParsedRequest { } catch { case e: Throwable => { PA.logger.error("Failure to parse request", e) - Sentry.capture(e) + Sentry.captureException(e) throw e }} diff --git a/app/com/coleji/neptune/Core/PermissionsAuthority.scala b/app/com/coleji/neptune/Core/PermissionsAuthority.scala index b0f137ac..e6c0894e 100644 --- a/app/com/coleji/neptune/Core/PermissionsAuthority.scala +++ b/app/com/coleji/neptune/Core/PermissionsAuthority.scala @@ -9,10 +9,10 @@ import com.coleji.neptune.Exception.{CORSException, MuteEmailException, PostBody import com.coleji.neptune.IO.PreparedQueries.{PreparedQueryForSelect, PreparedQueryForUpdateOrDelete} import com.coleji.neptune.Storable.{ResultSetWrapper, StorableClass, StorableObject} import com.coleji.neptune.Util.{Initializable, PropertiesWrapper} -import com.redis.RedisClientPool import io.sentry.Sentry import play.api.libs.json.{JsResultException, JsValue} import play.api.mvc.{Result, Results} +import redis.clients.jedis.JedisPool import java.time.LocalDateTime import java.time.format.DateTimeFormatter @@ -25,7 +25,7 @@ class PermissionsAuthority private[Core] ( val systemParams: SystemServerParameters, val customParams: PropertiesWrapper, dbGateway: DatabaseGateway, - redisPool: RedisClientPool, + redisPool: JedisPool, paPostBoot: PropertiesWrapper => Unit, ) { println(s"inside PermissionsAuthority constructor: test mode: ${systemParams.isTestMode}, readOnlyDatabase: ${systemParams.readOnlyDatabase}") @@ -88,7 +88,7 @@ class PermissionsAuthority private[Core] ( case Success(r: Result) => Success(r) case Failure(e: Throwable) => { logger.error(e.getMessage, e) - Sentry.capture(e) + Sentry.captureException(e) Success(Results.Status(400)(ResultError.UNKNOWN.asJsObject)) } }) @@ -96,20 +96,20 @@ class PermissionsAuthority private[Core] ( case _: UnauthorizedAccessException => Future(Results.Status(400)(ResultError.UNAUTHORIZED.asJsObject)) case _: CORSException => Future(Results.Status(400)(ResultError.UNAUTHORIZED.asJsObject)) case e: PostBodyNotJSONException => { - Sentry.capture(e) + Sentry.captureException(e) Future(Results.Status(400)(ResultError.NOT_JSON.asJsObject)) } case e: JsResultException => { - Sentry.capture(e) + Sentry.captureException(e) Future(Results.Status(400)(ResultError.PARSE_FAILURE(e.errors))) } case e: MuteEmailException => { - Sentry.capture(e) + Sentry.captureException(e) Future(Results.Status(400)(ResultError.UNKNOWN.asJsObject)) } case e: Throwable => { logger.error(e.getMessage, e) - Sentry.capture(e) + Sentry.captureException(e) Future(Results.Status(400)(ResultError.UNKNOWN.asJsObject)) } } diff --git a/app/com/coleji/neptune/Core/RedisBroker.scala b/app/com/coleji/neptune/Core/RedisBroker.scala index 92710af3..f30d3748 100644 --- a/app/com/coleji/neptune/Core/RedisBroker.scala +++ b/app/com/coleji/neptune/Core/RedisBroker.scala @@ -1,13 +1,22 @@ package com.coleji.neptune.Core -import com.redis.RedisClientPool +import redis.clients.jedis.{Jedis, JedisPool} -class RedisBroker private[Core](val clientPool: RedisClientPool) extends CacheBroker { - override def set(key: String, value: String): Unit = clientPool.withClient(c => c.set(key, value)) +import scala.util.Using - override def get(key: String): Option[String] = clientPool.withClient(c => c.get(key)) +class RedisBroker private[Core](val clientPool: JedisPool) extends CacheBroker { + override def set(key: String, value: String): Unit = withResource(c => c.set(key, value)) - override def peek(key: String): Boolean = clientPool.withClient(c => c.strlen(key).exists(_ > 0)) + override def get(key: String): Option[String] = withResource(c => Option(c.get(key))) - override def delete(key: String): Unit = clientPool.withClient(c => c.del(key)) + override def peek(key: String): Boolean = withResource(c => Option(c.strlen(key)).exists(_ > 0)) + + override def delete(key: String): Unit = withResource(c => c.del(key)) + + private def withResource[T](cmd: Jedis => T): T = { + val t = Using (clientPool.getResource) { jedis => + cmd(jedis) + } + t.get + } } diff --git a/app/com/coleji/neptune/Core/RequestCache.scala b/app/com/coleji/neptune/Core/RequestCache.scala index 0fd86456..0a1c7600 100644 --- a/app/com/coleji/neptune/Core/RequestCache.scala +++ b/app/com/coleji/neptune/Core/RequestCache.scala @@ -7,7 +7,7 @@ import com.coleji.neptune.Storable.Fields.DatabaseField import com.coleji.neptune.Storable.StorableQuery.{QueryBuilder, QueryBuilderResultRow} import com.coleji.neptune.Storable.{Filter, StorableClass, StorableObject} import com.coleji.neptune.Util.PropertiesWrapper -import com.redis.RedisClientPool +import redis.clients.jedis.JedisPool // TODO: Some sort of security on the CacheBroker so arbitrary requests can't see the authentication tokens // TODO: mirror all PB methods on RC so the RC can either pull from redis or dispatch to oracle etc @@ -15,7 +15,7 @@ sealed abstract class RequestCache private[Core]( val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, - redisPool: RedisClientPool + redisPool: JedisPool )(implicit val PA: PermissionsAuthority) { def companion: RequestCacheObject[_] @@ -94,7 +94,7 @@ abstract class LockedRequestCache( override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, - redisPool: RedisClientPool, + redisPool: JedisPool, ) extends RequestCache(userName, serverParams, dbGateway, redisPool) { } @@ -103,7 +103,7 @@ abstract class UnlockedRequestCache( override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, - redisPool: RedisClientPool, + redisPool: JedisPool, ) extends RequestCache(userName, serverParams, dbGateway, redisPool) { def getObjectById[T <: StorableClass](obj: StorableObject[T], id: Int, fieldShutter: Set[DatabaseField[_]]): Option[T] = pb.getObjectById(obj, id, fieldShutter) diff --git a/app/com/coleji/neptune/Core/RequestCacheObject.scala b/app/com/coleji/neptune/Core/RequestCacheObject.scala index 2fb2ab5a..9c3eefb9 100644 --- a/app/com/coleji/neptune/Core/RequestCacheObject.scala +++ b/app/com/coleji/neptune/Core/RequestCacheObject.scala @@ -2,14 +2,14 @@ package com.coleji.neptune.Core import com.coleji.neptune.Exception.UserTypeMismatchException import com.coleji.neptune.Util.PropertiesWrapper -import com.redis.RedisClientPool +import redis.clients.jedis.JedisPool abstract class RequestCacheObject[T <: RequestCache] { val EMPTY_NONCE = "$EMPTY_AUTH_NONCE$" val SEC_COOKIE_NAME_PUBLIC = "CBIDB-SEC" val SEC_COOKIE_NAME_STAFF = "CBIDB-SEC-STAFF" - def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool): T + def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool): T def test(allowed: Set[RequestCacheObject[_]]): Unit = { if (!allowed.contains(this)) throw new UserTypeMismatchException() diff --git a/app/com/coleji/neptune/Core/RootRequestCache.scala b/app/com/coleji/neptune/Core/RootRequestCache.scala index 22856074..326b76ea 100644 --- a/app/com/coleji/neptune/Core/RootRequestCache.scala +++ b/app/com/coleji/neptune/Core/RootRequestCache.scala @@ -1,10 +1,10 @@ package com.coleji.neptune.Core import com.coleji.neptune.Util.PropertiesWrapper -import com.redis.RedisClientPool +import redis.clients.jedis.JedisPool -class RootRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool)(implicit PA: PermissionsAuthority) +class RootRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool)(implicit PA: PermissionsAuthority) extends UnlockedRequestCache(userName, serverParams, dbGateway, redisPool) { override def companion: RequestCacheObject[RootRequestCache] = RootRequestCache } @@ -13,10 +13,10 @@ object RootRequestCache extends RequestCacheObject[RootRequestCache] { val uniqueUserName = "ROOT" val ROOT_AUTH_HEADER = "origin-root" - override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool): RootRequestCache = + override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool): RootRequestCache = new RootRequestCache(userName, serverParams, dbGateway, redisPool) - def create(serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool): RootRequestCache = create(uniqueUserName, serverParams, dbGateway, redisPool) + def create(serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool): RootRequestCache = create(uniqueUserName, serverParams, dbGateway, redisPool) override def getAuthenticatedUsernameInRequest( request: ParsedRequest, diff --git a/app/com/coleji/neptune/Storable/FieldValues/DoubleFieldValue.scala b/app/com/coleji/neptune/Storable/FieldValues/DoubleFieldValue.scala index e708f2c5..6986af45 100644 --- a/app/com/coleji/neptune/Storable/FieldValues/DoubleFieldValue.scala +++ b/app/com/coleji/neptune/Storable/FieldValues/DoubleFieldValue.scala @@ -11,7 +11,7 @@ class DoubleFieldValue(instance: StorableClass, @transient fieldInner: DoubleDat override def asJSValue: JsValue = JsNumber(super.get) override def updateFromJsValue(v: JsValue): Boolean = v match { - case n: JsNumber => update(n.value.doubleValue()) + case n: JsNumber => update(n.value.doubleValue) case JsNull => throw new Exception("JsNull provided to nonnull field " + field.getRuntimeFieldName) case _ => false } diff --git a/app/com/coleji/neptune/Storable/FieldValues/NullableDoubleFieldValue.scala b/app/com/coleji/neptune/Storable/FieldValues/NullableDoubleFieldValue.scala index 900b1e91..1e6924e5 100644 --- a/app/com/coleji/neptune/Storable/FieldValues/NullableDoubleFieldValue.scala +++ b/app/com/coleji/neptune/Storable/FieldValues/NullableDoubleFieldValue.scala @@ -14,7 +14,7 @@ class NullableDoubleFieldValue(instance: StorableClass, @transient fieldInner: N } override def updateFromJsValue(v: JsValue): Boolean = v match { - case n: JsNumber => update(Some(n.value.doubleValue())) + case n: JsNumber => update(Some(n.value.doubleValue)) case JsNull => update(None) case _ => false } diff --git a/app/com/coleji/neptune/Storable/StorableQuery/BooleanColumnAlias.scala b/app/com/coleji/neptune/Storable/StorableQuery/BooleanColumnAlias.scala index 9ac1c63d..bbe746c6 100644 --- a/app/com/coleji/neptune/Storable/StorableQuery/BooleanColumnAlias.scala +++ b/app/com/coleji/neptune/Storable/StorableQuery/BooleanColumnAlias.scala @@ -6,5 +6,5 @@ import com.coleji.neptune.Storable.{Filter, StorableClass, StorableObject} case class BooleanColumnAlias(override val table: TableAlias[_ <: StorableObject[_ <: StorableClass]], override val field: BooleanDatabaseField) extends ColumnAlias[DatabaseField[Boolean]](table, field) { - def equals(b: Boolean): Filter = Filter(s"${table.name}.${field.persistenceFieldName} = '${if (b) "Y" else "N"}'", List.empty) + def equalsConstant(b: Boolean): Filter = Filter(s"${table.name}.${field.persistenceFieldName} = '${if (b) "Y" else "N"}'", List.empty) } diff --git a/app/com/coleji/neptune/Storable/StorableQuery/DateTimeColumnAlias.scala b/app/com/coleji/neptune/Storable/StorableQuery/DateTimeColumnAlias.scala index 7eaeaaa4..2d8dd4fb 100644 --- a/app/com/coleji/neptune/Storable/StorableQuery/DateTimeColumnAlias.scala +++ b/app/com/coleji/neptune/Storable/StorableQuery/DateTimeColumnAlias.scala @@ -4,12 +4,14 @@ import com.coleji.neptune.Core.PermissionsAuthority import com.coleji.neptune.Core.PermissionsAuthority.{PERSISTENCE_SYSTEM_MYSQL, PERSISTENCE_SYSTEM_ORACLE} import com.coleji.neptune.Storable.Fields.{DatabaseField, DateTimeDatabaseField} import com.coleji.neptune.Storable.{Filter, StorableClass, StorableObject} +import com.coleji.neptune.Util.{DATE_<, DATE_<=, DATE_=, DATE_>, DATE_>=, DateComparison} import java.time.format.DateTimeFormatter import java.time.{LocalDate, LocalDateTime} case class DateTimeColumnAlias(override val table: TableAlias[_ <: StorableObject[_ <: StorableClass]], override val field: DateTimeDatabaseField) - extends ColumnAlias[DatabaseField[LocalDateTime]](table, field) { +extends ColumnAlias[DatabaseField[LocalDateTime]](table, field) { + val localDatePattern: DateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd") def isYearConstant(year: Int)(implicit PA: PermissionsAuthority): Filter = PA.systemParams.persistenceSystem match { case PERSISTENCE_SYSTEM_MYSQL => { @@ -21,14 +23,23 @@ case class DateTimeColumnAlias(override val table: TableAlias[_ <: StorableObjec case PERSISTENCE_SYSTEM_ORACLE => Filter(s"TO_CHAR(${table.name}.${field.persistenceFieldName}, 'YYYY') = $year", List.empty) } - def isDateConstant(date: LocalDate)(implicit PA: PermissionsAuthority): Filter = PA.systemParams.persistenceSystem match { - case PERSISTENCE_SYSTEM_MYSQL => - Filter( - s"${table.name}.${field.persistenceFieldName} >= '${date.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))}' AND " + - s"${table.name}.${field.persistenceFieldName} < '${date.plusDays(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))}'", - List.empty - ) - case PERSISTENCE_SYSTEM_ORACLE => - Filter(s"TRUNC(${table.name}.${field.persistenceFieldName}) = TO_DATE('${date.format(DateTimeFormatter.ofPattern("MM/dd/yyyy"))}','MM/DD/YYYY')", List.empty) + private def dateComparison(date: LocalDate, comp: DateComparison)(implicit PA: PermissionsAuthority): Filter = { + val comparator: String = comp.comparator + PA.systemParams.persistenceSystem match { + case PERSISTENCE_SYSTEM_MYSQL => + Filter(s"${table.name}.${field.persistenceFieldName} $comparator '${date.format(localDatePattern)}'", List.empty) + case PERSISTENCE_SYSTEM_ORACLE => + Filter(s"TRUNC(${table.name}.${field.persistenceFieldName}) $comparator TO_DATE('${date.format(DateTimeFormatter.ofPattern("MM/dd/yyyy"))}','MM/DD/YYYY')", List.empty) + } } + + def isDateConstant(date: LocalDate): Filter = dateComparison(date, DATE_=) + + def greaterThanConstant(date: LocalDate): Filter = dateComparison(date, DATE_>) + + def lessThanConstant(date: LocalDate): Filter = dateComparison(date, DATE_<) + + def greaterEqualConstant(date: LocalDate): Filter = dateComparison(date, DATE_>=) + + def lessEqualConstant(date: LocalDate): Filter = dateComparison(date, DATE_<=) } diff --git a/app/com/coleji/neptune/Storable/StorableQuery/NullableBooleanColumnAlias.scala b/app/com/coleji/neptune/Storable/StorableQuery/NullableBooleanColumnAlias.scala index c8e6d085..2bf94f1f 100644 --- a/app/com/coleji/neptune/Storable/StorableQuery/NullableBooleanColumnAlias.scala +++ b/app/com/coleji/neptune/Storable/StorableQuery/NullableBooleanColumnAlias.scala @@ -6,7 +6,7 @@ import com.coleji.neptune.Storable.{Filter, StorableClass, StorableObject} case class NullableBooleanColumnAlias(override val table: TableAlias[_ <: StorableObject[_ <: StorableClass]], override val field: NullableBooleanDatabaseField) extends ColumnAlias[DatabaseField[Option[Boolean]]](table, field) { - def equals(b: Option[Boolean]): Filter = b match { + def equalsConstant(b: Option[Boolean]): Filter = b match { case Some(x) => Filter(s"${table.name}.${field.persistenceFieldName} = '${if (x) "Y" else "N"}'", List.empty) case None => Filter(s"${table.name}.${field.persistenceFieldName} IS NULL", List.empty) } diff --git a/app/com/coleji/neptune/Util/Currency.scala b/app/com/coleji/neptune/Util/Currency.scala index f4dca687..664544df 100644 --- a/app/com/coleji/neptune/Util/Currency.scala +++ b/app/com/coleji/neptune/Util/Currency.scala @@ -81,6 +81,8 @@ object Currency { override def toDouble(x: Currency): Double = x.cents.toDouble override def compare(x: Currency, y: Currency): Int = if (x.cents > y.cents) 1 else if (x.cents < y.cents) -1 else 0 + + override def parseString(str: String): Option[Currency] = None } } \ No newline at end of file diff --git a/app/com/coleji/neptune/Util/Initializable.scala b/app/com/coleji/neptune/Util/Initializable.scala index 91068137..62ff6820 100644 --- a/app/com/coleji/neptune/Util/Initializable.scala +++ b/app/com/coleji/neptune/Util/Initializable.scala @@ -35,5 +35,18 @@ class Initializable[T] extends Serializable { def forEach(f: T => Unit): Unit = { if (isInitialized) f(this.get) } + + def findOneInCollection(collection: Traversable[T], find: T => Boolean): T = value match { + case None => { + collection.find(find) match { + case Some(t) => { + value = Some(t) + t + } + case None => throw new Exception("No match found in collection") + } + } + case Some(t) => t + } } diff --git a/app/com/coleji/neptune/Util/InitializableFromCollectionElement.scala b/app/com/coleji/neptune/Util/InitializableFromCollectionElement.scala deleted file mode 100644 index 725280be..00000000 --- a/app/com/coleji/neptune/Util/InitializableFromCollectionElement.scala +++ /dev/null @@ -1,16 +0,0 @@ -package com.coleji.neptune.Util - -class InitializableFromCollectionElement[T](find: (T => Boolean)) extends Initializable[T] { - def findOneInCollection(collection: Traversable[T]): T = value match { - case None => { - collection.find(find) match { - case Some(t) => { - value = Some(t) - t - } - case None => throw new Exception("No match found in collection") - } - } - case Some(t) => t - } -} diff --git a/app/com/coleji/neptune/Util/InitializableFromCollectionSubset.scala b/app/com/coleji/neptune/Util/InitializableFromCollectionSubset.scala deleted file mode 100644 index fd1a6c43..00000000 --- a/app/com/coleji/neptune/Util/InitializableFromCollectionSubset.scala +++ /dev/null @@ -1,12 +0,0 @@ -package com.coleji.neptune.Util - -class InitializableFromCollectionSubset[U <: Traversable[T], T](filter: (T => Boolean)) extends Initializable[U] { - def findAllInCollection(collection: U): U = value match { - case None => { - val ret = collection.filter(filter).asInstanceOf[U] - value = Some(ret) - ret - } - case Some(t) => t - } -} diff --git a/app/com/coleji/neptune/Util/InitializableSeq.scala b/app/com/coleji/neptune/Util/InitializableSeq.scala new file mode 100644 index 00000000..ba29aaf8 --- /dev/null +++ b/app/com/coleji/neptune/Util/InitializableSeq.scala @@ -0,0 +1,12 @@ +package com.coleji.neptune.Util + +class InitializableSeq[U, T <: Seq[U]] extends Initializable[T]{ + def findAllInCollection(collection: T, filter: U => Boolean): T = value match { + case None => { + val ret = collection.filter(filter).asInstanceOf[T] + value = Some(ret) + ret + } + case Some(t) => t + } +} diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/Dto/Staff/Dockhouse/ScanCard/Get.scala b/app/org/sailcbi/APIServer/Api/Endpoints/Dto/Staff/Dockhouse/ScanCard/Get.scala index 97fb51ce..a6e73b24 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/Dto/Staff/Dockhouse/ScanCard/Get.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/Dto/Staff/Dockhouse/ScanCard/Get.scala @@ -74,7 +74,7 @@ case class StaffDockhouseScanCardGetResponseSuccessDto_JpClassSignupsToday ( personId: Int, signupType: String, signupDatetime: String, - sequence: Int, + sequence: Double, ) object StaffDockhouseScanCardGetResponseSuccessDto_JpClassSignupsToday { diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/Dto/Staff/Rest/ApClassSessions/Today/Get.scala b/app/org/sailcbi/APIServer/Api/Endpoints/Dto/Staff/Rest/ApClassSessions/Today/Get.scala index 89e350df..6e2d33ec 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/Dto/Staff/Rest/ApClassSessions/Today/Get.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/Dto/Staff/Rest/ApClassSessions/Today/Get.scala @@ -70,9 +70,9 @@ object StaffRestApClassSessionsTodayGetResponseSuccessDto_ApClassInstance_ApClas case class StaffRestApClassSessionsTodayGetResponseSuccessDto_ApClassInstance_ApClassSignups_ApClassWaitlistResult ( wlResult: String, foVmDatetime: Option[String], - offerExpDatetime: Option[String], + offerExpDatetime: String, signupId: Int, - foAlertDatetime: Option[String], + foAlertDatetime: String, permitOvercrowd: Boolean, ) diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/Dto/Staff/Rest/ApClassTypes/Get.scala b/app/org/sailcbi/APIServer/Api/Endpoints/Dto/Staff/Rest/ApClassTypes/Get.scala index be9bd02d..f2531675 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/Dto/Staff/Rest/ApClassTypes/Get.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/Dto/Staff/Rest/ApClassTypes/Get.scala @@ -14,8 +14,8 @@ case class StaffRestApClassTypesGetResponseSuccessDto ( ratingPrereq: Option[Int], classPrereq: Option[Int], ratingOverkill: Option[Int], - displayOrder: Int, - descLong: Option[String], + displayOrder: Double, + descLong: String, descShort: Option[String], classOverkill: Option[Int], noSignup: Boolean, diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/Member/APWelcomePackage.scala b/app/org/sailcbi/APIServer/Api/Endpoints/Member/APWelcomePackage.scala index 775eea44..f3f3d486 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/Member/APWelcomePackage.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/Member/APWelcomePackage.scala @@ -131,7 +131,7 @@ class APWelcomePackage @Inject()(ws: WSClient)(implicit val exec: ExecutionConte // do this async, user doesnt need to wait for it. if (stripeCustomerIdOption.isEmpty) { stripe.createStripeCustomerFromPerson(rc, personId).map({ - case f: NetFailure[_, _] => Sentry.capture("Failed to create stripe customerId for person " + personId) + case f: NetFailure[_, _] => Sentry.captureMessage("Failed to create stripe customerId for person " + personId) case s: NetSuccess[_, _] => }) } diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/Member/JPWelcomePackage.scala b/app/org/sailcbi/APIServer/Api/Endpoints/Member/JPWelcomePackage.scala index 8e188e71..45c3e288 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/Member/JPWelcomePackage.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/Member/JPWelcomePackage.scala @@ -65,7 +65,7 @@ class JPWelcomePackage @Inject()(ws: WSClient)(implicit val exec: ExecutionConte // do this async, user doesnt need to wait for it. if (stripeCustomerIdOption.isEmpty) { stripe.createStripeCustomerFromPerson(rc, personId).map({ - case f: NetFailure[_, _] => Sentry.capture("Failed to create stripe customerId for person " + personId) + case f: NetFailure[_, _] => Sentry.captureMessage("Failed to create stripe customerId for person " + personId) case s: NetSuccess[_, _] => }) } diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/PDFReports/RunApClassRoster.scala b/app/org/sailcbi/APIServer/Api/Endpoints/PDFReports/RunApClassRoster.scala index e03edcac..7643d0e6 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/PDFReports/RunApClassRoster.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/PDFReports/RunApClassRoster.scala @@ -4,7 +4,7 @@ import akka.stream.scaladsl.Source import akka.util.ByteString import com.coleji.neptune.Core.{ParsedRequest, PermissionsAuthority} import org.apache.pdfbox.pdmodel.PDDocument -import org.apache.pdfbox.pdmodel.font.PDType1Font +import org.apache.pdfbox.pdmodel.font.{PDType1Font, Standard14Fonts} import org.sailcbi.APIServer.Reports.ApClassRoster.ApClassRoster import org.sailcbi.APIServer.Reports.ApClassRoster.Loader.{ApClassRosterLiveLoader, ApClassRosterLiveParameter} import org.sailcbi.APIServer.UserTypes.StaffRequestCache @@ -24,7 +24,7 @@ class RunApClassRoster @Inject() (implicit exec: ExecutionContext) extends Injec val output = new ByteArrayOutputStream() val document: PDDocument = new PDDocument() - val pdfFont = PDType1Font.HELVETICA + val pdfFont = new PDType1Font(Standard14Fonts.FontName.HELVETICA) val fontSize = 13 val model = ApClassRosterLiveLoader(ApClassRosterLiveParameter(instanceId), rc) diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/PDFReports/RunDailyCloseReport.scala b/app/org/sailcbi/APIServer/Api/Endpoints/PDFReports/RunDailyCloseReport.scala index 63ccfc2d..c9f96fba 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/PDFReports/RunDailyCloseReport.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/PDFReports/RunDailyCloseReport.scala @@ -4,7 +4,7 @@ import akka.stream.scaladsl.Source import akka.util.ByteString import com.coleji.neptune.Core.{ParsedRequest, PermissionsAuthority} import org.apache.pdfbox.pdmodel.PDDocument -import org.apache.pdfbox.pdmodel.font.PDType1Font +import org.apache.pdfbox.pdmodel.font.{PDType1Font, Standard14Fonts} import org.sailcbi.APIServer.Reports.DailyCloseReport.DailyCloseReport import org.sailcbi.APIServer.Reports.DailyCloseReport.Loader.{DailyCloseReportLiveLoader, DailyCloseReportLiveParameter} import org.sailcbi.APIServer.UserTypes.StaffRequestCache @@ -25,7 +25,7 @@ class RunDailyCloseReport @Inject() (implicit val exec: ExecutionContext) extend val output = new ByteArrayOutputStream() val document: PDDocument = new PDDocument() - val pdfFont = PDType1Font.HELVETICA + val pdfFont = new PDType1Font(Standard14Fonts.FontName.HELVETICA) val fontSize = 13 val model = DailyCloseReportLiveLoader(DailyCloseReportLiveParameter(closeId), rc) diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/Security/ForgotPassword.scala b/app/org/sailcbi/APIServer/Api/Endpoints/Security/ForgotPassword.scala index 8a7dda88..7ea09f7a 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/Security/ForgotPassword.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/Security/ForgotPassword.scala @@ -61,7 +61,7 @@ class ForgotPassword @Inject()(implicit exec: ExecutionContext) extends Injected ) override def registerOutParameters: Map[String, Int] = Map.empty - override def getOutResults(cs: CallableStatement): Unit = Unit + override def getOutResults(cs: CallableStatement): Unit = () override def getQuery: String = "email_pkg.public_reset_pw(?, ?)" } diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Dockhouse/ScanCard/ScanCard.scala b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Dockhouse/ScanCard/ScanCard.scala index 6cfec0de..a7c264a1 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Dockhouse/ScanCard/ScanCard.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Dockhouse/ScanCard/ScanCard.scala @@ -7,7 +7,7 @@ import org.sailcbi.APIServer.Api.Endpoints.Dto.Staff.Dockhouse.ScanCard._ import org.sailcbi.APIServer.Api.Endpoints.Staff.Rest.PersonMembership.GetPersonMembership import org.sailcbi.APIServer.Entities.EntityDefinitions._ import org.sailcbi.APIServer.Entities.cacheable.{BoatTypes, Programs, Ratings} -import org.sailcbi.APIServer.Logic.RatingLogic +import org.sailcbi.APIServer.Logic.{MembershipLogic, RatingLogic} import org.sailcbi.APIServer.UserTypes.StaffRequestCache import play.api.libs.json.Json import play.api.mvc.{Action, AnyContent, InjectedController} @@ -64,7 +64,7 @@ class ScanCard @Inject()(implicit val exec: ExecutionContext) extends InjectedCo private def constructMemberships(rc: UnlockedRequestCache, personId: Int): List[StaffDockhouseScanCardGetResponseSuccessDto_ActiveMemberships] = { GetPersonMembership.getAllForPerson(rc, personId) - .filter(_.isActive(LocalDate.now)) + .filter(MembershipLogic.isActive(_, LocalDate.now)) .map(pm => new StaffDockhouseScanCardGetResponseSuccessDto_ActiveMemberships( assignId = pm.values.assignId.get, membershipTypeId = pm.values.membershipTypeId.get, @@ -137,7 +137,7 @@ class ScanCard @Inject()(implicit val exec: ExecutionContext) extends InjectedCo .from(JpClassSignup) .innerJoin(JpClassSession, JpClassSession.fields.instanceId.alias.equalsField(JpClassSignup.fields.instanceId)) .where(List( - JpClassSession.fields.sessionDateTime.alias.isDateConstant(rc.PA.now().toLocalDate), + JpClassSession.fields.sessionDatetime.alias.isDateConstant(rc.PA.now().toLocalDate), JpClassSignup.fields.personId.alias.equalsConstant(personId) )) .select(List( diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/ApClassSessions.scala b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/ApClassSessions.scala index 5d103daf..c034711f 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/ApClassSessions.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/ApClassSessions.scala @@ -161,9 +161,9 @@ class ApClassSessions @Inject()(implicit val exec: ExecutionContext) extends Inj new StaffRestApClassSessionsTodayGetResponseSuccessDto_ApClassInstance_ApClassSignups_ApClassWaitlistResult( wlResult = wlr.values.wlResult.get, foVmDatetime = wlr.values.foVmDatetime.get.map(_.toString), - offerExpDatetime = wlr.values.offerExpDatetime.get.map(_.toString), + offerExpDatetime = wlr.values.offerExpDatetime.get.toString, signupId = wlr.values.signupId.get, - foAlertDatetime = wlr.values.foAlertDatetime.get.map(_.toString), + foAlertDatetime = wlr.values.foAlertDatetime.get.toString, permitOvercrowd = wlr.values.permitOvercrowd.get ) ) diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/DockReport/GetDockReport.scala b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/DockReport/GetDockReport.scala index e0909840..a8f9c05f 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/DockReport/GetDockReport.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/DockReport/GetDockReport.scala @@ -79,7 +79,7 @@ class GetDockReport @Inject()(implicit val exec: ExecutionContext) extends RestC dockRptClass.values.dockReportId.update(newDockReport.values.dockReportId.get) dockRptClass.values.className.update(qbrr.getValue(ApClassType.alias)(_.typeName)) dockRptClass.values.classDatetime.update(qbrr.getValue(ApClassSession.alias)(_.sessionDatetime)) - dockRptClass.values.apInstanceId.update(Some(qbrr.getValue(ApClassInstance.alias)(_.instanceId))) + dockRptClass.values.apInstanceId.update(qbrr.getValue(ApClassInstance.alias)(_.instanceId)) rc.commitObjectToDatabase(dockRptClass) dockRptClass.defaultAllUnsetNullableFields() PutDockReportApClassDto(dockRptClass) diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/Event/GetEvent.scala b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/Event/GetEvent.scala index 9ae25f0d..1c79fa76 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/Event/GetEvent.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/Event/GetEvent.scala @@ -16,7 +16,7 @@ class GetEvent @Inject()(implicit val exec: ExecutionContext) extends RestContro val events = getByFilters(rc, List.empty, Set( Event.fields.eventId, Event.fields.eventName, - Event.fields.eventDateTime, + Event.fields.eventDate, )) Future(Ok(Json.toJson(events))) }) diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/JpClassInstances.scala b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/JpClassInstances.scala index 2287dace..6de62174 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/JpClassInstances.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/JpClassInstances.scala @@ -16,10 +16,10 @@ class JpClassInstances @Inject()(implicit val exec: ExecutionContext) extends In PA.withRequestCache(StaffRequestCache)(None, ParsedRequest(req), rc => { val currentSeason = PA.currentSeason() - val sessions = rc.getObjectsByFilters(JpClassSession, List(JpClassSession.fields.sessionDateTime.alias.isYearConstant(currentSeason)), Set( + val sessions = rc.getObjectsByFilters(JpClassSession, List(JpClassSession.fields.sessionDatetime.alias.isYearConstant(currentSeason)), Set( JpClassSession.fields.sessionId, JpClassSession.fields.instanceId, - JpClassSession.fields.sessionDateTime, + JpClassSession.fields.sessionDatetime, JpClassSession.fields.lengthOverride, ), 1200) @@ -39,7 +39,7 @@ class JpClassInstances @Inject()(implicit val exec: ExecutionContext) extends In val instanceId = i.values.instanceId.get i.references.jpClassSessions.set(sessions .filter(_.values.instanceId.get == instanceId) - .sortBy(s => DateUtil.toBostonTime(s.values.sessionDateTime.get)) + .sortBy(s => DateUtil.toBostonTime(s.values.sessionDatetime.get)) .toIndexedSeq) }) diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/JpClassSessions.scala b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/JpClassSessions.scala index 53350428..a4ea116f 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/JpClassSessions.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/JpClassSessions.scala @@ -19,11 +19,11 @@ class JpClassSessions @Inject()(implicit val exec: ExecutionContext) extends Inj val qb = QueryBuilder .from(JpClassSession) .innerJoin(JpClassInstance, JpClassSession.fields.instanceId.alias.equalsField(JpClassInstance.fields.instanceId.alias)) - .where(JpClassSession.fields.sessionDateTime.alias.isDateConstant(rc.PA.now().toLocalDate)) + .where(JpClassSession.fields.sessionDatetime.alias.isDateConstant(rc.PA.now().toLocalDate)) .select(List( JpClassSession.fields.sessionId, JpClassSession.fields.instanceId, - JpClassSession.fields.sessionDateTime, + JpClassSession.fields.sessionDatetime, JpClassSession.fields.lengthOverride, JpClassInstance.fields.instanceId, diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/MembershipTypes.scala b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/MembershipTypes.scala index f73eda8d..8cd94d38 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/MembershipTypes.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/MembershipTypes.scala @@ -12,7 +12,7 @@ import scala.concurrent.{ExecutionContext, Future} class MembershipTypes @Inject()(implicit val exec: ExecutionContext) extends InjectedController { def getAll()(implicit PA: PermissionsAuthority): Action[AnyContent] = Action.async(req => { PA.withRequestCache(StaffRequestCache)(None, ParsedRequest(req), rc => { - val memTypes = rc.getObjectsByFilters(MembershipType, List(MembershipType.fields.active.alias.equals(true)), Set( + val memTypes = rc.getObjectsByFilters(MembershipType, List(MembershipType.fields.active.alias.equalsConstant(Some(true))), Set( MembershipType.fields.membershipTypeId, MembershipType.fields.membershipTypeName, MembershipType.fields.active, diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/PersonRest/GetPerson.scala b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/PersonRest/GetPerson.scala index 30d4453c..4675ecbc 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/PersonRest/GetPerson.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/PersonRest/GetPerson.scala @@ -42,7 +42,7 @@ class GetPerson @Inject()(implicit val exec: ExecutionContext) extends RestContr .innerJoin(PersonCard, PersonCard.fields.personId.alias.equalsField(Person.fields.personId.alias)) .where(List( PersonCard.fields.cardNum.alias.equalsConstant(cardNumber), - PersonCard.fields.active.alias.equals(true) + PersonCard.fields.active.alias.equalsConstant(true) )) .select(List( Person.fields.personId.alias, diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/User/GetUsers.scala b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/User/GetUsers.scala index f92527e8..8626a00d 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/User/GetUsers.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/User/GetUsers.scala @@ -20,7 +20,7 @@ class GetUsers @Inject()(implicit val exec: ExecutionContext) extends RestContro User.fields.nameFirst, User.fields.email, User.fields.locked, - User.fields.pwChangeRequired, + User.fields.pwChangeReqd, User.fields.active, User.fields.hideFromClose, User.fields.accessProfileId diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/User/PutUser.scala b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/User/PutUser.scala index dbadae86..dbc0e74e 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/User/PutUser.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/Rest/User/PutUser.scala @@ -18,7 +18,7 @@ class PutUser @Inject()(implicit exec: ExecutionContext) extends InjectedControl PA.withRequestCache(StaffRequestCache, CbiPermissions.PERM_MANAGE_USERS_SCREEN)(None, parsedRequest, rc => { // If the password is set as blank, unset parsed.values.pwHash.peek match { - case Some(None) => parsed.values.pwHash.unset() + case None => parsed.values.pwHash.unset() case _ => } @@ -52,8 +52,8 @@ class PutUser @Inject()(implicit exec: ExecutionContext) extends InjectedControl def runUnifiedValidations(rc: UnlockedRequestCache, newRecord: User): ValidationResult = { ValidationResult.combine(List( - ValidationResult.checkBlank(newRecord.values.nameFirst.get, "First Name"), - ValidationResult.checkBlank(newRecord.values.nameLast.get, "Last Name"), + ValidationResult.checkBlank(newRecord.values.nameFirst.peek, "First Name"), + ValidationResult.checkBlank(newRecord.values.nameLast.peek, "Last Name"), )) } diff --git a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/UpdateUserPassword.scala b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/UpdateUserPassword.scala index 47bb6dd6..9fe6ec68 100644 --- a/app/org/sailcbi/APIServer/Api/Endpoints/Staff/UpdateUserPassword.scala +++ b/app/org/sailcbi/APIServer/Api/Endpoints/Staff/UpdateUserPassword.scala @@ -16,7 +16,7 @@ class UpdateUserPassword @Inject()(implicit exec: ExecutionContext) extends Inje PA.withRequestCache(BouncerRequestCache)(None, parsedRequest, rc => { rc.getUserByUsername(parsed.username) match { case Some(user) => { - user.values.pwHash.update(Some(parsed.pwHash)) + user.values.pwHash.update(parsed.pwHash) user.values.pwHashScheme.update(Some(MagicIds.PW_HASH_SCHEME.STAFF_2)) rc.updateUser(user) } diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AccessProfile.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AccessProfile.scala index 55eed12c..de1cb06f 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AccessProfile.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AccessProfile.scala @@ -1,29 +1,33 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{IntFieldValue, NullableStringFieldValue, StringFieldValue} -import com.coleji.neptune.Storable.Fields.{IntDatabaseField, NullableStringDatabaseField, StringDatabaseField} -import com.coleji.neptune.Storable.{FieldsObject, StorableClass, StorableObject, ValuesObject} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class AccessProfile extends StorableClass(AccessProfile) { - object values extends ValuesObject { + override object values extends ValuesObject { val accessProfileId = new IntFieldValue(self, AccessProfile.fields.accessProfileId) val name = new StringFieldValue(self, AccessProfile.fields.name) val description = new NullableStringFieldValue(self, AccessProfile.fields.description) - val displayOrder = new IntFieldValue(self, AccessProfile.fields.displayOrder) + val displayOrder = new DoubleFieldValue(self, AccessProfile.fields.displayOrder) } } object AccessProfile extends StorableObject[AccessProfile] { override val useRuntimeFieldnamesForJson: Boolean = true - - val entityName: String = "ACCESS_PROFILES" + + override val entityName: String = "ACCESS_PROFILES" object fields extends FieldsObject { val accessProfileId = new IntDatabaseField(self, "ACCESS_PROFILE_ID") val name = new StringDatabaseField(self, "NAME", 50) val description = new NullableStringDatabaseField(self, "DESCRIPTION", 100) - val displayOrder = new IntDatabaseField(self, "DISPLAY_ORDER") + val displayOrder = new DoubleDatabaseField(self, "DISPLAY_ORDER") } def primaryKey: IntDatabaseField = fields.accessProfileId -} +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AccessProfileRelationship.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AccessProfileRelationship.scala index 2e1e1e34..868e5ee2 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AccessProfileRelationship.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AccessProfileRelationship.scala @@ -1,11 +1,15 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.IntFieldValue -import com.coleji.neptune.Storable.Fields.IntDatabaseField -import com.coleji.neptune.Storable.{FieldsObject, StorableClass, StorableObject, ValuesObject} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class AccessProfileRelationship extends StorableClass(AccessProfileRelationship) { - object values extends ValuesObject { + override object values extends ValuesObject { val rowId = new IntFieldValue(self, AccessProfileRelationship.fields.rowId) val managingProfileId = new IntFieldValue(self, AccessProfileRelationship.fields.managingProfileId) val subordinateProfileId = new IntFieldValue(self, AccessProfileRelationship.fields.subordinateProfileId) @@ -15,7 +19,7 @@ class AccessProfileRelationship extends StorableClass(AccessProfileRelationship) object AccessProfileRelationship extends StorableObject[AccessProfileRelationship] { override val useRuntimeFieldnamesForJson: Boolean = true - val entityName: String = "ACCESS_PROFILES_RELATIONSHIPS" + override val entityName: String = "ACCESS_PROFILES_RELATIONSHIPS" object fields extends FieldsObject { val rowId = new IntDatabaseField(self, "ROW_ID") @@ -24,4 +28,4 @@ object AccessProfileRelationship extends StorableObject[AccessProfileRelationshi } def primaryKey: IntDatabaseField = fields.rowId -} +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AccessProfileRole.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AccessProfileRole.scala index 174fc684..57aba3be 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AccessProfileRole.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AccessProfileRole.scala @@ -1,25 +1,39 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.IntFieldValue -import com.coleji.neptune.Storable.Fields.IntDatabaseField -import com.coleji.neptune.Storable.{FieldsObject, StorableClass, StorableObject, ValuesObject} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class AccessProfileRole extends StorableClass(AccessProfileRole) { - object values extends ValuesObject { + override object values extends ValuesObject { val assignId = new IntFieldValue(self, AccessProfileRole.fields.assignId) val accessProfileId = new IntFieldValue(self, AccessProfileRole.fields.accessProfileId) val roleId = new IntFieldValue(self, AccessProfileRole.fields.roleId) + val createdOn = new NullableDateTimeFieldValue(self, AccessProfileRole.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, AccessProfileRole.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, AccessProfileRole.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, AccessProfileRole.fields.updatedBy) } } object AccessProfileRole extends StorableObject[AccessProfileRole] { - val entityName: String = "ACCESS_PROFILES_ROLES" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "ACCESS_PROFILES_ROLES" object fields extends FieldsObject { val assignId = new IntDatabaseField(self, "ASSIGN_ID") val accessProfileId = new IntDatabaseField(self, "ACCESS_PROFILE_ID") val roleId = new IntDatabaseField(self, "ROLE_ID") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) } def primaryKey: IntDatabaseField = fields.assignId -} +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassAttendance.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassAttendance.scala new file mode 100644 index 00000000..d4040a27 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassAttendance.scala @@ -0,0 +1,47 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class ApClassAttendance extends StorableClass(ApClassAttendance) { + override object values extends ValuesObject { + val attendId = new IntFieldValue(self, ApClassAttendance.fields.attendId) + val sessionId = new IntFieldValue(self, ApClassAttendance.fields.sessionId) + val signupId = new IntFieldValue(self, ApClassAttendance.fields.signupId) + val attend = new NullableStringFieldValue(self, ApClassAttendance.fields.attend) + val createdOn = new DateTimeFieldValue(self, ApClassAttendance.fields.createdOn) + val createdBy = new StringFieldValue(self, ApClassAttendance.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, ApClassAttendance.fields.updatedOn) + val updatedBy = new StringFieldValue(self, ApClassAttendance.fields.updatedBy) + } +} + +object ApClassAttendance extends StorableObject[ApClassAttendance] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "AP_CLASS_ATTENDANCE" + + object fields extends FieldsObject { + val attendId = new IntDatabaseField(self, "ATTEND_ID") + @NullableInDatabase + val sessionId = new IntDatabaseField(self, "SESSION_ID") + @NullableInDatabase + val signupId = new IntDatabaseField(self, "SIGNUP_ID") + val attend = new NullableStringDatabaseField(self, "ATTEND", 1) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.attendId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassFormat.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassFormat.scala index b0fe5355..aa6bb5e0 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassFormat.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassFormat.scala @@ -3,40 +3,55 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class ApClassFormat extends StorableClass(ApClassFormat) { override object references extends ReferencesObject { val apClassType = new Initializable[ApClassType] } - object values extends ValuesObject { + override object values extends ValuesObject { val formatId = new IntFieldValue(self, ApClassFormat.fields.formatId) val typeId = new IntFieldValue(self, ApClassFormat.fields.typeId) val description = new NullableStringFieldValue(self, ApClassFormat.fields.description) - val signupMinDefaultOverride = new NullableIntFieldValue(self, ApClassFormat.fields.signupMinDefaultOverride) - val signupMaxDefaultOverride = new NullableIntFieldValue(self, ApClassFormat.fields.signupMaxDefaultOverride) + val createdOn = new DateTimeFieldValue(self, ApClassFormat.fields.createdOn) + val createdBy = new StringFieldValue(self, ApClassFormat.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, ApClassFormat.fields.updatedOn) + val updatedBy = new StringFieldValue(self, ApClassFormat.fields.updatedBy) + val priceDefaultOverride = new NullableDoubleFieldValue(self, ApClassFormat.fields.priceDefaultOverride) val sessionCtDefault = new IntFieldValue(self, ApClassFormat.fields.sessionCtDefault) val sessionLengthDefault = new DoubleFieldValue(self, ApClassFormat.fields.sessionLengthDefault) - val priceDefaultOverride = new NullableDoubleFieldValue(self, ApClassFormat.fields.priceDefaultOverride) + val signupMaxDefaultOverride = new NullableIntFieldValue(self, ApClassFormat.fields.signupMaxDefaultOverride) + val signupMinDefaultOverride = new NullableIntFieldValue(self, ApClassFormat.fields.signupMinDefaultOverride) } } object ApClassFormat extends StorableObject[ApClassFormat] { - val entityName: String = "AP_CLASS_FORMATS" - override val useRuntimeFieldnamesForJson: Boolean = true + override val entityName: String = "AP_CLASS_FORMATS" + object fields extends FieldsObject { val formatId = new IntDatabaseField(self, "FORMAT_ID") val typeId = new IntDatabaseField(self, "TYPE_ID") val description = new NullableStringDatabaseField(self, "DESCRIPTION", 1000) - val signupMinDefaultOverride = new NullableIntDatabaseField(self, "SIGNUP_MIN_DEFAULT_OVERRIDE") - val signupMaxDefaultOverride = new NullableIntDatabaseField(self, "SIGNUP_MAX_DEFAULT_OVERRIDE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val priceDefaultOverride = new NullableDoubleDatabaseField(self, "PRICE_DEFAULT_OVERRIDE") val sessionCtDefault = new IntDatabaseField(self, "SESSION_CT_DEFAULT") val sessionLengthDefault = new DoubleDatabaseField(self, "SESSION_LENGTH_DEFAULT") - val priceDefaultOverride = new NullableDoubleDatabaseField(self, "PRICE_DEFAULT_OVERRIDE") + val signupMaxDefaultOverride = new NullableIntDatabaseField(self, "SIGNUP_MAX_DEFAULT_OVERRIDE") + val signupMinDefaultOverride = new NullableIntDatabaseField(self, "SIGNUP_MIN_DEFAULT_OVERRIDE") } def primaryKey: IntDatabaseField = fields.formatId -} +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassInstance.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassInstance.scala index 83282b71..3262e20d 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassInstance.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassInstance.scala @@ -3,26 +3,33 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class ApClassInstance extends StorableClass(ApClassInstance) { override object references extends ReferencesObject { val apClassFormat = new Initializable[ApClassFormat] - val apClassSessions = new Initializable[IndexedSeq[ApClassSession]] - val apClassSignups = new Initializable[IndexedSeq[ApClassSignup]] + val apClassSessions = new InitializableSeq[ApClassSession, IndexedSeq[ApClassSession]] + val apClassSignups = new InitializableSeq[ApClassSignup, IndexedSeq[ApClassSignup]] val instructor = new Initializable[Option[Person]] } - object values extends ValuesObject { + override object values extends ValuesObject { val instanceId = new IntFieldValue(self, ApClassInstance.fields.instanceId) + val createdOn = new DateTimeFieldValue(self, ApClassInstance.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, ApClassInstance.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, ApClassInstance.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, ApClassInstance.fields.updatedBy) + val cancelByOverride = new NullableDateTimeFieldValue(self, ApClassInstance.fields.cancelByOverride) + val formatId = new IntFieldValue(self, ApClassInstance.fields.formatId) val signupsStartOverride = new NullableDateTimeFieldValue(self, ApClassInstance.fields.signupsStartOverride) + val cancelledDatetime = new NullableDateTimeFieldValue(self, ApClassInstance.fields.cancelledDatetime) + val price = new NullableDoubleFieldValue(self, ApClassInstance.fields.price) + val signupMax = new NullableIntFieldValue(self, ApClassInstance.fields.signupMax) val signupMin = new NullableIntFieldValue(self, ApClassInstance.fields.signupMin) val doNotAutoCancel = new BooleanFieldValue(self, ApClassInstance.fields.doNotAutoCancel) - val signupMax = new NullableIntFieldValue(self, ApClassInstance.fields.signupMax) - val formatId = new IntFieldValue(self, ApClassInstance.fields.formatId) - val cancelByOverride = new NullableDateTimeFieldValue(self, ApClassInstance.fields.cancelByOverride) - val price = new NullableDoubleFieldValue(self, ApClassInstance.fields.price) - val cancelledDatetime = new NullableDateTimeFieldValue(self, ApClassInstance.fields.cancelledDatetime) val hideOnline = new BooleanFieldValue(self, ApClassInstance.fields.hideOnline) val locationString = new NullableStringFieldValue(self, ApClassInstance.fields.locationString) val instructorId = new NullableIntFieldValue(self, ApClassInstance.fields.instructorId) @@ -30,24 +37,32 @@ class ApClassInstance extends StorableClass(ApClassInstance) { } object ApClassInstance extends StorableObject[ApClassInstance] { - val entityName: String = "AP_CLASS_INSTANCES" - override val useRuntimeFieldnamesForJson: Boolean = true + override val entityName: String = "AP_CLASS_INSTANCES" + object fields extends FieldsObject { val instanceId = new IntDatabaseField(self, "INSTANCE_ID") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val cancelByOverride = new NullableDateTimeDatabaseField(self, "CANCEL_BY_OVERRIDE") + val formatId = new IntDatabaseField(self, "FORMAT_ID") val signupsStartOverride = new NullableDateTimeDatabaseField(self, "SIGNUPS_START_OVERRIDE") + val cancelledDatetime = new NullableDateTimeDatabaseField(self, "CANCELLED_DATETIME") + val price = new NullableDoubleDatabaseField(self, "PRICE") + val signupMax = new NullableIntDatabaseField(self, "SIGNUP_MAX") val signupMin = new NullableIntDatabaseField(self, "SIGNUP_MIN") + @NullableInDatabase val doNotAutoCancel = new BooleanDatabaseField(self, "DO_NOT_AUTO_CANCEL", true) - val signupMax = new NullableIntDatabaseField(self, "SIGNUP_MAX") - val formatId = new IntDatabaseField(self, "FORMAT_ID") - val cancelByOverride = new NullableDateTimeDatabaseField(self, "CANCEL_BY_OVERRIDE") - val price = new NullableDoubleDatabaseField(self, "PRICE") - val cancelledDatetime = new NullableDateTimeDatabaseField(self, "CANCELLED_DATETIME") + @NullableInDatabase val hideOnline = new BooleanDatabaseField(self, "HIDE_ONLINE", true) val locationString = new NullableStringDatabaseField(self, "LOCATION_STRING", 100) val instructorId = new NullableIntDatabaseField(self, "INSTRUCTOR_ID") } def primaryKey: IntDatabaseField = fields.instanceId -} +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassSession.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassSession.scala index d7e944e8..4446377f 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassSession.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassSession.scala @@ -3,36 +3,49 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class ApClassSession extends StorableClass(ApClassSession) { override object references extends ReferencesObject { val apClassInstance = new Initializable[ApClassInstance] } - object values extends ValuesObject { + override object values extends ValuesObject { val sessionId = new IntFieldValue(self, ApClassSession.fields.sessionId) val instanceId = new IntFieldValue(self, ApClassSession.fields.instanceId) val sessionDatetime = new DateTimeFieldValue(self, ApClassSession.fields.sessionDatetime) val isMakeup = new BooleanFieldValue(self, ApClassSession.fields.isMakeup) - val headcount = new NullableIntFieldValue(self, ApClassSession.fields.headcount) + val createdOn = new DateTimeFieldValue(self, ApClassSession.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, ApClassSession.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, ApClassSession.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, ApClassSession.fields.updatedBy) val cancelledDatetime = new NullableDateTimeFieldValue(self, ApClassSession.fields.cancelledDatetime) + val headcount = new NullableIntFieldValue(self, ApClassSession.fields.headcount) val sessionLength = new DoubleFieldValue(self, ApClassSession.fields.sessionLength) } } object ApClassSession extends StorableObject[ApClassSession] { - val entityName: String = "AP_CLASS_SESSIONS" - override val useRuntimeFieldnamesForJson: Boolean = true + override val entityName: String = "AP_CLASS_SESSIONS" + object fields extends FieldsObject { val sessionId = new IntDatabaseField(self, "SESSION_ID") val instanceId = new IntDatabaseField(self, "INSTANCE_ID") val sessionDatetime = new DateTimeDatabaseField(self, "SESSION_DATETIME") - val isMakeup = new BooleanDatabaseField(self, "IS_MAKEUP", true) - val headcount = new NullableIntDatabaseField(self, "HEADCOUNT") + val isMakeup = new BooleanDatabaseField(self, "IS_MAKEUP") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) val cancelledDatetime = new NullableDateTimeDatabaseField(self, "CANCELLED_DATETIME") + val headcount = new NullableIntDatabaseField(self, "HEADCOUNT") val sessionLength = new DoubleDatabaseField(self, "SESSION_LENGTH") } diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassSignup.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassSignup.scala index e6321f8b..c3ec9813 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassSignup.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassSignup.scala @@ -3,7 +3,10 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class ApClassSignup extends StorableClass(ApClassSignup) { override object references extends ReferencesObject { @@ -12,48 +15,59 @@ class ApClassSignup extends StorableClass(ApClassSignup) { val apClassWaitlistResult = new Initializable[Option[ApClassWaitlistResult]] } - object values extends ValuesObject { + override object values extends ValuesObject { val signupId = new IntFieldValue(self, ApClassSignup.fields.signupId) val instanceId = new IntFieldValue(self, ApClassSignup.fields.instanceId) val personId = new IntFieldValue(self, ApClassSignup.fields.personId) val orderId = new NullableIntFieldValue(self, ApClassSignup.fields.orderId) val signupDatetime = new DateTimeFieldValue(self, ApClassSignup.fields.signupDatetime) - val sequence = new IntFieldValue(self, ApClassSignup.fields.sequence) val signupType = new StringFieldValue(self, ApClassSignup.fields.signupType) - val price = new NullableDoubleFieldValue(self, ApClassSignup.fields.price) + val createdOn = new DateTimeFieldValue(self, ApClassSignup.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, ApClassSignup.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, ApClassSignup.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, ApClassSignup.fields.updatedBy) + val ccTransNum = new NullableStringFieldValue(self, ApClassSignup.fields.ccTransNum) val closeId = new NullableIntFieldValue(self, ApClassSignup.fields.closeId) val discountInstanceId = new NullableIntFieldValue(self, ApClassSignup.fields.discountInstanceId) val paymentMedium = new NullableStringFieldValue(self, ApClassSignup.fields.paymentMedium) - val ccTransNum = new NullableStringFieldValue(self, ApClassSignup.fields.ccTransNum) + val price = new NullableDoubleFieldValue(self, ApClassSignup.fields.price) + val sequence = new IntFieldValue(self, ApClassSignup.fields.sequence) val voidCloseId = new NullableIntFieldValue(self, ApClassSignup.fields.voidCloseId) + val paymentLocation = new NullableStringFieldValue(self, ApClassSignup.fields.paymentLocation) val signupNote = new NullableStringFieldValue(self, ApClassSignup.fields.signupNote) val voidedOnline = new BooleanFieldValue(self, ApClassSignup.fields.voidedOnline) - val paymentLocation = new NullableStringFieldValue(self, ApClassSignup.fields.paymentLocation) } } object ApClassSignup extends StorableObject[ApClassSignup] { - val entityName: String = "AP_CLASS_SIGNUPS" - override val useRuntimeFieldnamesForJson: Boolean = true + override val entityName: String = "AP_CLASS_SIGNUPS" + object fields extends FieldsObject { val signupId = new IntDatabaseField(self, "SIGNUP_ID") val instanceId = new IntDatabaseField(self, "INSTANCE_ID") val personId = new IntDatabaseField(self, "PERSON_ID") val orderId = new NullableIntDatabaseField(self, "ORDER_ID") val signupDatetime = new DateTimeDatabaseField(self, "SIGNUP_DATETIME") - val sequence = new IntDatabaseField(self, "SEQUENCE") val signupType = new StringDatabaseField(self, "SIGNUP_TYPE", 1) - val price = new NullableDoubleDatabaseField(self, "PRICE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val ccTransNum = new NullableStringDatabaseField(self, "CC_TRANS_NUM", 50) val closeId = new NullableIntDatabaseField(self, "CLOSE_ID") val discountInstanceId = new NullableIntDatabaseField(self, "DISCOUNT_INSTANCE_ID") val paymentMedium = new NullableStringDatabaseField(self, "PAYMENT_MEDIUM", 50) - val ccTransNum = new NullableStringDatabaseField(self, "CC_TRANS_NUM", 50) + val price = new NullableDoubleDatabaseField(self, "PRICE") + val sequence = new IntDatabaseField(self, "SEQUENCE") val voidCloseId = new NullableIntDatabaseField(self, "VOID_CLOSE_ID") + val paymentLocation = new NullableStringDatabaseField(self, "PAYMENT_LOCATION", 50) val signupNote = new NullableStringDatabaseField(self, "SIGNUP_NOTE", 4000) + @NullableInDatabase val voidedOnline = new BooleanDatabaseField(self, "VOIDED_ONLINE", true) - val paymentLocation = new NullableStringDatabaseField(self, "PAYMENT_LOCATION", 50) } def primaryKey: IntDatabaseField = fields.signupId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassType.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassType.scala index d5ef578c..6307e273 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassType.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassType.scala @@ -3,52 +3,74 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class ApClassType extends StorableClass(ApClassType) { override object references extends ReferencesObject { - val apClassFormats = new Initializable[IndexedSeq[ApClassFormat]] + val apClassFormats = new InitializableSeq[ApClassFormat, IndexedSeq[ApClassFormat]] } - object values extends ValuesObject { + override object values extends ValuesObject { val typeId = new IntFieldValue(self, ApClassType.fields.typeId) val typeName = new StringFieldValue(self, ApClassType.fields.typeName) - val ratingPrereq = new NullableIntFieldValue(self, ApClassType.fields.ratingPrereq) - val classPrereq = new NullableIntFieldValue(self, ApClassType.fields.classPrereq) - val ratingOverkill = new NullableIntFieldValue(self, ApClassType.fields.ratingOverkill) - val displayOrder = new IntFieldValue(self, ApClassType.fields.displayOrder) - val descShort = new NullableStringFieldValue(self, ApClassType.fields.descShort) - val descLong = new NullableStringFieldValue(self, ApClassType.fields.descLong) - val classOverkill = new NullableIntFieldValue(self, ApClassType.fields.classOverkill) - val noSignup = new BooleanFieldValue(self, ApClassType.fields.noSignup) + val ratingPrereq = new NullableIntFieldValue(self, ApClassType.fields.ratingPrereq) + val classPrereq = new NullableIntFieldValue(self, ApClassType.fields.classPrereq) + val ratingOverkill = new NullableIntFieldValue(self, ApClassType.fields.ratingOverkill) + val createdOn = new DateTimeFieldValue(self, ApClassType.fields.createdOn) + val createdBy = new StringFieldValue(self, ApClassType.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, ApClassType.fields.updatedOn) + val updatedBy = new StringFieldValue(self, ApClassType.fields.updatedBy) + val displayOrder = new DoubleFieldValue(self, ApClassType.fields.displayOrder) + val descLong = new StringFieldValue(self, ApClassType.fields.descLong) + val descShort = new NullableStringFieldValue(self, ApClassType.fields.descShort) + val classOverkill = new NullableIntFieldValue(self, ApClassType.fields.classOverkill) + val colorCode = new NullableStringFieldValue(self, ApClassType.fields.colorCode) + val noSignup = new BooleanFieldValue(self, ApClassType.fields.noSignup) val priceDefault = new NullableDoubleFieldValue(self, ApClassType.fields.priceDefault) - val signupMinDefault = new NullableIntFieldValue(self, ApClassType.fields.signupMinDefault) - val signupMaxDefault = new NullableIntFieldValue(self, ApClassType.fields.signupMaxDefault) - val disallowIfOverkill = new BooleanFieldValue(self, ApClassType.fields.disallowIfOverkill) + val signupMaxDefault = new NullableIntFieldValue(self, ApClassType.fields.signupMaxDefault) + val signupMinDefault = new NullableIntFieldValue(self, ApClassType.fields.signupMinDefault) + val disallowIfOverkill = new BooleanFieldValue(self, ApClassType.fields.disallowIfOverkill) + val teachUrl = new NullableStringFieldValue(self, ApClassType.fields.teachUrl) } } object ApClassType extends StorableObject[ApClassType] { - val entityName: String = "AP_CLASS_TYPES" - override val useRuntimeFieldnamesForJson: Boolean = true + override val entityName: String = "AP_CLASS_TYPES" + object fields extends FieldsObject { val typeId = new IntDatabaseField(self, "TYPE_ID") val typeName = new StringDatabaseField(self, "TYPE_NAME", 200) val ratingPrereq = new NullableIntDatabaseField(self, "RATING_PREREQ") val classPrereq = new NullableIntDatabaseField(self, "CLASS_PREREQ") val ratingOverkill = new NullableIntDatabaseField(self, "RATING_OVERKILL") - val displayOrder = new IntDatabaseField(self, "DISPLAY_ORDER") - val descShort = new NullableStringDatabaseField(self, "DESC_SHORT", 4000) - val descLong = new NullableStringDatabaseField(self, "DESC_LONG", 4000) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val displayOrder = new DoubleDatabaseField(self, "DISPLAY_ORDER") + @NullableInDatabase + val descLong = new StringDatabaseField(self, "DESC_LONG", -1) + val descShort = new NullableStringDatabaseField(self, "DESC_SHORT", -1) val classOverkill = new NullableIntDatabaseField(self, "CLASS_OVERKILL") + val colorCode = new NullableStringDatabaseField(self, "COLOR_CODE", 6) + @NullableInDatabase val noSignup = new BooleanDatabaseField(self, "NO_SIGNUP", true) val priceDefault = new NullableDoubleDatabaseField(self, "PRICE_DEFAULT") - val signupMinDefault = new NullableIntDatabaseField(self, "SIGNUP_MIN_DEFAULT") val signupMaxDefault = new NullableIntDatabaseField(self, "SIGNUP_MAX_DEFAULT") + val signupMinDefault = new NullableIntDatabaseField(self, "SIGNUP_MIN_DEFAULT") + @NullableInDatabase val disallowIfOverkill = new BooleanDatabaseField(self, "DISALLOW_IF_OVERKILL", true) + val teachUrl = new NullableStringDatabaseField(self, "TEACH_URL", 100) } def primaryKey: IntDatabaseField = fields.typeId -} +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassTypeOverride.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassTypeOverride.scala new file mode 100644 index 00000000..e17ac431 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassTypeOverride.scala @@ -0,0 +1,43 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class ApClassTypeOverride extends StorableClass(ApClassTypeOverride) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, ApClassTypeOverride.fields.rowId) + val personId = new IntFieldValue(self, ApClassTypeOverride.fields.personId) + val typeId = new IntFieldValue(self, ApClassTypeOverride.fields.typeId) + val season = new DoubleFieldValue(self, ApClassTypeOverride.fields.season) + val createdOn = new NullableDateTimeFieldValue(self, ApClassTypeOverride.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, ApClassTypeOverride.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, ApClassTypeOverride.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, ApClassTypeOverride.fields.updatedBy) + val isForOverkill = new BooleanFieldValue(self, ApClassTypeOverride.fields.isForOverkill) + } +} + +object ApClassTypeOverride extends StorableObject[ApClassTypeOverride] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "AP_CLASS_TYPE_OVERRIDES" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + val personId = new IntDatabaseField(self, "PERSON_ID") + val typeId = new IntDatabaseField(self, "TYPE_ID") + val season = new DoubleDatabaseField(self, "SEASON") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val isForOverkill = new BooleanDatabaseField(self, "IS_FOR_OVERKILL", false) + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassTypesSeason.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassTypesSeason.scala new file mode 100644 index 00000000..ee62165f --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassTypesSeason.scala @@ -0,0 +1,31 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class ApClassTypesSeason extends StorableClass(ApClassTypesSeason) { + override object values extends ValuesObject { + val assignId = new IntFieldValue(self, ApClassTypesSeason.fields.assignId) + val typeId = new IntFieldValue(self, ApClassTypesSeason.fields.typeId) + val season = new DoubleFieldValue(self, ApClassTypesSeason.fields.season) + } +} + +object ApClassTypesSeason extends StorableObject[ApClassTypesSeason] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "AP_CLASS_TYPES_SEASONS" + + object fields extends FieldsObject { + val assignId = new IntDatabaseField(self, "ASSIGN_ID") + val typeId = new IntDatabaseField(self, "TYPE_ID") + val season = new DoubleDatabaseField(self, "SEASON") + } + + def primaryKey: IntDatabaseField = fields.assignId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassVoucher.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassVoucher.scala new file mode 100644 index 00000000..4c9dcd1e --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassVoucher.scala @@ -0,0 +1,49 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class ApClassVoucher extends StorableClass(ApClassVoucher) { + override object values extends ValuesObject { + val voucherId = new IntFieldValue(self, ApClassVoucher.fields.voucherId) + val personId = new IntFieldValue(self, ApClassVoucher.fields.personId) + val season = new DoubleFieldValue(self, ApClassVoucher.fields.season) + val value = new DoubleFieldValue(self, ApClassVoucher.fields.value) + val createdOn = new NullableDateTimeFieldValue(self, ApClassVoucher.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, ApClassVoucher.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, ApClassVoucher.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, ApClassVoucher.fields.updatedBy) + val closeId = new IntFieldValue(self, ApClassVoucher.fields.closeId) + val voidCloseId = new NullableIntFieldValue(self, ApClassVoucher.fields.voidCloseId) + val signupId = new NullableIntFieldValue(self, ApClassVoucher.fields.signupId) + val createdOnline = new NullableBooleanFieldValue(self, ApClassVoucher.fields.createdOnline) + } +} + +object ApClassVoucher extends StorableObject[ApClassVoucher] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "AP_CLASS_VOUCHERS" + + object fields extends FieldsObject { + val voucherId = new IntDatabaseField(self, "VOUCHER_ID") + val personId = new IntDatabaseField(self, "PERSON_ID") + val season = new DoubleDatabaseField(self, "SEASON") + val value = new DoubleDatabaseField(self, "VALUE") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val closeId = new IntDatabaseField(self, "CLOSE_ID") + val voidCloseId = new NullableIntDatabaseField(self, "VOID_CLOSE_ID") + val signupId = new NullableIntDatabaseField(self, "SIGNUP_ID") + val createdOnline = new NullableBooleanDatabaseField(self, "CREATED_ONLINE") + } + + def primaryKey: IntDatabaseField = fields.voucherId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassWaitlistResult.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassWaitlistResult.scala index 7fd5951d..e7042fd1 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassWaitlistResult.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ApClassWaitlistResult.scala @@ -1,33 +1,50 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{BooleanFieldValue, IntFieldValue, NullableDateTimeFieldValue, StringFieldValue} -import com.coleji.neptune.Storable.Fields.{BooleanDatabaseField, IntDatabaseField, NullableDateTimeDatabaseField, StringDatabaseField} -import com.coleji.neptune.Storable.{FieldsObject, StorableClass, StorableObject, ValuesObject} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class ApClassWaitlistResult extends StorableClass(ApClassWaitlistResult) { - object values extends ValuesObject { + override object values extends ValuesObject { val signupId = new IntFieldValue(self, ApClassWaitlistResult.fields.signupId) val foVmDatetime = new NullableDateTimeFieldValue(self, ApClassWaitlistResult.fields.foVmDatetime) val wlResult = new StringFieldValue(self, ApClassWaitlistResult.fields.wlResult) - val offerExpDatetime = new NullableDateTimeFieldValue(self, ApClassWaitlistResult.fields.offerExpDatetime) - val foAlertDatetime = new NullableDateTimeFieldValue(self, ApClassWaitlistResult.fields.foAlertDatetime) + val offerExpDatetime = new DateTimeFieldValue(self, ApClassWaitlistResult.fields.offerExpDatetime) + val foAlertDatetime = new DateTimeFieldValue(self, ApClassWaitlistResult.fields.foAlertDatetime) val permitOvercrowd = new BooleanFieldValue(self, ApClassWaitlistResult.fields.permitOvercrowd) + val createdOn = new DateTimeFieldValue(self, ApClassWaitlistResult.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, ApClassWaitlistResult.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, ApClassWaitlistResult.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, ApClassWaitlistResult.fields.updatedBy) } } object ApClassWaitlistResult extends StorableObject[ApClassWaitlistResult] { - val entityName: String = "AP_CLASS_WL_RESULTS" - override val useRuntimeFieldnamesForJson: Boolean = true + override val entityName: String = "AP_CLASS_WL_RESULTS" + object fields extends FieldsObject { val signupId = new IntDatabaseField(self, "SIGNUP_ID") val foVmDatetime = new NullableDateTimeDatabaseField(self, "FO_VM_DATETIME") val wlResult = new StringDatabaseField(self, "WL_RESULT", 1) - val offerExpDatetime = new NullableDateTimeDatabaseField(self, "OFFER_EXP_DATETIME") - val foAlertDatetime = new NullableDateTimeDatabaseField(self, "FO_ALERT_DATETIME") + @NullableInDatabase + val offerExpDatetime = new DateTimeDatabaseField(self, "OFFER_EXP_DATETIME") + @NullableInDatabase + val foAlertDatetime = new DateTimeDatabaseField(self, "FO_ALERT_DATETIME") + @NullableInDatabase val permitOvercrowd = new BooleanDatabaseField(self, "PERMIT_OVERCROWD", true) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) } def primaryKey: IntDatabaseField = fields.signupId -} +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AppIdIndex.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AppIdIndex.scala new file mode 100644 index 00000000..743e3c75 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AppIdIndex.scala @@ -0,0 +1,41 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class AppIdIndex extends StorableClass(AppIdIndex) { + override object values extends ValuesObject { + val indexId = new IntFieldValue(self, AppIdIndex.fields.indexId) + val appAlias = new NullableStringFieldValue(self, AppIdIndex.fields.appAlias) + val appId = new NullableIntFieldValue(self, AppIdIndex.fields.appId) + val createdOn = new NullableDateTimeFieldValue(self, AppIdIndex.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, AppIdIndex.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, AppIdIndex.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, AppIdIndex.fields.updatedBy) + val appName = new NullableStringFieldValue(self, AppIdIndex.fields.appName) + } +} + +object AppIdIndex extends StorableObject[AppIdIndex] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "APP_ID_INDEX" + + object fields extends FieldsObject { + val indexId = new IntDatabaseField(self, "INDEX_ID") + val appAlias = new NullableStringDatabaseField(self, "APP_ALIAS", 200) + val appId = new NullableIntDatabaseField(self, "APP_ID") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val appName = new NullableStringDatabaseField(self, "APP_NAME", 100) + } + + def primaryKey: IntDatabaseField = fields.indexId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AppPrivilege.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AppPrivilege.scala new file mode 100644 index 00000000..5c9291e8 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AppPrivilege.scala @@ -0,0 +1,39 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class AppPrivilege extends StorableClass(AppPrivilege) { + override object values extends ValuesObject { + val privilegeId = new IntFieldValue(self, AppPrivilege.fields.privilegeId) + val privilegeName = new NullableStringFieldValue(self, AppPrivilege.fields.privilegeName) + val createdOn = new NullableDateTimeFieldValue(self, AppPrivilege.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, AppPrivilege.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, AppPrivilege.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, AppPrivilege.fields.updatedBy) + val groupId = new NullableIntFieldValue(self, AppPrivilege.fields.groupId) + } +} + +object AppPrivilege extends StorableObject[AppPrivilege] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "APP_PRIVILEGES" + + object fields extends FieldsObject { + val privilegeId = new IntDatabaseField(self, "PRIVILEGE_ID") + val privilegeName = new NullableStringDatabaseField(self, "PRIVILEGE_NAME", 100) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val groupId = new NullableIntDatabaseField(self, "GROUP_ID") + } + + def primaryKey: IntDatabaseField = fields.privilegeId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AppPrivilegeGroup.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AppPrivilegeGroup.scala new file mode 100644 index 00000000..ba3d5820 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/AppPrivilegeGroup.scala @@ -0,0 +1,37 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class AppPrivilegeGroup extends StorableClass(AppPrivilegeGroup) { + override object values extends ValuesObject { + val groupId = new IntFieldValue(self, AppPrivilegeGroup.fields.groupId) + val groupName = new NullableStringFieldValue(self, AppPrivilegeGroup.fields.groupName) + val createdOn = new NullableDateTimeFieldValue(self, AppPrivilegeGroup.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, AppPrivilegeGroup.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, AppPrivilegeGroup.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, AppPrivilegeGroup.fields.updatedBy) + } +} + +object AppPrivilegeGroup extends StorableObject[AppPrivilegeGroup] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "APP_PRIVILEGE_GROUPS" + + object fields extends FieldsObject { + val groupId = new IntDatabaseField(self, "GROUP_ID") + val groupName = new NullableStringDatabaseField(self, "GROUP_NAME", 500) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.groupId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/BoatRating.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/BoatRating.scala index 645962dc..474098a1 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/BoatRating.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/BoatRating.scala @@ -3,28 +3,48 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class BoatRating extends StorableClass(BoatRating) { - object values extends ValuesObject { + override object values extends ValuesObject { val assignId = new IntFieldValue(self, BoatRating.fields.assignId) val boatId = new IntFieldValue(self, BoatRating.fields.boatId) val programId = new IntFieldValue(self, BoatRating.fields.programId) val flag = new StringFieldValue(self, BoatRating.fields.flag) val ratingId = new IntFieldValue(self, BoatRating.fields.ratingId) + val createdOn = new DateTimeFieldValue(self, BoatRating.fields.createdOn) + val createdBy = new StringFieldValue(self, BoatRating.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, BoatRating.fields.updatedOn) + val updatedBy = new StringFieldValue(self, BoatRating.fields.updatedBy) } } object BoatRating extends StorableObject[BoatRating] { override val useRuntimeFieldnamesForJson: Boolean = true - val entityName: String = "BOATS_RATINGS" + override val entityName: String = "BOATS_RATINGS" object fields extends FieldsObject { val assignId = new IntDatabaseField(self, "ASSIGN_ID") + @NullableInDatabase val boatId = new IntDatabaseField(self, "BOAT_ID") + @NullableInDatabase val programId = new IntDatabaseField(self, "PROGRAM_ID") + @NullableInDatabase val flag = new StringDatabaseField(self, "FLAG", 1) + @NullableInDatabase val ratingId = new IntDatabaseField(self, "RATING_ID") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) } def primaryKey: IntDatabaseField = fields.assignId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/BoatType.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/BoatType.scala index 9fda9b26..3d7164e5 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/BoatType.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/BoatType.scala @@ -3,30 +3,52 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class BoatType extends StorableClass(BoatType) { - object values extends ValuesObject { + override object values extends ValuesObject { val boatId = new IntFieldValue(self, BoatType.fields.boatId) - val boatName = new NullableStringFieldValue(self, BoatType.fields.boatName) - val active = new BooleanFieldValue(self, BoatType.fields.active) - val displayOrder = new NullableDoubleFieldValue(self, BoatType.fields.displayOrder) - val minCrew = new NullableIntFieldValue(self, BoatType.fields.minCrew) - val maxCrew = new NullableIntFieldValue(self, BoatType.fields.maxCrew) + val boatName = new StringFieldValue(self, BoatType.fields.boatName) + val active = new NullableBooleanFieldValue(self, BoatType.fields.active) + val displayOrder = new DoubleFieldValue(self, BoatType.fields.displayOrder) + val createdOn = new DateTimeFieldValue(self, BoatType.fields.createdOn) + val createdBy = new StringFieldValue(self, BoatType.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, BoatType.fields.updatedOn) + val updatedBy = new StringFieldValue(self, BoatType.fields.updatedBy) + val minCrew = new DoubleFieldValue(self, BoatType.fields.minCrew) + val maxCrew = new DoubleFieldValue(self, BoatType.fields.maxCrew) + val imageFilename = new NullableStringFieldValue(self, BoatType.fields.imageFilename) } } object BoatType extends StorableObject[BoatType] { override val useRuntimeFieldnamesForJson: Boolean = true - val entityName: String = "BOAT_TYPES" + override val entityName: String = "BOAT_TYPES" object fields extends FieldsObject { val boatId = new IntDatabaseField(self, "BOAT_ID") - val boatName = new NullableStringDatabaseField(self, "BOAT_NAME", 50) - val active = new BooleanDatabaseField(self, "ACTIVE", true) - val displayOrder = new NullableDoubleDatabaseField(self, "DISPLAY_ORDER") - val minCrew = new NullableIntDatabaseField(self, "MIN_CREW") - val maxCrew = new NullableIntDatabaseField(self, "MAX_CREW") + @NullableInDatabase + val boatName = new StringDatabaseField(self, "BOAT_NAME", 50) + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + @NullableInDatabase + val displayOrder = new DoubleDatabaseField(self, "DISPLAY_ORDER") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase + val minCrew = new DoubleDatabaseField(self, "MIN_CREW") + @NullableInDatabase + val maxCrew = new DoubleDatabaseField(self, "MAX_CREW") + val imageFilename = new NullableStringDatabaseField(self, "IMAGE_FILENAME", 50) } def primaryKey: IntDatabaseField = fields.boatId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/BudgetItem.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/BudgetItem.scala new file mode 100644 index 00000000..70ccfb7b --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/BudgetItem.scala @@ -0,0 +1,40 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class BudgetItem extends StorableClass(BudgetItem) { + override object values extends ValuesObject { + val itemId = new IntFieldValue(self, BudgetItem.fields.itemId) + val itemName = new StringFieldValue(self, BudgetItem.fields.itemName) + val createdOn = new NullableDateTimeFieldValue(self, BudgetItem.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, BudgetItem.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, BudgetItem.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, BudgetItem.fields.updatedBy) + val displayOrder = new DoubleFieldValue(self, BudgetItem.fields.displayOrder) + } +} + +object BudgetItem extends StorableObject[BudgetItem] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "BUDGET_ITEMS" + + object fields extends FieldsObject { + val itemId = new IntDatabaseField(self, "ITEM_ID") + val itemName = new StringDatabaseField(self, "ITEM_NAME", 200) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase + val displayOrder = new DoubleDatabaseField(self, "DISPLAY_ORDER") + } + + def primaryKey: IntDatabaseField = fields.itemId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CardDefinition.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CardDefinition.scala new file mode 100644 index 00000000..d8ffdc05 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CardDefinition.scala @@ -0,0 +1,37 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class CardDefinition extends StorableClass(CardDefinition) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, CardDefinition.fields.rowId) + val cardNumber = new StringFieldValue(self, CardDefinition.fields.cardNumber) + val programId = new NullableIntFieldValue(self, CardDefinition.fields.programId) + val comments = new NullableStringFieldValue(self, CardDefinition.fields.comments) + val typeId = new IntFieldValue(self, CardDefinition.fields.typeId) + } +} + +object CardDefinition extends StorableObject[CardDefinition] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "CARD_DEFINITIONS" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + @NullableInDatabase + val cardNumber = new StringDatabaseField(self, "CARD_NUMBER", 20) + val programId = new NullableIntDatabaseField(self, "PROGRAM_ID") + val comments = new NullableStringDatabaseField(self, "COMMENTS", 200) + @NullableInDatabase + val typeId = new IntDatabaseField(self, "TYPE_ID") + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CardDefinitionType.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CardDefinitionType.scala new file mode 100644 index 00000000..65690306 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CardDefinitionType.scala @@ -0,0 +1,32 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class CardDefinitionType extends StorableClass(CardDefinitionType) { + override object values extends ValuesObject { + val typeId = new IntFieldValue(self, CardDefinitionType.fields.typeId) + val typeName = new StringFieldValue(self, CardDefinitionType.fields.typeName) + val warnAt = new NullableDoubleFieldValue(self, CardDefinitionType.fields.warnAt) + } +} + +object CardDefinitionType extends StorableObject[CardDefinitionType] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "CARD_DEFINITION_TYPES" + + object fields extends FieldsObject { + val typeId = new IntDatabaseField(self, "TYPE_ID") + @NullableInDatabase + val typeName = new StringDatabaseField(self, "TYPE_NAME", 100) + val warnAt = new NullableDoubleDatabaseField(self, "WARN_AT") + } + + def primaryKey: IntDatabaseField = fields.typeId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CardDismissal.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CardDismissal.scala new file mode 100644 index 00000000..f81ad679 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CardDismissal.scala @@ -0,0 +1,45 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class CardDismissal extends StorableClass(CardDismissal) { + override object values extends ValuesObject { + val dismissalId = new IntFieldValue(self, CardDismissal.fields.dismissalId) + val cardAssignId = new IntFieldValue(self, CardDismissal.fields.cardAssignId) + val season = new DoubleFieldValue(self, CardDismissal.fields.season) + val createdOn = new DateTimeFieldValue(self, CardDismissal.fields.createdOn) + val createdBy = new StringFieldValue(self, CardDismissal.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, CardDismissal.fields.updatedOn) + val updatedBy = new StringFieldValue(self, CardDismissal.fields.updatedBy) + } +} + +object CardDismissal extends StorableObject[CardDismissal] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "CARD_DISMISSALS" + + object fields extends FieldsObject { + val dismissalId = new IntDatabaseField(self, "DISMISSAL_ID") + @NullableInDatabase + val cardAssignId = new IntDatabaseField(self, "CARD_ASSIGN_ID") + @NullableInDatabase + val season = new DoubleDatabaseField(self, "SEASON") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.dismissalId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CcErrorCode.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CcErrorCode.scala new file mode 100644 index 00000000..fa2eef87 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CcErrorCode.scala @@ -0,0 +1,43 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class CcErrorCode extends StorableClass(CcErrorCode) { + override object values extends ValuesObject { + val errorId = new IntFieldValue(self, CcErrorCode.fields.errorId) + val errorCode = new NullableStringFieldValue(self, CcErrorCode.fields.errorCode) + val displayErrorMessage = new NullableStringFieldValue(self, CcErrorCode.fields.displayErrorMessage) + val createdOn = new NullableDateTimeFieldValue(self, CcErrorCode.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, CcErrorCode.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, CcErrorCode.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, CcErrorCode.fields.updatedBy) + val sageErrorMessage = new NullableStringFieldValue(self, CcErrorCode.fields.sageErrorMessage) + val errorTitle = new NullableStringFieldValue(self, CcErrorCode.fields.errorTitle) + } +} + +object CcErrorCode extends StorableObject[CcErrorCode] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "CC_ERROR_CODES" + + object fields extends FieldsObject { + val errorId = new IntDatabaseField(self, "ERROR_ID") + val errorCode = new NullableStringDatabaseField(self, "ERROR_CODE", 10) + val displayErrorMessage = new NullableStringDatabaseField(self, "DISPLAY_ERROR_MESSAGE", 4000) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val sageErrorMessage = new NullableStringDatabaseField(self, "SAGE_ERROR_MESSAGE", 4000) + val errorTitle = new NullableStringDatabaseField(self, "ERROR_TITLE", 200) + } + + def primaryKey: IntDatabaseField = fields.errorId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CcLog.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CcLog.scala new file mode 100644 index 00000000..5bbe4b3d --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CcLog.scala @@ -0,0 +1,87 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class CcLog extends StorableClass(CcLog) { + override object values extends ValuesObject { + val logId = new IntFieldValue(self, CcLog.fields.logId) + val logDatetime = new NullableDateTimeFieldValue(self, CcLog.fields.logDatetime) + val cName = new NullableStringFieldValue(self, CcLog.fields.cName) + val cAddr = new NullableStringFieldValue(self, CcLog.fields.cAddr) + val cCity = new NullableStringFieldValue(self, CcLog.fields.cCity) + val cState = new NullableStringFieldValue(self, CcLog.fields.cState) + val cZip = new NullableStringFieldValue(self, CcLog.fields.cZip) + val cCountry = new NullableStringFieldValue(self, CcLog.fields.cCountry) + val cEmail = new NullableStringFieldValue(self, CcLog.fields.cEmail) + val cCardnumber = new NullableStringFieldValue(self, CcLog.fields.cCardnumber) + val cExp = new NullableStringFieldValue(self, CcLog.fields.cExp) + val tAmt = new NullableDoubleFieldValue(self, CcLog.fields.tAmt) + val tCode = new NullableStringFieldValue(self, CcLog.fields.tCode) + val tOrdernum = new NullableStringFieldValue(self, CcLog.fields.tOrdernum) + val tAuth = new NullableStringFieldValue(self, CcLog.fields.tAuth) + val tReference = new NullableStringFieldValue(self, CcLog.fields.tReference) + val response = new NullableStringFieldValue(self, CcLog.fields.response) + val rApprov = new NullableStringFieldValue(self, CcLog.fields.rApprov) + val rCode = new NullableStringFieldValue(self, CcLog.fields.rCode) + val rMessage = new NullableStringFieldValue(self, CcLog.fields.rMessage) + val rCvv = new NullableStringFieldValue(self, CcLog.fields.rCvv) + val rAvs = new NullableStringFieldValue(self, CcLog.fields.rAvs) + val rRisk = new NullableStringFieldValue(self, CcLog.fields.rRisk) + val rReference = new NullableStringFieldValue(self, CcLog.fields.rReference) + val rOrdernumber = new NullableStringFieldValue(self, CcLog.fields.rOrdernumber) + val createdOn = new DateTimeFieldValue(self, CcLog.fields.createdOn) + val createdBy = new StringFieldValue(self, CcLog.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, CcLog.fields.updatedOn) + val updatedBy = new StringFieldValue(self, CcLog.fields.updatedBy) + } +} + +object CcLog extends StorableObject[CcLog] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "CC_LOG" + + object fields extends FieldsObject { + val logId = new IntDatabaseField(self, "LOG_ID") + val logDatetime = new NullableDateTimeDatabaseField(self, "LOG_DATETIME") + val cName = new NullableStringDatabaseField(self, "C_NAME", 500) + val cAddr = new NullableStringDatabaseField(self, "C_ADDR", 500) + val cCity = new NullableStringDatabaseField(self, "C_CITY", 50) + val cState = new NullableStringDatabaseField(self, "C_STATE", 50) + val cZip = new NullableStringDatabaseField(self, "C_ZIP", 10) + val cCountry = new NullableStringDatabaseField(self, "C_COUNTRY", 100) + val cEmail = new NullableStringDatabaseField(self, "C_EMAIL", 100) + val cCardnumber = new NullableStringDatabaseField(self, "C_CARDNUMBER", 30) + val cExp = new NullableStringDatabaseField(self, "C_EXP", 10) + val tAmt = new NullableDoubleDatabaseField(self, "T_AMT") + val tCode = new NullableStringDatabaseField(self, "T_CODE", 5) + val tOrdernum = new NullableStringDatabaseField(self, "T_ORDERNUM", 20) + val tAuth = new NullableStringDatabaseField(self, "T_AUTH", 50) + val tReference = new NullableStringDatabaseField(self, "T_REFERENCE", 50) + val response = new NullableStringDatabaseField(self, "RESPONSE", 200) + val rApprov = new NullableStringDatabaseField(self, "R_APPROV", 1) + val rCode = new NullableStringDatabaseField(self, "R_CODE", 10) + val rMessage = new NullableStringDatabaseField(self, "R_MESSAGE", 50) + val rCvv = new NullableStringDatabaseField(self, "R_CVV", 1) + val rAvs = new NullableStringDatabaseField(self, "R_AVS", 1) + val rRisk = new NullableStringDatabaseField(self, "R_RISK", 50) + val rReference = new NullableStringDatabaseField(self, "R_REFERENCE", 100) + val rOrdernumber = new NullableStringDatabaseField(self, "R_ORDERNUMBER", 100) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.logId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ClassInstructor.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ClassInstructor.scala index 1b7e784f..5771467d 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ClassInstructor.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ClassInstructor.scala @@ -1,24 +1,42 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{IntFieldValue, StringFieldValue} -import com.coleji.neptune.Storable.Fields.{IntDatabaseField, StringDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class ClassInstructor extends StorableClass(ClassInstructor) { - object values extends ValuesObject { + override object values extends ValuesObject { val instructorId = new IntFieldValue(self, ClassInstructor.fields.instructorId) val nameFirst = new StringFieldValue(self, ClassInstructor.fields.nameFirst) val nameLast = new StringFieldValue(self, ClassInstructor.fields.nameLast) + val createdOn = new NullableDateTimeFieldValue(self, ClassInstructor.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, ClassInstructor.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, ClassInstructor.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, ClassInstructor.fields.updatedBy) + val active = new NullableBooleanFieldValue(self, ClassInstructor.fields.active) } } object ClassInstructor extends StorableObject[ClassInstructor] { - val entityName: String = "CLASS_INSTRUCTORS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "CLASS_INSTRUCTORS" object fields extends FieldsObject { val instructorId = new IntDatabaseField(self, "INSTRUCTOR_ID") + @NullableInDatabase val nameFirst = new StringDatabaseField(self, "NAME_FIRST", 100) + @NullableInDatabase val nameLast = new StringDatabaseField(self, "NAME_LAST", 100) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val active = new NullableBooleanDatabaseField(self, "ACTIVE") } def primaryKey: IntDatabaseField = fields.instructorId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ClassLocation.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ClassLocation.scala index a276f242..2185c5a2 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ClassLocation.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ClassLocation.scala @@ -1,24 +1,40 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{BooleanFieldValue, IntFieldValue, StringFieldValue} -import com.coleji.neptune.Storable.Fields.{BooleanDatabaseField, IntDatabaseField, StringDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class ClassLocation extends StorableClass(ClassLocation) { - object values extends ValuesObject { + override object values extends ValuesObject { val locationId = new IntFieldValue(self, ClassLocation.fields.locationId) val locationName = new StringFieldValue(self, ClassLocation.fields.locationName) val active = new BooleanFieldValue(self, ClassLocation.fields.active) + val createdOn = new NullableDateTimeFieldValue(self, ClassLocation.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, ClassLocation.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, ClassLocation.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, ClassLocation.fields.updatedBy) } } object ClassLocation extends StorableObject[ClassLocation] { - val entityName: String = "CLASS_LOCATIONS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "CLASS_LOCATIONS" object fields extends FieldsObject { val locationId = new IntDatabaseField(self, "LOCATION_ID") + @NullableInDatabase val locationName = new StringDatabaseField(self, "LOCATION_NAME", 100) - val active = new BooleanDatabaseField(self, "ACTIVE", true) + @NullableInDatabase + val active = new BooleanDatabaseField(self, "ACTIVE", false) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) } def primaryKey: IntDatabaseField = fields.locationId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CommentsColumn.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CommentsColumn.scala new file mode 100644 index 00000000..622cc2c1 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CommentsColumn.scala @@ -0,0 +1,34 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class CommentsColumn extends StorableClass(CommentsColumn) { + override object values extends ValuesObject { + val columnId = new IntFieldValue(self, CommentsColumn.fields.columnId) + val columnName = new StringFieldValue(self, CommentsColumn.fields.columnName) + val commentText = new NullableStringFieldValue(self, CommentsColumn.fields.commentText) + val tableId = new IntFieldValue(self, CommentsColumn.fields.tableId) + } +} + +object CommentsColumn extends StorableObject[CommentsColumn] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "COMMENTS_COLUMNS" + + object fields extends FieldsObject { + val columnId = new IntDatabaseField(self, "COLUMN_ID") + @NullableInDatabase + val columnName = new StringDatabaseField(self, "COLUMN_NAME", 50) + val commentText = new NullableStringDatabaseField(self, "COMMENT_TEXT", -1) + val tableId = new IntDatabaseField(self, "TABLE_ID") + } + + def primaryKey: IntDatabaseField = fields.columnId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CommentsTable.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CommentsTable.scala new file mode 100644 index 00000000..02c0fc48 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CommentsTable.scala @@ -0,0 +1,32 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class CommentsTable extends StorableClass(CommentsTable) { + override object values extends ValuesObject { + val tableId = new IntFieldValue(self, CommentsTable.fields.tableId) + val tableName = new StringFieldValue(self, CommentsTable.fields.tableName) + val commentText = new NullableStringFieldValue(self, CommentsTable.fields.commentText) + } +} + +object CommentsTable extends StorableObject[CommentsTable] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "COMMENTS_TABLES" + + object fields extends FieldsObject { + val tableId = new IntDatabaseField(self, "TABLE_ID") + @NullableInDatabase + val tableName = new StringDatabaseField(self, "TABLE_NAME", 50) + val commentText = new NullableStringDatabaseField(self, "COMMENT_TEXT", -1) + } + + def primaryKey: IntDatabaseField = fields.tableId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ConstCont20140623.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ConstCont20140623.scala new file mode 100644 index 00000000..927d6880 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ConstCont20140623.scala @@ -0,0 +1,75 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class ConstCont20140623 extends StorableClass(ConstCont20140623) { + override object values extends ValuesObject { + val id = new IntFieldValue(self, ConstCont20140623.fields.id) + val firstName = new NullableStringFieldValue(self, ConstCont20140623.fields.firstName) + val lastName = new NullableStringFieldValue(self, ConstCont20140623.fields.lastName) + val company = new NullableStringFieldValue(self, ConstCont20140623.fields.company) + val jobTitle = new NullableStringFieldValue(self, ConstCont20140623.fields.jobTitle) + val emailAddressHome = new NullableStringFieldValue(self, ConstCont20140623.fields.emailAddressHome) + val emailAddressOther = new NullableStringFieldValue(self, ConstCont20140623.fields.emailAddressOther) + val streetAddressLine1Home = new NullableStringFieldValue(self, ConstCont20140623.fields.streetAddressLine1Home) + val cityHome = new NullableStringFieldValue(self, ConstCont20140623.fields.cityHome) + val stateprovinceHome = new NullableStringFieldValue(self, ConstCont20140623.fields.stateprovinceHome) + val zippostalCodeHome = new NullableStringFieldValue(self, ConstCont20140623.fields.zippostalCodeHome) + val countryHome = new NullableStringFieldValue(self, ConstCont20140623.fields.countryHome) + val streetAddressLine1Work = new NullableStringFieldValue(self, ConstCont20140623.fields.streetAddressLine1Work) + val cityWork = new NullableStringFieldValue(self, ConstCont20140623.fields.cityWork) + val stateprovinceWork = new NullableStringFieldValue(self, ConstCont20140623.fields.stateprovinceWork) + val zippostalCodeWork = new NullableStringFieldValue(self, ConstCont20140623.fields.zippostalCodeWork) + val countryWork = new NullableStringFieldValue(self, ConstCont20140623.fields.countryWork) + val customField1 = new NullableStringFieldValue(self, ConstCont20140623.fields.customField1) + val customField2 = new NullableStringFieldValue(self, ConstCont20140623.fields.customField2) + val customField3 = new NullableStringFieldValue(self, ConstCont20140623.fields.customField3) + val emailLists = new NullableStringFieldValue(self, ConstCont20140623.fields.emailLists) + val sourceName = new NullableStringFieldValue(self, ConstCont20140623.fields.sourceName) + val createdAt = new StringFieldValue(self, ConstCont20140623.fields.createdAt) + val updatedAt = new StringFieldValue(self, ConstCont20140623.fields.updatedAt) + } +} + +object ConstCont20140623 extends StorableObject[ConstCont20140623] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "CONST_CONT_2014_06_23" + + object fields extends FieldsObject { + val id = new IntDatabaseField(self, "ID") + val firstName = new NullableStringDatabaseField(self, "FIRST_NAME", 100) + val lastName = new NullableStringDatabaseField(self, "LAST_NAME", 100) + val company = new NullableStringDatabaseField(self, "COMPANY", 100) + val jobTitle = new NullableStringDatabaseField(self, "JOB_TITLE", 100) + val emailAddressHome = new NullableStringDatabaseField(self, "EMAIL_ADDRESS___HOME", 500) + val emailAddressOther = new NullableStringDatabaseField(self, "EMAIL_ADDRESS___OTHER", 500) + val streetAddressLine1Home = new NullableStringDatabaseField(self, "STREET_ADDRESS_LINE_1___HOME", 500) + val cityHome = new NullableStringDatabaseField(self, "CITY___HOME", 50) + val stateprovinceHome = new NullableStringDatabaseField(self, "STATEPROVINCE___HOME", 50) + val zippostalCodeHome = new NullableStringDatabaseField(self, "ZIPPOSTAL_CODE___HOME", 50) + val countryHome = new NullableStringDatabaseField(self, "COUNTRY___HOME", 50) + val streetAddressLine1Work = new NullableStringDatabaseField(self, "STREET_ADDRESS_LINE_1___WORK", 50) + val cityWork = new NullableStringDatabaseField(self, "CITY___WORK", 50) + val stateprovinceWork = new NullableStringDatabaseField(self, "STATEPROVINCE___WORK", 50) + val zippostalCodeWork = new NullableStringDatabaseField(self, "ZIPPOSTAL_CODE___WORK", 50) + val countryWork = new NullableStringDatabaseField(self, "COUNTRY___WORK", 50) + val customField1 = new NullableStringDatabaseField(self, "CUSTOM_FIELD_1", 500) + val customField2 = new NullableStringDatabaseField(self, "CUSTOM_FIELD_2", 50) + val customField3 = new NullableStringDatabaseField(self, "CUSTOM_FIELD_3", 50) + val emailLists = new NullableStringDatabaseField(self, "EMAIL_LISTS", 500) + val sourceName = new NullableStringDatabaseField(self, "SOURCE_NAME", 100) + @NullableInDatabase + val createdAt = new StringDatabaseField(self, "CREATED_AT", 30) + @NullableInDatabase + val updatedAt = new StringDatabaseField(self, "UPDATED_AT", 30) + } + + def primaryKey: IntDatabaseField = fields.id +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CorpAttend2013.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CorpAttend2013.scala new file mode 100644 index 00000000..47adf3c2 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/CorpAttend2013.scala @@ -0,0 +1,31 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class CorpAttend2013 extends StorableClass(CorpAttend2013) { + override object values extends ValuesObject { + val id = new IntFieldValue(self, CorpAttend2013.fields.id) + val name = new NullableStringFieldValue(self, CorpAttend2013.fields.name) + val personId = new NullableIntFieldValue(self, CorpAttend2013.fields.personId) + } +} + +object CorpAttend2013 extends StorableObject[CorpAttend2013] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "CORP_ATTEND_2013" + + object fields extends FieldsObject { + val id = new IntDatabaseField(self, "ID") + val name = new NullableStringDatabaseField(self, "NAME", 30) + val personId = new NullableIntDatabaseField(self, "PERSON_ID") + } + + def primaryKey: IntDatabaseField = fields.id +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Countrie.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Countrie.scala new file mode 100644 index 00000000..d3dcfe17 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Countrie.scala @@ -0,0 +1,33 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class Countrie extends StorableClass(Countrie) { + override object values extends ValuesObject { + val countryId = new IntFieldValue(self, Countrie.fields.countryId) + val abbrev = new StringFieldValue(self, Countrie.fields.abbrev) + val countryName = new StringFieldValue(self, Countrie.fields.countryName) + } +} + +object Countrie extends StorableObject[Countrie] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "COUNTRIES" + + object fields extends FieldsObject { + val countryId = new IntDatabaseField(self, "COUNTRY_ID") + @NullableInDatabase + val abbrev = new StringDatabaseField(self, "ABBREV", 30) + @NullableInDatabase + val countryName = new StringDatabaseField(self, "COUNTRY_NAME", 500) + } + + def primaryKey: IntDatabaseField = fields.countryId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DamageWaiver.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DamageWaiver.scala index 3b796ee3..0211e7f4 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DamageWaiver.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DamageWaiver.scala @@ -1,51 +1,61 @@ -package org.sailcbi.APIServer.Entities.EntityDefinitions - -import com.coleji.neptune.Storable.FieldValues._ -import com.coleji.neptune.Storable.Fields._ -import com.coleji.neptune.Storable._ - -class DamageWaiver extends StorableClass(DamageWaiver) { - object values extends ValuesObject { - val waiverId = new IntFieldValue(self, DamageWaiver.fields.waiverId) - val personId = new IntFieldValue(self, DamageWaiver.fields.personId) - val orderId = new NullableIntFieldValue(self, DamageWaiver.fields.orderId) - val price = new NullableDoubleFieldValue(self, DamageWaiver.fields.price) - val purchaseDate = new NullableDateTimeFieldValue(self, DamageWaiver.fields.purchaseDate) - val startDate = new NullableDateFieldValue(self, DamageWaiver.fields.startDate) - val expirationDate = new NullableDateFieldValue(self, DamageWaiver.fields.expirationDate) -// val createdOn = new NullableDateTimeFieldValue(self, DamageWaiver.fields.createdOn) -// val createdBy = new NullableStringFieldValue(self, DamageWaiver.fields.createdBy) -// val updatedOn = new NullableDateTimeFieldValue(self, DamageWaiver.fields.updatedOn) -// val updatedBy = new NullableStringFieldValue(self, DamageWaiver.fields.updatedBy) - val closeId = new NullableIntFieldValue(self, DamageWaiver.fields.closeId) - val paymentLocation = new NullableStringFieldValue(self, DamageWaiver.fields.paymentLocation) - val paymentMedium = new NullableStringFieldValue(self, DamageWaiver.fields.paymentMedium) - val ccTransNum = new NullableIntFieldValue(self, DamageWaiver.fields.ccTransNum) - val voidCloseId = new NullableIntFieldValue(self, DamageWaiver.fields.voidCloseId) - } -} - -object DamageWaiver extends StorableObject[DamageWaiver] { - val entityName: String = "DAMAGE_WAIVERS" - - object fields extends FieldsObject { - val waiverId = new IntDatabaseField(self, "WAIVER_ID") - val personId = new IntDatabaseField(self, "PERSON_ID") - val orderId = new NullableIntDatabaseField(self, "ORDER_ID") - val price = new NullableDoubleDatabaseField(self, "PRICE") - val purchaseDate = new NullableDateTimeDatabaseField(self, "PURCHASE_DATE") - val startDate = new NullableDateDatabaseField(self, "START_DATE") - val expirationDate = new NullableDateDatabaseField(self, "EXPIRATION_DATE") -// val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") -// val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) -// val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") -// val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) - val closeId = new NullableIntDatabaseField(self, "CLOSE_ID") - val paymentLocation = new NullableStringDatabaseField(self, "PAYMENT_LOCATION", 100) - val paymentMedium = new NullableStringDatabaseField(self, "PAYMENT_MEDIUM", 100) - val ccTransNum = new NullableIntDatabaseField(self, "CC_TRANS_NUM") - val voidCloseId = new NullableIntDatabaseField(self, "VOID_CLOSE_ID") - } - - def primaryKey: IntDatabaseField = fields.waiverId +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class DamageWaiver extends StorableClass(DamageWaiver) { + override object values extends ValuesObject { + val waiverId = new IntFieldValue(self, DamageWaiver.fields.waiverId) + val personId = new IntFieldValue(self, DamageWaiver.fields.personId) + val orderId = new NullableIntFieldValue(self, DamageWaiver.fields.orderId) + val price = new NullableDoubleFieldValue(self, DamageWaiver.fields.price) + val purchaseDate = new DateTimeFieldValue(self, DamageWaiver.fields.purchaseDate) + val startDate = new DateTimeFieldValue(self, DamageWaiver.fields.startDate) + val expirationDate = new NullableDateTimeFieldValue(self, DamageWaiver.fields.expirationDate) + val createdOn = new DateTimeFieldValue(self, DamageWaiver.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, DamageWaiver.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, DamageWaiver.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, DamageWaiver.fields.updatedBy) + val closeId = new NullableIntFieldValue(self, DamageWaiver.fields.closeId) + val ccTransNum = new NullableDoubleFieldValue(self, DamageWaiver.fields.ccTransNum) + val paymentLocation = new NullableStringFieldValue(self, DamageWaiver.fields.paymentLocation) + val paymentMedium = new NullableStringFieldValue(self, DamageWaiver.fields.paymentMedium) + val voidCloseId = new NullableIntFieldValue(self, DamageWaiver.fields.voidCloseId) + } +} + +object DamageWaiver extends StorableObject[DamageWaiver] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "DAMAGE_WAIVERS" + + object fields extends FieldsObject { + val waiverId = new IntDatabaseField(self, "WAIVER_ID") + val personId = new IntDatabaseField(self, "PERSON_ID") + val orderId = new NullableIntDatabaseField(self, "ORDER_ID") + val price = new NullableDoubleDatabaseField(self, "PRICE") + @NullableInDatabase + val purchaseDate = new DateTimeDatabaseField(self, "PURCHASE_DATE") + @NullableInDatabase + val startDate = new DateTimeDatabaseField(self, "START_DATE") + val expirationDate = new NullableDateTimeDatabaseField(self, "EXPIRATION_DATE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val closeId = new NullableIntDatabaseField(self, "CLOSE_ID") + val ccTransNum = new NullableDoubleDatabaseField(self, "CC_TRANS_NUM") + val paymentLocation = new NullableStringDatabaseField(self, "PAYMENT_LOCATION", 100) + val paymentMedium = new NullableStringDatabaseField(self, "PAYMENT_MEDIUM", 100) + val voidCloseId = new NullableIntDatabaseField(self, "VOID_CLOSE_ID") + } + + def primaryKey: IntDatabaseField = fields.waiverId } \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DatetimeRange.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DatetimeRange.scala new file mode 100644 index 00000000..1ac5b969 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DatetimeRange.scala @@ -0,0 +1,33 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class DatetimeRange extends StorableClass(DatetimeRange) { + override object values extends ValuesObject { + val rangeId = new IntFieldValue(self, DatetimeRange.fields.rangeId) + val rangeType = new StringFieldValue(self, DatetimeRange.fields.rangeType) + val startDatetime = new DateTimeFieldValue(self, DatetimeRange.fields.startDatetime) + val endDatetime = new DateTimeFieldValue(self, DatetimeRange.fields.endDatetime) + } +} + +object DatetimeRange extends StorableObject[DatetimeRange] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "DATETIME_RANGES" + + object fields extends FieldsObject { + val rangeId = new IntDatabaseField(self, "RANGE_ID") + val rangeType = new StringDatabaseField(self, "RANGE_TYPE", 50) + val startDatetime = new DateTimeDatabaseField(self, "START_DATETIME") + val endDatetime = new DateTimeDatabaseField(self, "END_DATETIME") + } + + def primaryKey: IntDatabaseField = fields.rangeId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DeveloperSession.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DeveloperSession.scala new file mode 100644 index 00000000..48276a55 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DeveloperSession.scala @@ -0,0 +1,33 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class DeveloperSession extends StorableClass(DeveloperSession) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, DeveloperSession.fields.rowId) + val userName = new StringFieldValue(self, DeveloperSession.fields.userName) + val sessionId = new IntFieldValue(self, DeveloperSession.fields.sessionId) + val viewDate = new DateTimeFieldValue(self, DeveloperSession.fields.viewDate) + } +} + +object DeveloperSession extends StorableObject[DeveloperSession] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "DEVELOPER_SESSIONS" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + val userName = new StringDatabaseField(self, "USER_NAME", 50) + val sessionId = new IntDatabaseField(self, "SESSION_ID") + val viewDate = new DateTimeDatabaseField(self, "VIEW_DATE") + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DhGlobal.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DhGlobal.scala new file mode 100644 index 00000000..73484cf8 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DhGlobal.scala @@ -0,0 +1,41 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class DhGlobal extends StorableClass(DhGlobal) { + override object values extends ValuesObject { + val globalId = new IntFieldValue(self, DhGlobal.fields.globalId) + val description = new StringFieldValue(self, DhGlobal.fields.description) + val createdOn = new NullableDateTimeFieldValue(self, DhGlobal.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, DhGlobal.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, DhGlobal.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, DhGlobal.fields.updatedBy) + val alias = new StringFieldValue(self, DhGlobal.fields.alias) + } +} + +object DhGlobal extends StorableObject[DhGlobal] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "DH_GLOBALS" + + object fields extends FieldsObject { + val globalId = new IntDatabaseField(self, "GLOBAL_ID") + @NullableInDatabase + val description = new StringDatabaseField(self, "DESCRIPTION", 4000) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase + val alias = new StringDatabaseField(self, "ALIAS", 20) + } + + def primaryKey: IntDatabaseField = fields.globalId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Discount.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Discount.scala index 795d1a69..171d3edd 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Discount.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Discount.scala @@ -3,13 +3,21 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class Discount extends StorableClass(Discount) { - object values extends ValuesObject { + override object values extends ValuesObject { val discountId = new IntFieldValue(self, Discount.fields.discountId) val categoryId = new IntFieldValue(self, Discount.fields.categoryId) val discountName = new StringFieldValue(self, Discount.fields.discountName) - val alertOnClose = new BooleanFieldValue(self, Discount.fields.alertOnClose) + val createdOn = new NullableDateTimeFieldValue(self, Discount.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, Discount.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, Discount.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, Discount.fields.updatedBy) + val alertOnClose = new NullableBooleanFieldValue(self, Discount.fields.alertOnClose) } } @@ -22,7 +30,11 @@ object Discount extends StorableObject[Discount] { val discountId = new IntDatabaseField(self, "DISCOUNT_ID") val categoryId = new IntDatabaseField(self, "CATEGORY_ID") val discountName = new StringDatabaseField(self, "DISCOUNT_NAME", 100) - val alertOnClose = new BooleanDatabaseField(self, "ALERT_ON_CLOSE", true) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val alertOnClose = new NullableBooleanDatabaseField(self, "ALERT_ON_CLOSE") } def primaryKey: IntDatabaseField = fields.discountId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DiscountCategorie.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DiscountCategorie.scala new file mode 100644 index 00000000..502534fe --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DiscountCategorie.scala @@ -0,0 +1,38 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class DiscountCategorie extends StorableClass(DiscountCategorie) { + override object values extends ValuesObject { + val categoryId = new IntFieldValue(self, DiscountCategorie.fields.categoryId) + val categoryName = new StringFieldValue(self, DiscountCategorie.fields.categoryName) + val createdOn = new NullableDateTimeFieldValue(self, DiscountCategorie.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, DiscountCategorie.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, DiscountCategorie.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, DiscountCategorie.fields.updatedBy) + } +} + +object DiscountCategorie extends StorableObject[DiscountCategorie] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "DISCOUNT_CATEGORIES" + + object fields extends FieldsObject { + val categoryId = new IntDatabaseField(self, "CATEGORY_ID") + @NullableInDatabase + val categoryName = new StringDatabaseField(self, "CATEGORY_NAME", 100) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.categoryId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DiscountCode.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DiscountCode.scala new file mode 100644 index 00000000..463d8b2c --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DiscountCode.scala @@ -0,0 +1,44 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class DiscountCode extends StorableClass(DiscountCode) { + override object values extends ValuesObject { + val codeId = new IntFieldValue(self, DiscountCode.fields.codeId) + val email = new StringFieldValue(self, DiscountCode.fields.email) + val discountId = new IntFieldValue(self, DiscountCode.fields.discountId) + val createdOn = new NullableDateTimeFieldValue(self, DiscountCode.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, DiscountCode.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, DiscountCode.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, DiscountCode.fields.updatedBy) + val code = new StringFieldValue(self, DiscountCode.fields.code) + val name = new StringFieldValue(self, DiscountCode.fields.name) + } +} + +object DiscountCode extends StorableObject[DiscountCode] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "DISCOUNT_CODES" + + object fields extends FieldsObject { + val codeId = new IntDatabaseField(self, "CODE_ID") + val email = new StringDatabaseField(self, "EMAIL", 500) + val discountId = new IntDatabaseField(self, "DISCOUNT_ID") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val code = new StringDatabaseField(self, "CODE", 50) + @NullableInDatabase + val name = new StringDatabaseField(self, "NAME", 500) + } + + def primaryKey: IntDatabaseField = fields.codeId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DiscountInstance.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DiscountInstance.scala index 21f26222..9de564ad 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DiscountInstance.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DiscountInstance.scala @@ -3,21 +3,28 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class DiscountInstance extends StorableClass(DiscountInstance) { override object references extends ReferencesObject { val discount = new Initializable[Discount] } - object values extends ValuesObject { + override object values extends ValuesObject { val instanceId = new IntFieldValue(self, DiscountInstance.fields.instanceId) val discountId = new IntFieldValue(self, DiscountInstance.fields.discountId) val nameOverride = new NullableStringFieldValue(self, DiscountInstance.fields.nameOverride) val startActive = new NullableDateTimeFieldValue(self, DiscountInstance.fields.startActive) val endActive = new NullableDateTimeFieldValue(self, DiscountInstance.fields.endActive) val universalCode = new NullableStringFieldValue(self, DiscountInstance.fields.universalCode) - val isCaseSensitive = new BooleanFieldValue(self, DiscountInstance.fields.isCaseSensitive) + val isCaseSensitive = new NullableBooleanFieldValue(self, DiscountInstance.fields.isCaseSensitive) + val createdOn = new NullableDateTimeFieldValue(self, DiscountInstance.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, DiscountInstance.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, DiscountInstance.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, DiscountInstance.fields.updatedBy) val emailRegexp = new NullableStringFieldValue(self, DiscountInstance.fields.emailRegexp) } } @@ -34,7 +41,11 @@ object DiscountInstance extends StorableObject[DiscountInstance] { val startActive = new NullableDateTimeDatabaseField(self, "START_ACTIVE") val endActive = new NullableDateTimeDatabaseField(self, "END_ACTIVE") val universalCode = new NullableStringDatabaseField(self, "UNIVERSAL_CODE", 100) - val isCaseSensitive = new BooleanDatabaseField(self, "IS_CASE_SENSITIVE", true) + val isCaseSensitive = new NullableBooleanDatabaseField(self, "IS_CASE_SENSITIVE") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) val emailRegexp = new NullableStringDatabaseField(self, "EMAIL_REGEXP", 500) } diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DiscountInstanceLevel.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DiscountInstanceLevel.scala new file mode 100644 index 00000000..faa0e708 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DiscountInstanceLevel.scala @@ -0,0 +1,43 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class DiscountInstanceLevel extends StorableClass(DiscountInstanceLevel) { + override object values extends ValuesObject { + val levelId = new IntFieldValue(self, DiscountInstanceLevel.fields.levelId) + val instanceId = new NullableIntFieldValue(self, DiscountInstanceLevel.fields.instanceId) + val discountAmt = new NullableDoubleFieldValue(self, DiscountInstanceLevel.fields.discountAmt) + val createdOn = new DateTimeFieldValue(self, DiscountInstanceLevel.fields.createdOn) + val createdBy = new StringFieldValue(self, DiscountInstanceLevel.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, DiscountInstanceLevel.fields.updatedOn) + val updatedBy = new StringFieldValue(self, DiscountInstanceLevel.fields.updatedBy) + } +} + +object DiscountInstanceLevel extends StorableObject[DiscountInstanceLevel] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "DISCOUNT_INSTANCE_LEVELS" + + object fields extends FieldsObject { + val levelId = new IntDatabaseField(self, "LEVEL_ID") + val instanceId = new NullableIntDatabaseField(self, "INSTANCE_ID") + val discountAmt = new NullableDoubleDatabaseField(self, "DISCOUNT_AMT") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.levelId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DiscountMapping.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DiscountMapping.scala new file mode 100644 index 00000000..afa9d217 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DiscountMapping.scala @@ -0,0 +1,30 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class DiscountMapping extends StorableClass(DiscountMapping) { + override object values extends ValuesObject { + val oldDiscountId = new IntFieldValue(self, DiscountMapping.fields.oldDiscountId) + val instanceId = new IntFieldValue(self, DiscountMapping.fields.instanceId) + } +} + +object DiscountMapping extends StorableObject[DiscountMapping] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "DISCOUNT_MAPPING" + + object fields extends FieldsObject { + val oldDiscountId = new IntDatabaseField(self, "OLD_DISCOUNT_ID") + @NullableInDatabase + val instanceId = new IntDatabaseField(self, "INSTANCE_ID") + } + + def primaryKey: IntDatabaseField = fields.oldDiscountId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReport.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReport.scala index b798f43c..4f18fdf3 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReport.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReport.scala @@ -1,96 +1,46 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Core.UnlockedRequestCache import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class DockReport extends StorableClass(DockReport) { - object values extends ValuesObject { + override object values extends ValuesObject { val dockReportId = new IntFieldValue(self, DockReport.fields.dockReportId) val reportDate = new DateFieldValue(self, DockReport.fields.reportDate) val sunsetDatetime = new NullableDateTimeFieldValue(self, DockReport.fields.sunsetDatetime) val incidentsNotes = new NullableStringFieldValue(self, DockReport.fields.incidentsNotes) val announcements = new NullableStringFieldValue(self, DockReport.fields.announcements) val semiPermanentRestrictions = new NullableStringFieldValue(self, DockReport.fields.semiPermanentRestrictions) + val createdOn = new NullableDateTimeFieldValue(self, DockReport.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, DockReport.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, DockReport.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, DockReport.fields.updatedBy) val signedBy = new NullableIntFieldValue(self, DockReport.fields.signedBy) } - - def getSubobjects(rc: UnlockedRequestCache): (List[DockReportWeather], List[DockReportStaff], List[DockReportUapAppt], List[DockReportHullCount], List[DockReportApClass]) ={ - val weather = rc.getObjectsByFilters(DockReportWeather, List(DockReportWeather.fields.dockReportId.alias.equalsConstant(values.dockReportId.get)), Set( - DockReportWeather.fields.weatherId, - DockReportWeather.fields.dockReportId, - DockReportWeather.fields.weatherDatetime, - DockReportWeather.fields.temp, - DockReportWeather.fields.weatherSummary, - DockReportWeather.fields.windDir, - DockReportWeather.fields.windSpeedKtsSteady, - DockReportWeather.fields.windSpeedKtsGust, - DockReportWeather.fields.restrictions, - )) - val dockstaff = rc.getObjectsByFilters(DockReportStaff, List(DockReportStaff.fields.dockReportId.alias.equalsConstant(values.dockReportId.get)), Set( - DockReportStaff.fields.dockReportStaffId, - DockReportStaff.fields.dockReportId, - DockReportStaff.fields.dockmasterOnDuty, - DockReportStaff.fields.staffName, - DockReportStaff.fields.timeIn, - DockReportStaff.fields.timeOut, - )) - val uapAppts = rc.getObjectsByFilters(DockReportUapAppt, List(DockReportUapAppt.fields.dockReportId.alias.equalsConstant(values.dockReportId.get)), Set( - DockReportUapAppt.fields.dockReportApptId, - DockReportUapAppt.fields.dockReportId, - DockReportUapAppt.fields.apptDatetime, - DockReportUapAppt.fields.apptType, - DockReportUapAppt.fields.participantName, - DockReportUapAppt.fields.boatTypeId, - DockReportUapAppt.fields.instructorName, - DockReportUapAppt.fields.hoyer, - )) - val hullCounts = rc.getObjectsByFilters(DockReportHullCount, List(DockReportHullCount.fields.dockReportId.alias.equalsConstant(values.dockReportId.get)), Set( - DockReportHullCount.fields.dockReportHullCtId, - DockReportHullCount.fields.dockReportId, - DockReportHullCount.fields.hullType, - DockReportHullCount.fields.inService, - DockReportHullCount.fields.staffTally, - )) - val apClasses = rc.getObjectsByFilters(DockReportApClass, List(DockReportApClass.fields.dockReportId.alias.equalsConstant(values.dockReportId.get)), Set( - DockReportApClass.fields.dockReportApClassId, - DockReportApClass.fields.dockReportId, - DockReportApClass.fields.apInstanceId, - DockReportApClass.fields.className, - DockReportApClass.fields.classDatetime, - DockReportApClass.fields.location, - DockReportApClass.fields.instructor, - DockReportApClass.fields.attend, - )) - (weather, dockstaff, uapAppts, hullCounts, apClasses) - } - - def deleteSubobjects(rc: UnlockedRequestCache): Unit = { - val (weather, dockstaff, uapAppts, hullCounts, apClasses) = getSubobjects(rc) - val weatherIds = weather.map(_.values.weatherId.get) - val dockstaffIds = dockstaff.map(_.values.dockReportStaffId.get) - val uapApptIds = uapAppts.map(_.values.dockReportApptId.get) - val hullCountIds = hullCounts.map(_.values.dockReportHullCtId.get) - val apClassIds = apClasses.map(_.values.dockReportApClassId.get) - rc.deleteObjectsById(DockReportWeather, weatherIds) - rc.deleteObjectsById(DockReportStaff, dockstaffIds) - rc.deleteObjectsById(DockReportUapAppt, uapApptIds) - rc.deleteObjectsById(DockReportHullCount, hullCountIds) - rc.deleteObjectsById(DockReportApClass, apClassIds) - } } object DockReport extends StorableObject[DockReport] { - val entityName: String = "DOCK_REPORTS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "DOCK_REPORTS" object fields extends FieldsObject { val dockReportId = new IntDatabaseField(self, "DOCK_REPORT_ID") + @NullableInDatabase val reportDate = new DateDatabaseField(self, "REPORT_DATE") val sunsetDatetime = new NullableDateTimeDatabaseField(self, "SUNSET_DATETIME") val incidentsNotes = new NullableStringDatabaseField(self, "INCIDENTS_NOTES", 4000) val announcements = new NullableStringDatabaseField(self, "ANNOUNCEMENTS", 4000) val semiPermanentRestrictions = new NullableStringDatabaseField(self, "SEMI_PERMANENT_RESTRICTIONS", 4000) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 100) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 100) val signedBy = new NullableIntDatabaseField(self, "SIGNED_BY") } diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportApClass.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportApClass.scala index cd67fd36..5fcb5d3d 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportApClass.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportApClass.scala @@ -3,32 +3,49 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class DockReportApClass extends StorableClass(DockReportApClass) { - object values extends ValuesObject { + override object values extends ValuesObject { val dockReportApClassId = new IntFieldValue(self, DockReportApClass.fields.dockReportApClassId) val dockReportId = new IntFieldValue(self, DockReportApClass.fields.dockReportId) - val apInstanceId = new NullableIntFieldValue(self, DockReportApClass.fields.apInstanceId) + val apInstanceId = new IntFieldValue(self, DockReportApClass.fields.apInstanceId) val className = new StringFieldValue(self, DockReportApClass.fields.className) val classDatetime = new DateTimeFieldValue(self, DockReportApClass.fields.classDatetime) val location = new NullableStringFieldValue(self, DockReportApClass.fields.location) val instructor = new NullableStringFieldValue(self, DockReportApClass.fields.instructor) val attend = new NullableIntFieldValue(self, DockReportApClass.fields.attend) + val createdOn = new NullableDateTimeFieldValue(self, DockReportApClass.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, DockReportApClass.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, DockReportApClass.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, DockReportApClass.fields.updatedBy) } } object DockReportApClass extends StorableObject[DockReportApClass] { + override val useRuntimeFieldnamesForJson: Boolean = true + override val entityName: String = "DOCK_REPORT_AP_CLASSES" object fields extends FieldsObject { val dockReportApClassId = new IntDatabaseField(self, "DOCK_REPORT_AP_CLASS_ID") val dockReportId = new IntDatabaseField(self, "DOCK_REPORT_ID") - val apInstanceId = new NullableIntDatabaseField(self, "AP_INSTANCE_ID") + @NullableInDatabase + val apInstanceId = new IntDatabaseField(self, "AP_INSTANCE_ID") + @NullableInDatabase val className = new StringDatabaseField(self, "CLASS_NAME", 100) + @NullableInDatabase val classDatetime = new DateTimeDatabaseField(self, "CLASS_DATETIME") val location = new NullableStringDatabaseField(self, "LOCATION", 50) val instructor = new NullableStringDatabaseField(self, "INSTRUCTOR", 50) val attend = new NullableIntDatabaseField(self, "ATTEND") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 100) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 100) } def primaryKey: IntDatabaseField = fields.dockReportApClassId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportHullCount.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportHullCount.scala index 77b7d907..b9f68419 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportHullCount.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportHullCount.scala @@ -3,26 +3,41 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class DockReportHullCount extends StorableClass(DockReportHullCount) { - object values extends ValuesObject { + override object values extends ValuesObject { val dockReportHullCtId = new IntFieldValue(self, DockReportHullCount.fields.dockReportHullCtId) val dockReportId = new IntFieldValue(self, DockReportHullCount.fields.dockReportId) val hullType = new StringFieldValue(self, DockReportHullCount.fields.hullType) val inService = new NullableIntFieldValue(self, DockReportHullCount.fields.inService) val staffTally = new NullableIntFieldValue(self, DockReportHullCount.fields.staffTally) + val createdOn = new NullableDateTimeFieldValue(self, DockReportHullCount.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, DockReportHullCount.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, DockReportHullCount.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, DockReportHullCount.fields.updatedBy) } } object DockReportHullCount extends StorableObject[DockReportHullCount] { - val entityName: String = "DOCK_REPORT_HULL_COUNTS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "DOCK_REPORT_HULL_COUNTS" object fields extends FieldsObject { val dockReportHullCtId = new IntDatabaseField(self, "DOCK_REPORT_HULL_CT_ID") val dockReportId = new IntDatabaseField(self, "DOCK_REPORT_ID") + @NullableInDatabase val hullType = new StringDatabaseField(self, "HULL_TYPE", 50) val inService = new NullableIntDatabaseField(self, "IN_SERVICE") val staffTally = new NullableIntDatabaseField(self, "STAFF_TALLY") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 100) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 100) } def primaryKey: IntDatabaseField = fields.dockReportHullCtId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportStaff.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportStaff.scala index d6a1b85e..84d62601 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportStaff.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportStaff.scala @@ -3,30 +3,44 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class DockReportStaff extends StorableClass(DockReportStaff) { - object values extends ValuesObject { + override object values extends ValuesObject { val dockReportStaffId = new IntFieldValue(self, DockReportStaff.fields.dockReportStaffId) val dockReportId = new IntFieldValue(self, DockReportStaff.fields.dockReportId) val dockmasterOnDuty = new BooleanFieldValue(self, DockReportStaff.fields.dockmasterOnDuty) val staffName = new StringFieldValue(self, DockReportStaff.fields.staffName) val timeIn = new NullableDateTimeFieldValue(self, DockReportStaff.fields.timeIn) val timeOut = new NullableDateTimeFieldValue(self, DockReportStaff.fields.timeOut) - + val createdOn = new NullableDateTimeFieldValue(self, DockReportStaff.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, DockReportStaff.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, DockReportStaff.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, DockReportStaff.fields.updatedBy) } } object DockReportStaff extends StorableObject[DockReportStaff] { - val entityName: String = "DOCK_REPORT_STAFF" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "DOCK_REPORT_STAFF" object fields extends FieldsObject { val dockReportStaffId = new IntDatabaseField(self, "DOCK_REPORT_STAFF_ID") val dockReportId = new IntDatabaseField(self, "DOCK_REPORT_ID") - val dockmasterOnDuty = new BooleanDatabaseField(self, "DOCKMASTER_ON_DUTY") + @NullableInDatabase + val dockmasterOnDuty = new BooleanDatabaseField(self, "DOCKMASTER_ON_DUTY", false) + @NullableInDatabase val staffName = new StringDatabaseField(self, "STAFF_NAME", 100) val timeIn = new NullableDateTimeDatabaseField(self, "TIME_IN") val timeOut = new NullableDateTimeDatabaseField(self, "TIME_OUT") - + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 100) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 100) } def primaryKey: IntDatabaseField = fields.dockReportStaffId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportUapAppt.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportUapAppt.scala index bf9f3800..00b1fe8c 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportUapAppt.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportUapAppt.scala @@ -3,31 +3,47 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class DockReportUapAppt extends StorableClass(DockReportUapAppt) { - object values extends ValuesObject { + override object values extends ValuesObject { val dockReportApptId = new IntFieldValue(self, DockReportUapAppt.fields.dockReportApptId) val dockReportId = new IntFieldValue(self, DockReportUapAppt.fields.dockReportId) - val apptDatetime = new NullableDateTimeFieldValue(self, DockReportUapAppt.fields.apptDatetime) - val apptType = new NullableStringFieldValue(self, DockReportUapAppt.fields.apptType) - val participantName = new StringFieldValue(self, DockReportUapAppt.fields.participantName) + val apptDatetime = new DateTimeFieldValue(self, DockReportUapAppt.fields.apptDatetime) + val apptType = new StringFieldValue(self, DockReportUapAppt.fields.apptType) + val participantName = new NullableStringFieldValue(self, DockReportUapAppt.fields.participantName) val boatTypeId = new NullableIntFieldValue(self, DockReportUapAppt.fields.boatTypeId) val instructorName = new NullableStringFieldValue(self, DockReportUapAppt.fields.instructorName) + val createdOn = new NullableDateTimeFieldValue(self, DockReportUapAppt.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, DockReportUapAppt.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, DockReportUapAppt.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, DockReportUapAppt.fields.updatedBy) val hoyer = new NullableBooleanFieldValue(self, DockReportUapAppt.fields.hoyer) } } object DockReportUapAppt extends StorableObject[DockReportUapAppt] { - val entityName: String = "DOCK_REPORT_UAP_APPTS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "DOCK_REPORT_UAP_APPTS" object fields extends FieldsObject { val dockReportApptId = new IntDatabaseField(self, "DOCK_REPORT_APPT_ID") val dockReportId = new IntDatabaseField(self, "DOCK_REPORT_ID") - val apptDatetime = new NullableDateTimeDatabaseField(self, "APPT_DATETIME") - val apptType = new NullableStringDatabaseField(self, "APPT_TYPE", 20) - val participantName = new StringDatabaseField(self, "PARTICIPANT_NAME", 150) + @NullableInDatabase + val apptDatetime = new DateTimeDatabaseField(self, "APPT_DATETIME") + @NullableInDatabase + val apptType = new StringDatabaseField(self, "APPT_TYPE", 50) + val participantName = new NullableStringDatabaseField(self, "PARTICIPANT_NAME", 150) val boatTypeId = new NullableIntDatabaseField(self, "BOAT_TYPE_ID") val instructorName = new NullableStringDatabaseField(self, "INSTRUCTOR_NAME", 100) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 100) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 100) val hoyer = new NullableBooleanDatabaseField(self, "HOYER") } diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportWeather.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportWeather.scala index 6722b1f5..cd117f8f 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportWeather.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DockReportWeather.scala @@ -3,34 +3,49 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class DockReportWeather extends StorableClass(DockReportWeather) { - object values extends ValuesObject { + override object values extends ValuesObject { val weatherId = new IntFieldValue(self, DockReportWeather.fields.weatherId) val dockReportId = new IntFieldValue(self, DockReportWeather.fields.dockReportId) val weatherDatetime = new DateTimeFieldValue(self, DockReportWeather.fields.weatherDatetime) val temp = new NullableDoubleFieldValue(self, DockReportWeather.fields.temp) val weatherSummary = new NullableStringFieldValue(self, DockReportWeather.fields.weatherSummary) val windDir = new NullableStringFieldValue(self, DockReportWeather.fields.windDir) + val restrictions = new NullableStringFieldValue(self, DockReportWeather.fields.restrictions) + val createdOn = new NullableDateTimeFieldValue(self, DockReportWeather.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, DockReportWeather.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, DockReportWeather.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, DockReportWeather.fields.updatedBy) val windSpeedKtsSteady = new NullableDoubleFieldValue(self, DockReportWeather.fields.windSpeedKtsSteady) val windSpeedKtsGust = new NullableDoubleFieldValue(self, DockReportWeather.fields.windSpeedKtsGust) - val restrictions = new NullableStringFieldValue(self, DockReportWeather.fields.restrictions) } } object DockReportWeather extends StorableObject[DockReportWeather] { - val entityName: String = "DOCK_REPORT_WEATHER" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "DOCK_REPORT_WEATHER" object fields extends FieldsObject { val weatherId = new IntDatabaseField(self, "WEATHER_ID") val dockReportId = new IntDatabaseField(self, "DOCK_REPORT_ID") + @NullableInDatabase val weatherDatetime = new DateTimeDatabaseField(self, "WEATHER_DATETIME") val temp = new NullableDoubleDatabaseField(self, "TEMP") val weatherSummary = new NullableStringDatabaseField(self, "WEATHER_SUMMARY", 50) val windDir = new NullableStringDatabaseField(self, "WIND_DIR", 5) + val restrictions = new NullableStringDatabaseField(self, "RESTRICTIONS", 500) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 100) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 100) val windSpeedKtsSteady = new NullableDoubleDatabaseField(self, "WIND_SPEED_KTS_STEADY") val windSpeedKtsGust = new NullableDoubleDatabaseField(self, "WIND_SPEED_KTS_GUST") - val restrictions = new NullableStringDatabaseField(self, "RESTRICTIONS", 500) } def primaryKey: IntDatabaseField = fields.weatherId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Donation.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Donation.scala index 099dd2a4..e5344bf2 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Donation.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Donation.scala @@ -1,34 +1,80 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{DateFieldValue, IntFieldValue, NullableDoubleFieldValue} -import com.coleji.neptune.Storable.Fields.{DateDatabaseField, IntDatabaseField, NullableDoubleDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable +import com.coleji.neptune.Util._ import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class Donation extends StorableClass(Donation) { override object references extends ReferencesObject { val person = new Initializable[Person] } - object values extends ValuesObject { + override object values extends ValuesObject { val donationId = new IntFieldValue(self, Donation.fields.donationId) val personId = new IntFieldValue(self, Donation.fields.personId) + val addressLine = new NullableStringFieldValue(self, Donation.fields.addressLine) val amount = new NullableDoubleFieldValue(self, Donation.fields.amount) - val donationDate = new DateFieldValue(self, Donation.fields.donationDate) + val description = new NullableStringFieldValue(self, Donation.fields.description) + val donationDate = new DateTimeFieldValue(self, Donation.fields.donationDate) + val inKind = new NullableBooleanFieldValue(self, Donation.fields.inKind) + val restriction = new NullableStringFieldValue(self, Donation.fields.restriction) + val salutation = new NullableStringFieldValue(self, Donation.fields.salutation) + val createdOn = new NullableDateTimeFieldValue(self, Donation.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, Donation.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, Donation.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, Donation.fields.updatedBy) + val orderId = new NullableIntFieldValue(self, Donation.fields.orderId) + val fundId = new IntFieldValue(self, Donation.fields.fundId) + val initiativeId = new IntFieldValue(self, Donation.fields.initiativeId) + val closeId = new NullableIntFieldValue(self, Donation.fields.closeId) + val ccTransNum = new NullableDoubleFieldValue(self, Donation.fields.ccTransNum) + val paymentLocation = new NullableStringFieldValue(self, Donation.fields.paymentLocation) + val paymentMedium = new NullableStringFieldValue(self, Donation.fields.paymentMedium) + val voidCloseId = new NullableIntFieldValue(self, Donation.fields.voidCloseId) + val noAck = new NullableBooleanFieldValue(self, Donation.fields.noAck) + val inMemoryOf = new NullableStringFieldValue(self, Donation.fields.inMemoryOf) + val isMatch = new NullableBooleanFieldValue(self, Donation.fields.isMatch) + val skipAck = new NullableBooleanFieldValue(self, Donation.fields.skipAck) } } object Donation extends StorableObject[Donation] { - val entityName: String = "DONATIONS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "DONATIONS" object fields extends FieldsObject { val donationId = new IntDatabaseField(self, "DONATION_ID") @NullableInDatabase val personId = new IntDatabaseField(self, "PERSON_ID") + val addressLine = new NullableStringDatabaseField(self, "ADDRESS_LINE", 200) val amount = new NullableDoubleDatabaseField(self, "AMOUNT") + val description = new NullableStringDatabaseField(self, "DESCRIPTION", 500) @NullableInDatabase - val donationDate = new DateDatabaseField(self, "DONATION_DATE") + val donationDate = new DateTimeDatabaseField(self, "DONATION_DATE") + val inKind = new NullableBooleanDatabaseField(self, "IN_KIND") + val restriction = new NullableStringDatabaseField(self, "RESTRICTION", 200) + val salutation = new NullableStringDatabaseField(self, "SALUTATION", 200) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val orderId = new NullableIntDatabaseField(self, "ORDER_ID") + val fundId = new IntDatabaseField(self, "FUND_ID") + val initiativeId = new IntDatabaseField(self, "INITIATIVE_ID") + val closeId = new NullableIntDatabaseField(self, "CLOSE_ID") + val ccTransNum = new NullableDoubleDatabaseField(self, "CC_TRANS_NUM") + val paymentLocation = new NullableStringDatabaseField(self, "PAYMENT_LOCATION", 100) + val paymentMedium = new NullableStringDatabaseField(self, "PAYMENT_MEDIUM", 100) + val voidCloseId = new NullableIntDatabaseField(self, "VOID_CLOSE_ID") + val noAck = new NullableBooleanDatabaseField(self, "NO_ACK") + val inMemoryOf = new NullableStringDatabaseField(self, "IN_MEMORY_OF", 500) + val isMatch = new NullableBooleanDatabaseField(self, "IS_MATCH") + val skipAck = new NullableBooleanDatabaseField(self, "SKIP_ACK") } def primaryKey: IntDatabaseField = fields.donationId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DonationFund.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DonationFund.scala index 035a6f40..1159551a 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DonationFund.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DonationFund.scala @@ -2,36 +2,56 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ -import com.coleji.neptune.Storable.{FieldsObject, StorableClass, StorableObject, ValuesObject} +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class DonationFund extends StorableClass(DonationFund) { - object values extends ValuesObject { + override object values extends ValuesObject { val fundId = new IntFieldValue(self, DonationFund.fields.fundId) val fundName = new StringFieldValue(self, DonationFund.fields.fundName) + val createdOn = new DateTimeFieldValue(self, DonationFund.fields.createdOn) + val createdBy = new StringFieldValue(self, DonationFund.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, DonationFund.fields.updatedOn) + val updatedBy = new StringFieldValue(self, DonationFund.fields.updatedBy) val active = new BooleanFieldValue(self, DonationFund.fields.active) val displayOrder = new NullableDoubleFieldValue(self, DonationFund.fields.displayOrder) val letterText = new NullableStringFieldValue(self, DonationFund.fields.letterText) val showInCheckout = new BooleanFieldValue(self, DonationFund.fields.showInCheckout) - val portalDescription = new NullableStringFieldValue(self, DonationFund.fields.portalDescription) val isEndowment = new BooleanFieldValue(self, DonationFund.fields.isEndowment) + val portalDescription = new NullableStringFieldValue(self, DonationFund.fields.portalDescription) } } object DonationFund extends StorableObject[DonationFund] { + override val useRuntimeFieldnamesForJson: Boolean = true + override val entityName: String = "DONATION_FUNDS" object fields extends FieldsObject { val fundId = new IntDatabaseField(self, "FUND_ID") @NullableInDatabase val fundName = new StringDatabaseField(self, "FUND_NAME", 100) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase val active = new BooleanDatabaseField(self, "ACTIVE", true) val displayOrder = new NullableDoubleDatabaseField(self, "DISPLAY_ORDER") val letterText = new NullableStringDatabaseField(self, "LETTER_TEXT", 500) + @NullableInDatabase val showInCheckout = new BooleanDatabaseField(self, "SHOW_IN_CHECKOUT", true) - val portalDescription = new NullableStringDatabaseField(self, "PORTAL_DESCRIPTION", 2000) + @NullableInDatabase val isEndowment = new BooleanDatabaseField(self, "IS_ENDOWMENT", true) + val portalDescription = new NullableStringDatabaseField(self, "PORTAL_DESCRIPTION", 2000) } - override def primaryKey: IntDatabaseField = fields.fundId -} + def primaryKey: IntDatabaseField = fields.fundId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DonationInitiative.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DonationInitiative.scala new file mode 100644 index 00000000..548d782b --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DonationInitiative.scala @@ -0,0 +1,46 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class DonationInitiative extends StorableClass(DonationInitiative) { + override object values extends ValuesObject { + val initiativeId = new IntFieldValue(self, DonationInitiative.fields.initiativeId) + val initiativeName = new StringFieldValue(self, DonationInitiative.fields.initiativeName) + val createdOn = new DateTimeFieldValue(self, DonationInitiative.fields.createdOn) + val createdBy = new StringFieldValue(self, DonationInitiative.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, DonationInitiative.fields.updatedOn) + val updatedBy = new StringFieldValue(self, DonationInitiative.fields.updatedBy) + val active = new NullableBooleanFieldValue(self, DonationInitiative.fields.active) + val displayOrder = new NullableDoubleFieldValue(self, DonationInitiative.fields.displayOrder) + } +} + +object DonationInitiative extends StorableObject[DonationInitiative] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "DONATION_INITIATIVES" + + object fields extends FieldsObject { + val initiativeId = new IntDatabaseField(self, "INITIATIVE_ID") + @NullableInDatabase + val initiativeName = new StringDatabaseField(self, "INITIATIVE_NAME", 200) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + val displayOrder = new NullableDoubleDatabaseField(self, "DISPLAY_ORDER") + } + + def primaryKey: IntDatabaseField = fields.initiativeId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DonationSuggestion.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DonationSuggestion.scala new file mode 100644 index 00000000..e53ddf9d --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DonationSuggestion.scala @@ -0,0 +1,42 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class DonationSuggestion extends StorableClass(DonationSuggestion) { + override object values extends ValuesObject { + val suggId = new IntFieldValue(self, DonationSuggestion.fields.suggId) + val amount = new DoubleFieldValue(self, DonationSuggestion.fields.amount) + val createdOn = new DateTimeFieldValue(self, DonationSuggestion.fields.createdOn) + val createdBy = new StringFieldValue(self, DonationSuggestion.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, DonationSuggestion.fields.updatedOn) + val updatedBy = new StringFieldValue(self, DonationSuggestion.fields.updatedBy) + } +} + +object DonationSuggestion extends StorableObject[DonationSuggestion] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "DONATION_SUGGESTIONS" + + object fields extends FieldsObject { + val suggId = new IntDatabaseField(self, "SUGG_ID") + @NullableInDatabase + val amount = new DoubleDatabaseField(self, "AMOUNT") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.suggId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DuplActionPreventionRecord.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DuplActionPreventionRecord.scala new file mode 100644 index 00000000..377cfaa6 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/DuplActionPreventionRecord.scala @@ -0,0 +1,45 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class DuplActionPreventionRecord extends StorableClass(DuplActionPreventionRecord) { + override object values extends ValuesObject { + val id = new IntFieldValue(self, DuplActionPreventionRecord.fields.id) + val key = new StringFieldValue(self, DuplActionPreventionRecord.fields.key) + val category = new StringFieldValue(self, DuplActionPreventionRecord.fields.category) + val subjectSchema = new StringFieldValue(self, DuplActionPreventionRecord.fields.subjectSchema) + val subjectId = new IntFieldValue(self, DuplActionPreventionRecord.fields.subjectId) + val datetime = new DateTimeFieldValue(self, DuplActionPreventionRecord.fields.datetime) + val status = new StringFieldValue(self, DuplActionPreventionRecord.fields.status) + } +} + +object DuplActionPreventionRecord extends StorableObject[DuplActionPreventionRecord] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "DUPL_ACTION_PREVENTION_RECORDS" + + object fields extends FieldsObject { + val id = new IntDatabaseField(self, "ID") + @NullableInDatabase + val key = new StringDatabaseField(self, "KEY", 100) + @NullableInDatabase + val category = new StringDatabaseField(self, "CATEGORY", 50) + @NullableInDatabase + val subjectSchema = new StringDatabaseField(self, "SUBJECT_SCHEMA", 50) + @NullableInDatabase + val subjectId = new IntDatabaseField(self, "SUBJECT_ID") + @NullableInDatabase + val datetime = new DateTimeDatabaseField(self, "DATETIME") + @NullableInDatabase + val status = new StringDatabaseField(self, "STATUS", 1) + } + + def primaryKey: IntDatabaseField = fields.id +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Eii.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Eii.scala new file mode 100644 index 00000000..b2ccbbce --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Eii.scala @@ -0,0 +1,114 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class Eii extends StorableClass(Eii) { + override object values extends ValuesObject { + val id = new IntFieldValue(self, Eii.fields.id) + val desc7 = new NullableStringFieldValue(self, Eii.fields.desc7) + val desc6 = new NullableStringFieldValue(self, Eii.fields.desc6) + val desc5 = new NullableStringFieldValue(self, Eii.fields.desc5) + val desc4 = new NullableStringFieldValue(self, Eii.fields.desc4) + val desc3 = new NullableStringFieldValue(self, Eii.fields.desc3) + val desc2 = new NullableStringFieldValue(self, Eii.fields.desc2) + val desc1 = new StringFieldValue(self, Eii.fields.desc1) + val housing = new DoubleFieldValue(self, Eii.fields.housing) + val utilities = new DoubleFieldValue(self, Eii.fields.utilities) + val food = new DoubleFieldValue(self, Eii.fields.food) + val transportation = new DoubleFieldValue(self, Eii.fields.transportation) + val childCare = new DoubleFieldValue(self, Eii.fields.childCare) + val personalHouseholdNeeds = new DoubleFieldValue(self, Eii.fields.personalHouseholdNeeds) + val healthcare = new DoubleFieldValue(self, Eii.fields.healthcare) + val taxes = new DoubleFieldValue(self, Eii.fields.taxes) + val taxCredits = new DoubleFieldValue(self, Eii.fields.taxCredits) + val monthlyTotal = new DoubleFieldValue(self, Eii.fields.monthlyTotal) + val annualTotal = new DoubleFieldValue(self, Eii.fields.annualTotal) + val hourlyWage = new DoubleFieldValue(self, Eii.fields.hourlyWage) + val precautionary = new DoubleFieldValue(self, Eii.fields.precautionary) + val retirement = new DoubleFieldValue(self, Eii.fields.retirement) + val childrensEducationTraining = new DoubleFieldValue(self, Eii.fields.childrensEducationTraining) + val homeownership = new DoubleFieldValue(self, Eii.fields.homeownership) + val benefits = new StringFieldValue(self, Eii.fields.benefits) + val monthlyTotalTemp = new StringFieldValue(self, Eii.fields.monthlyTotalTemp) + val annualTotalTemp = new StringFieldValue(self, Eii.fields.annualTotalTemp) + val workerCt = new DoubleFieldValue(self, Eii.fields.workerCt) + val infantCt = new DoubleFieldValue(self, Eii.fields.infantCt) + val preschoolerCt = new DoubleFieldValue(self, Eii.fields.preschoolerCt) + val schoolageCt = new DoubleFieldValue(self, Eii.fields.schoolageCt) + val teenageCt = new DoubleFieldValue(self, Eii.fields.teenageCt) + } +} + +object Eii extends StorableObject[Eii] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "EII" + + object fields extends FieldsObject { + val id = new IntDatabaseField(self, "ID") + val desc7 = new NullableStringDatabaseField(self, "DESC_7", 30) + val desc6 = new NullableStringDatabaseField(self, "DESC_6", 30) + val desc5 = new NullableStringDatabaseField(self, "DESC_5", 30) + val desc4 = new NullableStringDatabaseField(self, "DESC_4", 30) + val desc3 = new NullableStringDatabaseField(self, "DESC_3", 30) + val desc2 = new NullableStringDatabaseField(self, "DESC_2", 30) + @NullableInDatabase + val desc1 = new StringDatabaseField(self, "DESC_1", 30) + @NullableInDatabase + val housing = new DoubleDatabaseField(self, "HOUSING") + @NullableInDatabase + val utilities = new DoubleDatabaseField(self, "UTILITIES") + @NullableInDatabase + val food = new DoubleDatabaseField(self, "FOOD") + @NullableInDatabase + val transportation = new DoubleDatabaseField(self, "TRANSPORTATION") + @NullableInDatabase + val childCare = new DoubleDatabaseField(self, "CHILD_CARE") + @NullableInDatabase + val personalHouseholdNeeds = new DoubleDatabaseField(self, "PERSONAL_HOUSEHOLD_NEEDS") + @NullableInDatabase + val healthcare = new DoubleDatabaseField(self, "HEALTHCARE") + @NullableInDatabase + val taxes = new DoubleDatabaseField(self, "TAXES") + @NullableInDatabase + val taxCredits = new DoubleDatabaseField(self, "TAX_CREDITS") + @NullableInDatabase + val monthlyTotal = new DoubleDatabaseField(self, "MONTHLY_TOTAL") + @NullableInDatabase + val annualTotal = new DoubleDatabaseField(self, "ANNUAL_TOTAL") + @NullableInDatabase + val hourlyWage = new DoubleDatabaseField(self, "HOURLY_WAGE") + @NullableInDatabase + val precautionary = new DoubleDatabaseField(self, "PRECAUTIONARY") + @NullableInDatabase + val retirement = new DoubleDatabaseField(self, "RETIREMENT") + @NullableInDatabase + val childrensEducationTraining = new DoubleDatabaseField(self, "CHILDRENS_EDUCATION_TRAINING") + @NullableInDatabase + val homeownership = new DoubleDatabaseField(self, "HOMEOWNERSHIP") + @NullableInDatabase + val benefits = new StringDatabaseField(self, "BENEFITS", 30) + @NullableInDatabase + val monthlyTotalTemp = new StringDatabaseField(self, "MONTHLY_TOTAL_TEMP", 50) + @NullableInDatabase + val annualTotalTemp = new StringDatabaseField(self, "ANNUAL_TOTAL_TEMP", 50) + @NullableInDatabase + val workerCt = new DoubleDatabaseField(self, "WORKER_CT") + @NullableInDatabase + val infantCt = new DoubleDatabaseField(self, "INFANT_CT") + @NullableInDatabase + val preschoolerCt = new DoubleDatabaseField(self, "PRESCHOOLER_CT") + @NullableInDatabase + val schoolageCt = new DoubleDatabaseField(self, "SCHOOLAGE_CT") + @NullableInDatabase + val teenageCt = new DoubleDatabaseField(self, "TEENAGE_CT") + } + + def primaryKey: IntDatabaseField = fields.id +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EiiMit.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EiiMit.scala new file mode 100644 index 00000000..d9230ea8 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EiiMit.scala @@ -0,0 +1,42 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class EiiMit extends StorableClass(EiiMit) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, EiiMit.fields.rowId) + val adults = new DoubleFieldValue(self, EiiMit.fields.adults) + val children = new DoubleFieldValue(self, EiiMit.fields.children) + val eii = new DoubleFieldValue(self, EiiMit.fields.eii) + val generation = new DoubleFieldValue(self, EiiMit.fields.generation) + val nonworkingAdults = new DoubleFieldValue(self, EiiMit.fields.nonworkingAdults) + } +} + +object EiiMit extends StorableObject[EiiMit] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "EII_MIT" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + @NullableInDatabase + val adults = new DoubleDatabaseField(self, "ADULTS") + @NullableInDatabase + val children = new DoubleDatabaseField(self, "CHILDREN") + @NullableInDatabase + val eii = new DoubleDatabaseField(self, "EII") + @NullableInDatabase + val generation = new DoubleDatabaseField(self, "GENERATION") + @NullableInDatabase + val nonworkingAdults = new DoubleDatabaseField(self, "NONWORKING_ADULTS") + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EiiOverride.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EiiOverride.scala new file mode 100644 index 00000000..10d93870 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EiiOverride.scala @@ -0,0 +1,48 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class EiiOverride extends StorableClass(EiiOverride) { + override object values extends ValuesObject { + val personId = new IntFieldValue(self, EiiOverride.fields.personId) + val season = new DoubleFieldValue(self, EiiOverride.fields.season) + val price = new DoubleFieldValue(self, EiiOverride.fields.price) + val createdOn = new DateTimeFieldValue(self, EiiOverride.fields.createdOn) + val createdBy = new StringFieldValue(self, EiiOverride.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, EiiOverride.fields.updatedOn) + val updatedBy = new StringFieldValue(self, EiiOverride.fields.updatedBy) + val overrideId = new IntFieldValue(self, EiiOverride.fields.overrideId) + } +} + +object EiiOverride extends StorableObject[EiiOverride] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "EII_OVERRIDES" + + object fields extends FieldsObject { + @NullableInDatabase + val personId = new IntDatabaseField(self, "PERSON_ID") + @NullableInDatabase + val season = new DoubleDatabaseField(self, "SEASON") + @NullableInDatabase + val price = new DoubleDatabaseField(self, "PRICE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val overrideId = new IntDatabaseField(self, "OVERRIDE_ID") + } + + def primaryKey: IntDatabaseField = fields.overrideId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EiiResponse.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EiiResponse.scala new file mode 100644 index 00000000..6f6dcd38 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EiiResponse.scala @@ -0,0 +1,75 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class EiiResponse extends StorableClass(EiiResponse) { + override object values extends ValuesObject { + val responseId = new IntFieldValue(self, EiiResponse.fields.responseId) + val personId = new IntFieldValue(self, EiiResponse.fields.personId) + val season = new DoubleFieldValue(self, EiiResponse.fields.season) + val workers = new NullableDoubleFieldValue(self, EiiResponse.fields.workers) + val benefits = new NullableBooleanFieldValue(self, EiiResponse.fields.benefits) + val infants = new NullableDoubleFieldValue(self, EiiResponse.fields.infants) + val preschoolers = new NullableDoubleFieldValue(self, EiiResponse.fields.preschoolers) + val schoolagers = new NullableDoubleFieldValue(self, EiiResponse.fields.schoolagers) + val teenagers = new NullableDoubleFieldValue(self, EiiResponse.fields.teenagers) + val income = new NullableDoubleFieldValue(self, EiiResponse.fields.income) + val computedEii = new NullableDoubleFieldValue(self, EiiResponse.fields.computedEii) + val computedPrice = new DoubleFieldValue(self, EiiResponse.fields.computedPrice) + val createdOn = new DateTimeFieldValue(self, EiiResponse.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, EiiResponse.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, EiiResponse.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, EiiResponse.fields.updatedBy) + val isApplying = new BooleanFieldValue(self, EiiResponse.fields.isApplying) + val isCurrent = new BooleanFieldValue(self, EiiResponse.fields.isCurrent) + val pdComment = new NullableStringFieldValue(self, EiiResponse.fields.pdComment) + val status = new NullableStringFieldValue(self, EiiResponse.fields.status) + val utilizedInflationFactor = new NullableDoubleFieldValue(self, EiiResponse.fields.utilizedInflationFactor) + val children = new NullableDoubleFieldValue(self, EiiResponse.fields.children) + val nonworkingAdults = new NullableDoubleFieldValue(self, EiiResponse.fields.nonworkingAdults) + } +} + +object EiiResponse extends StorableObject[EiiResponse] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "EII_RESPONSES" + + object fields extends FieldsObject { + val responseId = new IntDatabaseField(self, "RESPONSE_ID") + val personId = new IntDatabaseField(self, "PERSON_ID") + val season = new DoubleDatabaseField(self, "SEASON") + val workers = new NullableDoubleDatabaseField(self, "WORKERS") + val benefits = new NullableBooleanDatabaseField(self, "BENEFITS") + val infants = new NullableDoubleDatabaseField(self, "INFANTS") + val preschoolers = new NullableDoubleDatabaseField(self, "PRESCHOOLERS") + val schoolagers = new NullableDoubleDatabaseField(self, "SCHOOLAGERS") + val teenagers = new NullableDoubleDatabaseField(self, "TEENAGERS") + val income = new NullableDoubleDatabaseField(self, "INCOME") + val computedEii = new NullableDoubleDatabaseField(self, "COMPUTED_EII") + @NullableInDatabase + val computedPrice = new DoubleDatabaseField(self, "COMPUTED_PRICE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase + val isApplying = new BooleanDatabaseField(self, "IS_APPLYING", false) + val isCurrent = new BooleanDatabaseField(self, "IS_CURRENT", false) + val pdComment = new NullableStringDatabaseField(self, "PD_COMMENT", -1) + val status = new NullableStringDatabaseField(self, "STATUS", 1) + val utilizedInflationFactor = new NullableDoubleDatabaseField(self, "UTILIZED_INFLATION_FACTOR") + val children = new NullableDoubleDatabaseField(self, "CHILDREN") + val nonworkingAdults = new NullableDoubleDatabaseField(self, "NONWORKING_ADULTS") + } + + def primaryKey: IntDatabaseField = fields.responseId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EmailContent.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EmailContent.scala new file mode 100644 index 00000000..870f7ebf --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EmailContent.scala @@ -0,0 +1,73 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class EmailContent extends StorableClass(EmailContent) { + override object values extends ValuesObject { + val contentId = new IntFieldValue(self, EmailContent.fields.contentId) + val fromAddr = new StringFieldValue(self, EmailContent.fields.fromAddr) + val ccAddr = new NullableStringFieldValue(self, EmailContent.fields.ccAddr) + val bccAddr = new NullableStringFieldValue(self, EmailContent.fields.bccAddr) + val subject = new StringFieldValue(self, EmailContent.fields.subject) + val plainBody = new NullableStringFieldValue(self, EmailContent.fields.plainBody) + val htmlBody = new NullableStringFieldValue(self, EmailContent.fields.htmlBody) + val description = new NullableStringFieldValue(self, EmailContent.fields.description) + val title = new StringFieldValue(self, EmailContent.fields.title) + val createdOn = new DateTimeFieldValue(self, EmailContent.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, EmailContent.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, EmailContent.fields.updatedOn) + val updatedBy = new StringFieldValue(self, EmailContent.fields.updatedBy) + val emailGroupId = new IntFieldValue(self, EmailContent.fields.emailGroupId) + val recGroupId = new NullableIntFieldValue(self, EmailContent.fields.recGroupId) + val htmlBodyClob = new NullableStringFieldValue(self, EmailContent.fields.htmlBodyClob) + val fromAddrName = new NullableStringFieldValue(self, EmailContent.fields.fromAddrName) + val fromAddrOnly = new NullableStringFieldValue(self, EmailContent.fields.fromAddrOnly) + val optOutGrpId = new NullableIntFieldValue(self, EmailContent.fields.optOutGrpId) + val replyTo = new NullableStringFieldValue(self, EmailContent.fields.replyTo) + val hidden = new NullableBooleanFieldValue(self, EmailContent.fields.hidden) + } +} + +object EmailContent extends StorableObject[EmailContent] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "EMAIL_CONTENT" + + object fields extends FieldsObject { + val contentId = new IntDatabaseField(self, "CONTENT_ID") + @NullableInDatabase + val fromAddr = new StringDatabaseField(self, "FROM_ADDR", 100) + val ccAddr = new NullableStringDatabaseField(self, "CC_ADDR", 500) + val bccAddr = new NullableStringDatabaseField(self, "BCC_ADDR", 500) + @NullableInDatabase + val subject = new StringDatabaseField(self, "SUBJECT", 200) + val plainBody = new NullableStringDatabaseField(self, "PLAIN_BODY", 4000) + val htmlBody = new NullableStringDatabaseField(self, "HTML_BODY", 4000) + val description = new NullableStringDatabaseField(self, "DESCRIPTION", 4000) + val title = new StringDatabaseField(self, "TITLE", 50) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase + val emailGroupId = new IntDatabaseField(self, "EMAIL_GROUP_ID") + val recGroupId = new NullableIntDatabaseField(self, "REC_GROUP_ID") + val htmlBodyClob = new NullableStringDatabaseField(self, "HTML_BODY_CLOB", -1) + val fromAddrName = new NullableStringDatabaseField(self, "FROM_ADDR_NAME", 100) + val fromAddrOnly = new NullableStringDatabaseField(self, "FROM_ADDR_ONLY", 100) + val optOutGrpId = new NullableIntDatabaseField(self, "OPT_OUT_GRP_ID") + val replyTo = new NullableStringDatabaseField(self, "REPLY_TO", 100) + val hidden = new NullableBooleanDatabaseField(self, "HIDDEN") + } + + def primaryKey: IntDatabaseField = fields.contentId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EmailContentGroup.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EmailContentGroup.scala new file mode 100644 index 00000000..35c5dd86 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EmailContentGroup.scala @@ -0,0 +1,42 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class EmailContentGroup extends StorableClass(EmailContentGroup) { + override object values extends ValuesObject { + val groupId = new IntFieldValue(self, EmailContentGroup.fields.groupId) + val groupName = new StringFieldValue(self, EmailContentGroup.fields.groupName) + val createdOn = new DateTimeFieldValue(self, EmailContentGroup.fields.createdOn) + val createdBy = new StringFieldValue(self, EmailContentGroup.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, EmailContentGroup.fields.updatedOn) + val updatedBy = new StringFieldValue(self, EmailContentGroup.fields.updatedBy) + } +} + +object EmailContentGroup extends StorableObject[EmailContentGroup] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "EMAIL_CONTENT_GROUPS" + + object fields extends FieldsObject { + val groupId = new IntDatabaseField(self, "GROUP_ID") + @NullableInDatabase + val groupName = new StringDatabaseField(self, "GROUP_NAME", 50) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.groupId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EmailTracking.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EmailTracking.scala new file mode 100644 index 00000000..00e70ee3 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/EmailTracking.scala @@ -0,0 +1,70 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class EmailTracking extends StorableClass(EmailTracking) { + override object values extends ValuesObject { + val emailId = new IntFieldValue(self, EmailTracking.fields.emailId) + val emailFrom = new StringFieldValue(self, EmailTracking.fields.emailFrom) + val emailTo = new StringFieldValue(self, EmailTracking.fields.emailTo) + val emailSubj = new StringFieldValue(self, EmailTracking.fields.emailSubj) + val emailPlainBody = new NullableStringFieldValue(self, EmailTracking.fields.emailPlainBody) + val emailHtmlBody = new NullableStringFieldValue(self, EmailTracking.fields.emailHtmlBody) + val sendDatetime = new NullableDateTimeFieldValue(self, EmailTracking.fields.sendDatetime) + val emailCc = new NullableStringFieldValue(self, EmailTracking.fields.emailCc) + val emailBcc = new NullableStringFieldValue(self, EmailTracking.fields.emailBcc) + val createdOn = new DateTimeFieldValue(self, EmailTracking.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, EmailTracking.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, EmailTracking.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, EmailTracking.fields.updatedBy) + val status = new NullableStringFieldValue(self, EmailTracking.fields.status) + val sendgridJson = new NullableStringFieldValue(self, EmailTracking.fields.sendgridJson) + val retryCt = new NullableDoubleFieldValue(self, EmailTracking.fields.retryCt) + val emailFromAddrName = new NullableStringFieldValue(self, EmailTracking.fields.emailFromAddrName) + val emailFromAddrOnly = new NullableStringFieldValue(self, EmailTracking.fields.emailFromAddrOnly) + val optOutGrpId = new NullableIntFieldValue(self, EmailTracking.fields.optOutGrpId) + val sendgridResp = new NullableStringFieldValue(self, EmailTracking.fields.sendgridResp) + } +} + +object EmailTracking extends StorableObject[EmailTracking] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "EMAIL_TRACKING" + + object fields extends FieldsObject { + val emailId = new IntDatabaseField(self, "EMAIL_ID") + @NullableInDatabase + val emailFrom = new StringDatabaseField(self, "EMAIL_FROM", 200) + @NullableInDatabase + val emailTo = new StringDatabaseField(self, "EMAIL_TO", 200) + @NullableInDatabase + val emailSubj = new StringDatabaseField(self, "EMAIL_SUBJ", 500) + val emailPlainBody = new NullableStringDatabaseField(self, "EMAIL_PLAIN_BODY", 4000) + val emailHtmlBody = new NullableStringDatabaseField(self, "EMAIL_HTML_BODY", 4000) + val sendDatetime = new NullableDateTimeDatabaseField(self, "SEND_DATETIME") + val emailCc = new NullableStringDatabaseField(self, "EMAIL_CC", 200) + val emailBcc = new NullableStringDatabaseField(self, "EMAIL_BCC", 200) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val status = new NullableStringDatabaseField(self, "STATUS", 1) + val sendgridJson = new NullableStringDatabaseField(self, "SENDGRID_JSON", -1) + val retryCt = new NullableDoubleDatabaseField(self, "RETRY_CT") + val emailFromAddrName = new NullableStringDatabaseField(self, "EMAIL_FROM_ADDR_NAME", 100) + val emailFromAddrOnly = new NullableStringDatabaseField(self, "EMAIL_FROM_ADDR_ONLY", 100) + val optOutGrpId = new NullableIntDatabaseField(self, "OPT_OUT_GRP_ID") + val sendgridResp = new NullableStringDatabaseField(self, "SENDGRID_RESP", 20) + } + + def primaryKey: IntDatabaseField = fields.emailId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ErrorType.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ErrorType.scala new file mode 100644 index 00000000..c6f205a2 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ErrorType.scala @@ -0,0 +1,33 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class ErrorType extends StorableClass(ErrorType) { + override object values extends ValuesObject { + val typeId = new IntFieldValue(self, ErrorType.fields.typeId) + val errorMessage = new NullableStringFieldValue(self, ErrorType.fields.errorMessage) + val throwCount = new NullableDoubleFieldValue(self, ErrorType.fields.throwCount) + val lastInstance = new NullableDateTimeFieldValue(self, ErrorType.fields.lastInstance) + } +} + +object ErrorType extends StorableObject[ErrorType] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "ERROR_TYPES" + + object fields extends FieldsObject { + val typeId = new IntDatabaseField(self, "TYPE_ID") + val errorMessage = new NullableStringDatabaseField(self, "ERROR_MESSAGE", 4000) + val throwCount = new NullableDoubleDatabaseField(self, "THROW_COUNT") + val lastInstance = new NullableDateTimeDatabaseField(self, "LAST_INSTANCE") + } + + def primaryKey: IntDatabaseField = fields.typeId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Event.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Event.scala index f0898ce8..ac4aa58a 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Event.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Event.scala @@ -1,24 +1,45 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{IntFieldValue, NullableDateTimeFieldValue, StringFieldValue} -import com.coleji.neptune.Storable.Fields.{IntDatabaseField, NullableDateTimeDatabaseField, StringDatabaseField} -import com.coleji.neptune.Storable.{FieldsObject, StorableClass, StorableObject, ValuesObject} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class Event extends StorableClass(Event) { - object values extends ValuesObject { + override object values extends ValuesObject { val eventId = new IntFieldValue(self, Event.fields.eventId) val eventName = new StringFieldValue(self, Event.fields.eventName) - val eventDateTime = new NullableDateTimeFieldValue(self, Event.fields.eventDateTime) + val eventDate = new NullableDateTimeFieldValue(self, Event.fields.eventDate) + val active = new NullableBooleanFieldValue(self, Event.fields.active) + val createdOn = new DateTimeFieldValue(self, Event.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, Event.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, Event.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, Event.fields.updatedBy) + val displayOrder = new NullableDoubleFieldValue(self, Event.fields.displayOrder) } } object Event extends StorableObject[Event] { - val entityName: String = "EVENTS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "EVENTS" object fields extends FieldsObject { val eventId = new IntDatabaseField(self, "EVENT_ID") + @NullableInDatabase val eventName = new StringDatabaseField(self, "EVENT_NAME", 200) - val eventDateTime = new NullableDateTimeDatabaseField(self, "EVENT_DATE") + val eventDate = new NullableDateTimeDatabaseField(self, "EVENT_DATE") + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val displayOrder = new NullableDoubleDatabaseField(self, "DISPLAY_ORDER") } def primaryKey: IntDatabaseField = fields.eventId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Feedback.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Feedback.scala new file mode 100644 index 00000000..dc50b323 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Feedback.scala @@ -0,0 +1,53 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class Feedback extends StorableClass(Feedback) { + override object values extends ValuesObject { + val feedbackId = new IntFieldValue(self, Feedback.fields.feedbackId) + val appAlias = new StringFieldValue(self, Feedback.fields.appAlias) + val appPageId = new IntFieldValue(self, Feedback.fields.appPageId) + val description = new NullableStringFieldValue(self, Feedback.fields.description) + val userName = new StringFieldValue(self, Feedback.fields.userName) + val createdOn = new DateTimeFieldValue(self, Feedback.fields.createdOn) + val createdBy = new StringFieldValue(self, Feedback.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, Feedback.fields.updatedOn) + val updatedBy = new StringFieldValue(self, Feedback.fields.updatedBy) + val appId = new IntFieldValue(self, Feedback.fields.appId) + } +} + +object Feedback extends StorableObject[Feedback] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FEEDBACK" + + object fields extends FieldsObject { + val feedbackId = new IntDatabaseField(self, "FEEDBACK_ID") + @NullableInDatabase + val appAlias = new StringDatabaseField(self, "APP_ALIAS", 100) + @NullableInDatabase + val appPageId = new IntDatabaseField(self, "APP_PAGE_ID") + val description = new NullableStringDatabaseField(self, "DESCRIPTION", -1) + @NullableInDatabase + val userName = new StringDatabaseField(self, "USER_NAME", 20) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase + val appId = new IntDatabaseField(self, "APP_ID") + } + + def primaryKey: IntDatabaseField = fields.feedbackId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FlagChange.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FlagChange.scala index 229be63b..c357fb1f 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FlagChange.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FlagChange.scala @@ -3,24 +3,38 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class FlagChange extends StorableClass(FlagChange) { - object values extends ValuesObject { + override object values extends ValuesObject { val changeId = new IntFieldValue(self, FlagChange.fields.changeId) val flag = new StringFieldValue(self, FlagChange.fields.flag) val changeDatetime = new DateTimeFieldValue(self, FlagChange.fields.changeDatetime) + val createdOn = new NullableDateTimeFieldValue(self, FlagChange.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, FlagChange.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, FlagChange.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, FlagChange.fields.updatedBy) + val notificationsSent = new NullableDoubleFieldValue(self, FlagChange.fields.notificationsSent) } } object FlagChange extends StorableObject[FlagChange] { override val useRuntimeFieldnamesForJson: Boolean = true - val entityName: String = "FLAG_CHANGES" + override val entityName: String = "FLAG_CHANGES" object fields extends FieldsObject { val changeId = new IntDatabaseField(self, "CHANGE_ID") val flag = new StringDatabaseField(self, "FLAG", 1) val changeDatetime = new DateTimeDatabaseField(self, "CHANGE_DATETIME") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val notificationsSent = new NullableDoubleDatabaseField(self, "NOTIFICATIONS_SENT") } def primaryKey: IntDatabaseField = fields.changeId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FlagsGlobal.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FlagsGlobal.scala new file mode 100644 index 00000000..aa5d282c --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FlagsGlobal.scala @@ -0,0 +1,40 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FlagsGlobal extends StorableClass(FlagsGlobal) { + override object values extends ValuesObject { + val flagId = new IntFieldValue(self, FlagsGlobal.fields.flagId) + val globalId = new IntFieldValue(self, FlagsGlobal.fields.globalId) + val globalValue = new StringFieldValue(self, FlagsGlobal.fields.globalValue) + val createdOn = new NullableDateTimeFieldValue(self, FlagsGlobal.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, FlagsGlobal.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, FlagsGlobal.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, FlagsGlobal.fields.updatedBy) + } +} + +object FlagsGlobal extends StorableObject[FlagsGlobal] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FLAGS_GLOBALS" + + object fields extends FieldsObject { + val flagId = new IntDatabaseField(self, "FLAG_ID") + val globalId = new IntDatabaseField(self, "GLOBAL_ID") + @NullableInDatabase + val globalValue = new StringDatabaseField(self, "GLOBAL_VALUE", 1) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.flagId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoAppliedGc.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoAppliedGc.scala new file mode 100644 index 00000000..68e775cb --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoAppliedGc.scala @@ -0,0 +1,52 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoAppliedGc extends StorableClass(FoAppliedGc) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, FoAppliedGc.fields.rowId) + val closeId = new IntFieldValue(self, FoAppliedGc.fields.closeId) + val certId = new IntFieldValue(self, FoAppliedGc.fields.certId) + val value = new DoubleFieldValue(self, FoAppliedGc.fields.value) + val createdOn = new DateTimeFieldValue(self, FoAppliedGc.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, FoAppliedGc.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, FoAppliedGc.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, FoAppliedGc.fields.updatedBy) + val pmAssignId = new NullableIntFieldValue(self, FoAppliedGc.fields.pmAssignId) + val orderId = new NullableIntFieldValue(self, FoAppliedGc.fields.orderId) + val voidCloseId = new NullableIntFieldValue(self, FoAppliedGc.fields.voidCloseId) + } +} + +object FoAppliedGc extends StorableObject[FoAppliedGc] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_APPLIED_GC" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + @NullableInDatabase + val closeId = new IntDatabaseField(self, "CLOSE_ID") + @NullableInDatabase + val certId = new IntDatabaseField(self, "CERT_ID") + @NullableInDatabase + val value = new DoubleDatabaseField(self, "VALUE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val pmAssignId = new NullableIntDatabaseField(self, "PM_ASSIGN_ID") + val orderId = new NullableIntDatabaseField(self, "ORDER_ID") + val voidCloseId = new NullableIntDatabaseField(self, "VOID_CLOSE_ID") + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoAr.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoAr.scala new file mode 100644 index 00000000..afc95b76 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoAr.scala @@ -0,0 +1,43 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoAr extends StorableClass(FoAr) { + override object values extends ValuesObject { + val arId = new IntFieldValue(self, FoAr.fields.arId) + val closeId = new IntFieldValue(self, FoAr.fields.closeId) + val sourceId = new IntFieldValue(self, FoAr.fields.sourceId) + val value = new DoubleFieldValue(self, FoAr.fields.value) + val createdOn = new DateTimeFieldValue(self, FoAr.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, FoAr.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, FoAr.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, FoAr.fields.updatedBy) + } +} + +object FoAr extends StorableObject[FoAr] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_AR" + + object fields extends FieldsObject { + val arId = new IntDatabaseField(self, "AR_ID") + val closeId = new IntDatabaseField(self, "CLOSE_ID") + val sourceId = new IntDatabaseField(self, "SOURCE_ID") + val value = new DoubleDatabaseField(self, "VALUE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.arId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoArSource.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoArSource.scala new file mode 100644 index 00000000..38677c92 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoArSource.scala @@ -0,0 +1,46 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoArSource extends StorableClass(FoArSource) { + override object values extends ValuesObject { + val sourceId = new IntFieldValue(self, FoArSource.fields.sourceId) + val sourceName = new StringFieldValue(self, FoArSource.fields.sourceName) + val active = new NullableBooleanFieldValue(self, FoArSource.fields.active) + val displayOrder = new DoubleFieldValue(self, FoArSource.fields.displayOrder) + val createdOn = new NullableDateTimeFieldValue(self, FoArSource.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, FoArSource.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, FoArSource.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, FoArSource.fields.updatedBy) + val isOnline = new BooleanFieldValue(self, FoArSource.fields.isOnline) + val readOnly = new NullableBooleanFieldValue(self, FoArSource.fields.readOnly) + } +} + +object FoArSource extends StorableObject[FoArSource] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_AR_SOURCES" + + object fields extends FieldsObject { + val sourceId = new IntDatabaseField(self, "SOURCE_ID") + val sourceName = new StringDatabaseField(self, "SOURCE_NAME", 100) + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + @NullableInDatabase + val displayOrder = new DoubleDatabaseField(self, "DISPLAY_ORDER") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val isOnline = new BooleanDatabaseField(self, "IS_ONLINE", false) + val readOnly = new NullableBooleanDatabaseField(self, "READ_ONLY") + } + + def primaryKey: IntDatabaseField = fields.sourceId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCash.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCash.scala new file mode 100644 index 00000000..1f79c8d3 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCash.scala @@ -0,0 +1,47 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoCash extends StorableClass(FoCash) { + override object values extends ValuesObject { + val cashId = new IntFieldValue(self, FoCash.fields.cashId) + val closeId = new IntFieldValue(self, FoCash.fields.closeId) + val locationIndex = new DoubleFieldValue(self, FoCash.fields.locationIndex) + val value = new DoubleFieldValue(self, FoCash.fields.value) + val createdOn = new DateTimeFieldValue(self, FoCash.fields.createdOn) + val createdBy = new StringFieldValue(self, FoCash.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, FoCash.fields.updatedOn) + val updatedBy = new StringFieldValue(self, FoCash.fields.updatedBy) + val denomIndex = new DoubleFieldValue(self, FoCash.fields.denomIndex) + } +} + +object FoCash extends StorableObject[FoCash] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_CASH" + + object fields extends FieldsObject { + val cashId = new IntDatabaseField(self, "CASH_ID") + val closeId = new IntDatabaseField(self, "CLOSE_ID") + val locationIndex = new DoubleDatabaseField(self, "LOCATION_INDEX") + val value = new DoubleDatabaseField(self, "VALUE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val denomIndex = new DoubleDatabaseField(self, "DENOM_INDEX") + } + + def primaryKey: IntDatabaseField = fields.cashId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCashDenomination.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCashDenomination.scala new file mode 100644 index 00000000..5c19a701 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCashDenomination.scala @@ -0,0 +1,31 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoCashDenomination extends StorableClass(FoCashDenomination) { + override object values extends ValuesObject { + val denomIndex = new IntFieldValue(self, FoCashDenomination.fields.denomIndex) + val denomination = new DoubleFieldValue(self, FoCashDenomination.fields.denomination) + val billCoin = new StringFieldValue(self, FoCashDenomination.fields.billCoin) + } +} + +object FoCashDenomination extends StorableObject[FoCashDenomination] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_CASH_DENOMINATIONS" + + object fields extends FieldsObject { + val denomIndex = new IntDatabaseField(self, "DENOM_INDEX") + val denomination = new DoubleDatabaseField(self, "DENOMINATION") + val billCoin = new StringDatabaseField(self, "BILL_COIN", 1) + } + + def primaryKey: IntDatabaseField = fields.denomIndex +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCashLocation.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCashLocation.scala new file mode 100644 index 00000000..52ab9f1b --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCashLocation.scala @@ -0,0 +1,34 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoCashLocation extends StorableClass(FoCashLocation) { + override object values extends ValuesObject { + val locationIndex = new IntFieldValue(self, FoCashLocation.fields.locationIndex) + val locationNameShort = new StringFieldValue(self, FoCashLocation.fields.locationNameShort) + val locationNameLong = new StringFieldValue(self, FoCashLocation.fields.locationNameLong) + val open = new BooleanFieldValue(self, FoCashLocation.fields.open) + } +} + +object FoCashLocation extends StorableObject[FoCashLocation] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_CASH_LOCATIONS" + + object fields extends FieldsObject { + val locationIndex = new IntDatabaseField(self, "LOCATION_INDEX") + val locationNameShort = new StringDatabaseField(self, "LOCATION_NAME_SHORT", 5) + @NullableInDatabase + val locationNameLong = new StringDatabaseField(self, "LOCATION_NAME_LONG", 100) + val open = new BooleanDatabaseField(self, "OPEN", false) + } + + def primaryKey: IntDatabaseField = fields.locationIndex +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCheck.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCheck.scala new file mode 100644 index 00000000..919ca74d --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCheck.scala @@ -0,0 +1,51 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoCheck extends StorableClass(FoCheck) { + override object values extends ValuesObject { + val checkId = new IntFieldValue(self, FoCheck.fields.checkId) + val closeId = new IntFieldValue(self, FoCheck.fields.closeId) + val value = new DoubleFieldValue(self, FoCheck.fields.value) + val checkNum = new NullableStringFieldValue(self, FoCheck.fields.checkNum) + val createdOn = new DateTimeFieldValue(self, FoCheck.fields.createdOn) + val createdBy = new StringFieldValue(self, FoCheck.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, FoCheck.fields.updatedOn) + val updatedBy = new StringFieldValue(self, FoCheck.fields.updatedBy) + val checkName = new NullableStringFieldValue(self, FoCheck.fields.checkName) + val voidCloseId = new NullableIntFieldValue(self, FoCheck.fields.voidCloseId) + val checkDate = new NullableDateTimeFieldValue(self, FoCheck.fields.checkDate) + } +} + +object FoCheck extends StorableObject[FoCheck] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_CHECKS" + + object fields extends FieldsObject { + val checkId = new IntDatabaseField(self, "CHECK_ID") + val closeId = new IntDatabaseField(self, "CLOSE_ID") + val value = new DoubleDatabaseField(self, "VALUE") + val checkNum = new NullableStringDatabaseField(self, "CHECK_NUM", 50) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val checkName = new NullableStringDatabaseField(self, "CHECK_NAME", 500) + val voidCloseId = new NullableIntDatabaseField(self, "VOID_CLOSE_ID") + val checkDate = new NullableDateTimeDatabaseField(self, "CHECK_DATE") + } + + def primaryKey: IntDatabaseField = fields.checkId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoClose.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoClose.scala index e5763c17..becb1cb0 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoClose.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoClose.scala @@ -3,39 +3,63 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class FoClose extends StorableClass(FoClose) { - object values extends ValuesObject { + override object values extends ValuesObject { val closeId = new IntFieldValue(self, FoClose.fields.closeId) val closedDatetime = new NullableDateTimeFieldValue(self, FoClose.fields.closedDatetime) -// val createdOn = new NullableLocalDateTimeFieldValue(self, FoClose.fields.createdOn) -// val createdBy = new NullableStringFieldValue(self, FoClose.fields.createdBy) -// val updatedOn = new NullableLocalDateTimeFieldValue(self, FoClose.fields.updatedOn) -// val updatedBy = new NullableStringFieldValue(self, FoClose.fields.updatedBy) + val createdOn = new DateTimeFieldValue(self, FoClose.fields.createdOn) + val createdBy = new StringFieldValue(self, FoClose.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, FoClose.fields.updatedOn) + val updatedBy = new StringFieldValue(self, FoClose.fields.updatedBy) + val batchNet = new NullableDoubleFieldValue(self, FoClose.fields.batchNet) + val batchNum = new NullableDoubleFieldValue(self, FoClose.fields.batchNum) + val itemCt = new NullableDoubleFieldValue(self, FoClose.fields.itemCt) + val settleRef = new NullableStringFieldValue(self, FoClose.fields.settleRef) + val closed = new NullableBooleanFieldValue(self, FoClose.fields.closed) val tapeValue = new NullableDoubleFieldValue(self, FoClose.fields.tapeValue) - val notes = new NullableClobFieldValue(self, FoClose.fields.notes) + val notes = new NullableStringFieldValue(self, FoClose.fields.notes) val finalizedBy = new NullableDoubleFieldValue(self, FoClose.fields.finalizedBy) val closeAlias = new NullableStringFieldValue(self, FoClose.fields.closeAlias) val tallyValueAtClose = new NullableDoubleFieldValue(self, FoClose.fields.tallyValueAtClose) + val nextSettleReminderSent = new NullableDateTimeFieldValue(self, FoClose.fields.nextSettleReminderSent) + val settledDatetime = new NullableDateTimeFieldValue(self, FoClose.fields.settledDatetime) val stripeTallyAtClose = new NullableDoubleFieldValue(self, FoClose.fields.stripeTallyAtClose) } } object FoClose extends StorableObject[FoClose] { - val entityName: String = "FO_CLOSES" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_CLOSES" object fields extends FieldsObject { val closeId = new IntDatabaseField(self, "CLOSE_ID") val closedDatetime = new NullableDateTimeDatabaseField(self, "CLOSED_DATETIME") -// val createdOn = new NullableLocalDateTimeDatabaseField(self, "CREATED_ON") -// val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) -// val updatedOn = new NullableLocalDateTimeDatabaseField(self, "UPDATED_ON") -// val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val batchNet = new NullableDoubleDatabaseField(self, "BATCH_NET") + val batchNum = new NullableDoubleDatabaseField(self, "BATCH_NUM") + val itemCt = new NullableDoubleDatabaseField(self, "ITEM_CT") + val settleRef = new NullableStringDatabaseField(self, "SETTLE_REF", 20) + val closed = new NullableBooleanDatabaseField(self, "CLOSED") val tapeValue = new NullableDoubleDatabaseField(self, "TAPE_VALUE") - val notes = new NullableClobDatabaseField(self, "NOTES") + val notes = new NullableStringDatabaseField(self, "NOTES", -1) val finalizedBy = new NullableDoubleDatabaseField(self, "FINALIZED_BY") val closeAlias = new NullableStringDatabaseField(self, "CLOSE_ALIAS", 100) val tallyValueAtClose = new NullableDoubleDatabaseField(self, "TALLY_VALUE_AT_CLOSE") + val nextSettleReminderSent = new NullableDateTimeDatabaseField(self, "NEXT_SETTLE_REMINDER_SENT") + val settledDatetime = new NullableDateTimeDatabaseField(self, "SETTLED_DATETIME") val stripeTallyAtClose = new NullableDoubleDatabaseField(self, "STRIPE_TALLY_AT_CLOSE") } diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCloseUser.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCloseUser.scala new file mode 100644 index 00000000..dbd0606b --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCloseUser.scala @@ -0,0 +1,39 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoCloseUser extends StorableClass(FoCloseUser) { + override object values extends ValuesObject { + val closeId = new IntFieldValue(self, FoCloseUser.fields.closeId) + val userId = new IntFieldValue(self, FoCloseUser.fields.userId) + val openClose = new StringFieldValue(self, FoCloseUser.fields.openClose) + val createdOn = new NullableDateTimeFieldValue(self, FoCloseUser.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, FoCloseUser.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, FoCloseUser.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, FoCloseUser.fields.updatedBy) + } +} + +object FoCloseUser extends StorableObject[FoCloseUser] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_CLOSE_USERS" + + object fields extends FieldsObject { + val closeId = new IntDatabaseField(self, "CLOSE_ID") + val userId = new IntDatabaseField(self, "USER_ID") + val openClose = new StringDatabaseField(self, "OPEN_CLOSE", 1) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.closeId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCurrentClose.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCurrentClose.scala new file mode 100644 index 00000000..9db9b8a4 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoCurrentClose.scala @@ -0,0 +1,31 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoCurrentClose extends StorableClass(FoCurrentClose) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, FoCurrentClose.fields.rowId) + val inPersonId = new IntFieldValue(self, FoCurrentClose.fields.inPersonId) + val onlineId = new IntFieldValue(self, FoCurrentClose.fields.onlineId) + } +} + +object FoCurrentClose extends StorableObject[FoCurrentClose] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_CURRENT_CLOSES" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + val inPersonId = new IntDatabaseField(self, "IN_PERSON_ID") + val onlineId = new IntDatabaseField(self, "ONLINE_ID") + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoItem.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoItem.scala new file mode 100644 index 00000000..e70ec238 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoItem.scala @@ -0,0 +1,59 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoItem extends StorableClass(FoItem) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, FoItem.fields.rowId) + val itemId = new IntFieldValue(self, FoItem.fields.itemId) + val closeId = new IntFieldValue(self, FoItem.fields.closeId) + val unitPrice = new DoubleFieldValue(self, FoItem.fields.unitPrice) + val discountsTotal = new DoubleFieldValue(self, FoItem.fields.discountsTotal) + val qtySold = new DoubleFieldValue(self, FoItem.fields.qtySold) + val qtyComped = new DoubleFieldValue(self, FoItem.fields.qtyComped) + val createdOn = new DateTimeFieldValue(self, FoItem.fields.createdOn) + val createdBy = new StringFieldValue(self, FoItem.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, FoItem.fields.updatedOn) + val updatedBy = new StringFieldValue(self, FoItem.fields.updatedBy) + val taxRate = new NullableDoubleFieldValue(self, FoItem.fields.taxRate) + } +} + +object FoItem extends StorableObject[FoItem] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_ITEMS" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + @NullableInDatabase + val itemId = new IntDatabaseField(self, "ITEM_ID") + @NullableInDatabase + val closeId = new IntDatabaseField(self, "CLOSE_ID") + @NullableInDatabase + val unitPrice = new DoubleDatabaseField(self, "UNIT_PRICE") + @NullableInDatabase + val discountsTotal = new DoubleDatabaseField(self, "DISCOUNTS_TOTAL") + @NullableInDatabase + val qtySold = new DoubleDatabaseField(self, "QTY_SOLD") + @NullableInDatabase + val qtyComped = new DoubleDatabaseField(self, "QTY_COMPED") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val taxRate = new NullableDoubleDatabaseField(self, "TAX_RATE") + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoItemCategorie.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoItemCategorie.scala new file mode 100644 index 00000000..106606b3 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoItemCategorie.scala @@ -0,0 +1,42 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoItemCategorie extends StorableClass(FoItemCategorie) { + override object values extends ValuesObject { + val categoryId = new IntFieldValue(self, FoItemCategorie.fields.categoryId) + val categoryName = new StringFieldValue(self, FoItemCategorie.fields.categoryName) + val createdOn = new DateTimeFieldValue(self, FoItemCategorie.fields.createdOn) + val createdBy = new StringFieldValue(self, FoItemCategorie.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, FoItemCategorie.fields.updatedOn) + val updatedBy = new StringFieldValue(self, FoItemCategorie.fields.updatedBy) + } +} + +object FoItemCategorie extends StorableObject[FoItemCategorie] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_ITEM_CATEGORIES" + + object fields extends FieldsObject { + val categoryId = new IntDatabaseField(self, "CATEGORY_ID") + @NullableInDatabase + val categoryName = new StringDatabaseField(self, "CATEGORY_NAME", 100) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.categoryId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoItemType.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoItemType.scala new file mode 100644 index 00000000..a88d1271 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoItemType.scala @@ -0,0 +1,59 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoItemType extends StorableClass(FoItemType) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, FoItemType.fields.rowId) + val typeId = new IntFieldValue(self, FoItemType.fields.typeId) + val closeId = new IntFieldValue(self, FoItemType.fields.closeId) + val discountsTotal = new DoubleFieldValue(self, FoItemType.fields.discountsTotal) + val qtySold = new DoubleFieldValue(self, FoItemType.fields.qtySold) + val qtyComped = new DoubleFieldValue(self, FoItemType.fields.qtyComped) + val createdOn = new DateTimeFieldValue(self, FoItemType.fields.createdOn) + val createdBy = new StringFieldValue(self, FoItemType.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, FoItemType.fields.updatedOn) + val updatedBy = new StringFieldValue(self, FoItemType.fields.updatedBy) + val unitPrice = new DoubleFieldValue(self, FoItemType.fields.unitPrice) + val taxRate = new NullableDoubleFieldValue(self, FoItemType.fields.taxRate) + } +} + +object FoItemType extends StorableObject[FoItemType] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_ITEM_TYPES" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + @NullableInDatabase + val typeId = new IntDatabaseField(self, "TYPE_ID") + @NullableInDatabase + val closeId = new IntDatabaseField(self, "CLOSE_ID") + @NullableInDatabase + val discountsTotal = new DoubleDatabaseField(self, "DISCOUNTS_TOTAL") + @NullableInDatabase + val qtySold = new DoubleDatabaseField(self, "QTY_SOLD") + @NullableInDatabase + val qtyComped = new DoubleDatabaseField(self, "QTY_COMPED") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase + val unitPrice = new DoubleDatabaseField(self, "UNIT_PRICE") + val taxRate = new NullableDoubleDatabaseField(self, "TAX_RATE") + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoItemTypesLookup.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoItemTypesLookup.scala new file mode 100644 index 00000000..418c6664 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoItemTypesLookup.scala @@ -0,0 +1,46 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoItemTypesLookup extends StorableClass(FoItemTypesLookup) { + override object values extends ValuesObject { + val typeId = new IntFieldValue(self, FoItemTypesLookup.fields.typeId) + val itemId = new IntFieldValue(self, FoItemTypesLookup.fields.itemId) + val description = new StringFieldValue(self, FoItemTypesLookup.fields.description) + val createdOn = new NullableDateTimeFieldValue(self, FoItemTypesLookup.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, FoItemTypesLookup.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, FoItemTypesLookup.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, FoItemTypesLookup.fields.updatedBy) + val active = new NullableBooleanFieldValue(self, FoItemTypesLookup.fields.active) + val displayOrder = new DoubleFieldValue(self, FoItemTypesLookup.fields.displayOrder) + } +} + +object FoItemTypesLookup extends StorableObject[FoItemTypesLookup] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_ITEM_TYPES_LOOKUP" + + object fields extends FieldsObject { + val typeId = new IntDatabaseField(self, "TYPE_ID") + @NullableInDatabase + val itemId = new IntDatabaseField(self, "ITEM_ID") + @NullableInDatabase + val description = new StringDatabaseField(self, "DESCRIPTION", 100) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + @NullableInDatabase + val displayOrder = new DoubleDatabaseField(self, "DISPLAY_ORDER") + } + + def primaryKey: IntDatabaseField = fields.typeId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoItemsLookup.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoItemsLookup.scala new file mode 100644 index 00000000..84c4fdaa --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoItemsLookup.scala @@ -0,0 +1,54 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoItemsLookup extends StorableClass(FoItemsLookup) { + override object values extends ValuesObject { + val itemId = new IntFieldValue(self, FoItemsLookup.fields.itemId) + val categoryId = new IntFieldValue(self, FoItemsLookup.fields.categoryId) + val itemName = new StringFieldValue(self, FoItemsLookup.fields.itemName) + val createdOn = new NullableDateTimeFieldValue(self, FoItemsLookup.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, FoItemsLookup.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, FoItemsLookup.fields.updatedOn) + val updatedBy = new StringFieldValue(self, FoItemsLookup.fields.updatedBy) + val active = new NullableBooleanFieldValue(self, FoItemsLookup.fields.active) + val displayOrder = new DoubleFieldValue(self, FoItemsLookup.fields.displayOrder) + val currentPrice = new DoubleFieldValue(self, FoItemsLookup.fields.currentPrice) + val regCodeRowId = new NullableIntFieldValue(self, FoItemsLookup.fields.regCodeRowId) + val taxable = new NullableBooleanFieldValue(self, FoItemsLookup.fields.taxable) + } +} + +object FoItemsLookup extends StorableObject[FoItemsLookup] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_ITEMS_LOOKUP" + + object fields extends FieldsObject { + val itemId = new IntDatabaseField(self, "ITEM_ID") + @NullableInDatabase + val categoryId = new IntDatabaseField(self, "CATEGORY_ID") + @NullableInDatabase + val itemName = new StringDatabaseField(self, "ITEM_NAME", 200) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + @NullableInDatabase + val displayOrder = new DoubleDatabaseField(self, "DISPLAY_ORDER") + val currentPrice = new DoubleDatabaseField(self, "CURRENT_PRICE") + val regCodeRowId = new NullableIntDatabaseField(self, "REG_CODE_ROW_ID") + val taxable = new NullableBooleanDatabaseField(self, "TAXABLE") + } + + def primaryKey: IntDatabaseField = fields.itemId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoMisc.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoMisc.scala new file mode 100644 index 00000000..46cfb695 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoMisc.scala @@ -0,0 +1,61 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoMisc extends StorableClass(FoMisc) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, FoMisc.fields.rowId) + val itemId = new IntFieldValue(self, FoMisc.fields.itemId) + val closeId = new IntFieldValue(self, FoMisc.fields.closeId) + val qtySold = new DoubleFieldValue(self, FoMisc.fields.qtySold) + val totalPrice = new DoubleFieldValue(self, FoMisc.fields.totalPrice) + val createdOn = new DateTimeFieldValue(self, FoMisc.fields.createdOn) + val createdBy = new StringFieldValue(self, FoMisc.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, FoMisc.fields.updatedOn) + val updatedBy = new StringFieldValue(self, FoMisc.fields.updatedBy) + val qtyComped = new DoubleFieldValue(self, FoMisc.fields.qtyComped) + val totalComp = new DoubleFieldValue(self, FoMisc.fields.totalComp) + val taxRate = new NullableDoubleFieldValue(self, FoMisc.fields.taxRate) + val totalPretax = new NullableDoubleFieldValue(self, FoMisc.fields.totalPretax) + } +} + +object FoMisc extends StorableObject[FoMisc] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_MISC" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + @NullableInDatabase + val itemId = new IntDatabaseField(self, "ITEM_ID") + @NullableInDatabase + val closeId = new IntDatabaseField(self, "CLOSE_ID") + @NullableInDatabase + val qtySold = new DoubleDatabaseField(self, "QTY_SOLD") + @NullableInDatabase + val totalPrice = new DoubleDatabaseField(self, "TOTAL_PRICE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase + val qtyComped = new DoubleDatabaseField(self, "QTY_COMPED") + @NullableInDatabase + val totalComp = new DoubleDatabaseField(self, "TOTAL_COMP") + val taxRate = new NullableDoubleDatabaseField(self, "TAX_RATE") + val totalPretax = new NullableDoubleDatabaseField(self, "TOTAL_PRETAX") + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoMiscLookup.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoMiscLookup.scala new file mode 100644 index 00000000..bae7f12f --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoMiscLookup.scala @@ -0,0 +1,49 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoMiscLookup extends StorableClass(FoMiscLookup) { + override object values extends ValuesObject { + val itemId = new IntFieldValue(self, FoMiscLookup.fields.itemId) + val itemName = new StringFieldValue(self, FoMiscLookup.fields.itemName) + val active = new NullableBooleanFieldValue(self, FoMiscLookup.fields.active) + val displayOrder = new DoubleFieldValue(self, FoMiscLookup.fields.displayOrder) + val regCodeRowId = new NullableIntFieldValue(self, FoMiscLookup.fields.regCodeRowId) + val createdOn = new NullableDateTimeFieldValue(self, FoMiscLookup.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, FoMiscLookup.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, FoMiscLookup.fields.updatedOn) + val updatedBy = new StringFieldValue(self, FoMiscLookup.fields.updatedBy) + val taxable = new NullableBooleanFieldValue(self, FoMiscLookup.fields.taxable) + } +} + +object FoMiscLookup extends StorableObject[FoMiscLookup] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_MISC_LOOKUP" + + object fields extends FieldsObject { + val itemId = new IntDatabaseField(self, "ITEM_ID") + @NullableInDatabase + val itemName = new StringDatabaseField(self, "ITEM_NAME", 200) + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + @NullableInDatabase + val displayOrder = new DoubleDatabaseField(self, "DISPLAY_ORDER") + val regCodeRowId = new NullableIntDatabaseField(self, "REG_CODE_ROW_ID") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val taxable = new NullableBooleanDatabaseField(self, "TAXABLE") + } + + def primaryKey: IntDatabaseField = fields.itemId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoParking.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoParking.scala new file mode 100644 index 00000000..c0b93741 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoParking.scala @@ -0,0 +1,49 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoParking extends StorableClass(FoParking) { + override object values extends ValuesObject { + val closeId = new IntFieldValue(self, FoParking.fields.closeId) + val openCt = new NullableDoubleFieldValue(self, FoParking.fields.openCt) + val closeCt = new NullableDoubleFieldValue(self, FoParking.fields.closeCt) + val changeCt = new NullableDoubleFieldValue(self, FoParking.fields.changeCt) + val createdOn = new DateTimeFieldValue(self, FoParking.fields.createdOn) + val createdBy = new StringFieldValue(self, FoParking.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, FoParking.fields.updatedOn) + val updatedBy = new StringFieldValue(self, FoParking.fields.updatedBy) + val compCt = new NullableDoubleFieldValue(self, FoParking.fields.compCt) + val unitPrice = new DoubleFieldValue(self, FoParking.fields.unitPrice) + } +} + +object FoParking extends StorableObject[FoParking] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_PARKING" + + object fields extends FieldsObject { + val closeId = new IntDatabaseField(self, "CLOSE_ID") + val openCt = new NullableDoubleDatabaseField(self, "OPEN_CT") + val closeCt = new NullableDoubleDatabaseField(self, "CLOSE_CT") + val changeCt = new NullableDoubleDatabaseField(self, "CHANGE_CT") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val compCt = new NullableDoubleDatabaseField(self, "COMP_CT") + val unitPrice = new DoubleDatabaseField(self, "UNIT_PRICE") + } + + def primaryKey: IntDatabaseField = fields.closeId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoRegCode.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoRegCode.scala new file mode 100644 index 00000000..7894c932 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/FoRegCode.scala @@ -0,0 +1,42 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class FoRegCode extends StorableClass(FoRegCode) { + override object values extends ValuesObject { + val code = new NullableDoubleFieldValue(self, FoRegCode.fields.code) + val description = new NullableStringFieldValue(self, FoRegCode.fields.description) + val createdOn = new NullableDateTimeFieldValue(self, FoRegCode.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, FoRegCode.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, FoRegCode.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, FoRegCode.fields.updatedBy) + val active = new NullableBooleanFieldValue(self, FoRegCode.fields.active) + val rowId = new IntFieldValue(self, FoRegCode.fields.rowId) + } +} + +object FoRegCode extends StorableObject[FoRegCode] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "FO_REG_CODES" + + object fields extends FieldsObject { + val code = new NullableDoubleDatabaseField(self, "CODE") + val description = new NullableStringDatabaseField(self, "DESCRIPTION", 200) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + val rowId = new IntDatabaseField(self, "ROW_ID") + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GiftCertPurchase.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GiftCertPurchase.scala new file mode 100644 index 00000000..252fe216 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GiftCertPurchase.scala @@ -0,0 +1,96 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class GiftCertPurchase extends StorableClass(GiftCertPurchase) { + override object values extends ValuesObject { + val certId = new NullableIntFieldValue(self, GiftCertPurchase.fields.certId) + val purchaseDate = new DateTimeFieldValue(self, GiftCertPurchase.fields.purchaseDate) + val purchasePrice = new DoubleFieldValue(self, GiftCertPurchase.fields.purchasePrice) + val purchaseCloseId = new NullableIntFieldValue(self, GiftCertPurchase.fields.purchaseCloseId) + val purchaseOrderId = new NullableIntFieldValue(self, GiftCertPurchase.fields.purchaseOrderId) + val purchaseMemTypeId = new NullableIntFieldValue(self, GiftCertPurchase.fields.purchaseMemTypeId) + val recipientNameFirst = new StringFieldValue(self, GiftCertPurchase.fields.recipientNameFirst) + val recipientNameLast = new StringFieldValue(self, GiftCertPurchase.fields.recipientNameLast) + val recipientEmail = new NullableStringFieldValue(self, GiftCertPurchase.fields.recipientEmail) + val recipientAddr1 = new NullableStringFieldValue(self, GiftCertPurchase.fields.recipientAddr1) + val recipientAddr2 = new NullableStringFieldValue(self, GiftCertPurchase.fields.recipientAddr2) + val recipientCity = new NullableStringFieldValue(self, GiftCertPurchase.fields.recipientCity) + val recipientState = new NullableStringFieldValue(self, GiftCertPurchase.fields.recipientState) + val recipientZip = new NullableStringFieldValue(self, GiftCertPurchase.fields.recipientZip) + val createdOn = new DateTimeFieldValue(self, GiftCertPurchase.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, GiftCertPurchase.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, GiftCertPurchase.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, GiftCertPurchase.fields.updatedBy) + val foMadeDatetime = new NullableDateTimeFieldValue(self, GiftCertPurchase.fields.foMadeDatetime) + val purchaserId = new IntFieldValue(self, GiftCertPurchase.fields.purchaserId) + val deliveryMethod = new StringFieldValue(self, GiftCertPurchase.fields.deliveryMethod) + val message = new NullableStringFieldValue(self, GiftCertPurchase.fields.message) + val purchaseId = new IntFieldValue(self, GiftCertPurchase.fields.purchaseId) + val whoseAddr = new NullableStringFieldValue(self, GiftCertPurchase.fields.whoseAddr) + val expirationDate = new DateTimeFieldValue(self, GiftCertPurchase.fields.expirationDate) + val discountInstanceId = new NullableIntFieldValue(self, GiftCertPurchase.fields.discountInstanceId) + val purchaseValue = new NullableDoubleFieldValue(self, GiftCertPurchase.fields.purchaseValue) + val foMadeBy = new NullableStringFieldValue(self, GiftCertPurchase.fields.foMadeBy) + val soldBy = new NullableStringFieldValue(self, GiftCertPurchase.fields.soldBy) + val whoseEmail = new NullableStringFieldValue(self, GiftCertPurchase.fields.whoseEmail) + val voidCloseId = new NullableIntFieldValue(self, GiftCertPurchase.fields.voidCloseId) + val discountAmt = new NullableDoubleFieldValue(self, GiftCertPurchase.fields.discountAmt) + } +} + +object GiftCertPurchase extends StorableObject[GiftCertPurchase] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "GIFT_CERT_PURCHASES" + + object fields extends FieldsObject { + val certId = new NullableIntDatabaseField(self, "CERT_ID") + @NullableInDatabase + val purchaseDate = new DateTimeDatabaseField(self, "PURCHASE_DATE") + @NullableInDatabase + val purchasePrice = new DoubleDatabaseField(self, "PURCHASE_PRICE") + val purchaseCloseId = new NullableIntDatabaseField(self, "PURCHASE_CLOSE_ID") + val purchaseOrderId = new NullableIntDatabaseField(self, "PURCHASE_ORDER_ID") + val purchaseMemTypeId = new NullableIntDatabaseField(self, "PURCHASE_MEM_TYPE_ID") + @NullableInDatabase + val recipientNameFirst = new StringDatabaseField(self, "RECIPIENT_NAME_FIRST", 100) + @NullableInDatabase + val recipientNameLast = new StringDatabaseField(self, "RECIPIENT_NAME_LAST", 100) + val recipientEmail = new NullableStringDatabaseField(self, "RECIPIENT_EMAIL", 500) + val recipientAddr1 = new NullableStringDatabaseField(self, "RECIPIENT_ADDR_1", 100) + val recipientAddr2 = new NullableStringDatabaseField(self, "RECIPIENT_ADDR_2", 100) + val recipientCity = new NullableStringDatabaseField(self, "RECIPIENT_CITY", 50) + val recipientState = new NullableStringDatabaseField(self, "RECIPIENT_STATE", 5) + val recipientZip = new NullableStringDatabaseField(self, "RECIPIENT_ZIP", 20) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val foMadeDatetime = new NullableDateTimeDatabaseField(self, "FO_MADE_DATETIME") + @NullableInDatabase + val purchaserId = new IntDatabaseField(self, "PURCHASER_ID") + val deliveryMethod = new StringDatabaseField(self, "DELIVERY_METHOD", 1) + val message = new NullableStringDatabaseField(self, "MESSAGE", -1) + val purchaseId = new IntDatabaseField(self, "PURCHASE_ID") + val whoseAddr = new NullableStringDatabaseField(self, "WHOSE_ADDR", 1) + val expirationDate = new DateTimeDatabaseField(self, "EXPIRATION_DATE") + val discountInstanceId = new NullableIntDatabaseField(self, "DISCOUNT_INSTANCE_ID") + val purchaseValue = new NullableDoubleDatabaseField(self, "PURCHASE_VALUE") + val foMadeBy = new NullableStringDatabaseField(self, "FO_MADE_BY", 50) + val soldBy = new NullableStringDatabaseField(self, "SOLD_BY", 50) + val whoseEmail = new NullableStringDatabaseField(self, "WHOSE_EMAIL", 1) + val voidCloseId = new NullableIntDatabaseField(self, "VOID_CLOSE_ID") + val discountAmt = new NullableDoubleDatabaseField(self, "DISCOUNT_AMT") + } + + def primaryKey: IntDatabaseField = fields.purchaseId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GiftCertState.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GiftCertState.scala new file mode 100644 index 00000000..ba0fdb92 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GiftCertState.scala @@ -0,0 +1,49 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class GiftCertState extends StorableClass(GiftCertState) { + override object values extends ValuesObject { + val stateId = new IntFieldValue(self, GiftCertState.fields.stateId) + val certId = new IntFieldValue(self, GiftCertState.fields.certId) + val stateDate = new DateTimeFieldValue(self, GiftCertState.fields.stateDate) + val ownerPersonId = new NullableIntFieldValue(self, GiftCertState.fields.ownerPersonId) + val membershipTypeId = new NullableIntFieldValue(self, GiftCertState.fields.membershipTypeId) + val value = new NullableDoubleFieldValue(self, GiftCertState.fields.value) + val createdOn = new DateTimeFieldValue(self, GiftCertState.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, GiftCertState.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, GiftCertState.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, GiftCertState.fields.updatedBy) + } +} + +object GiftCertState extends StorableObject[GiftCertState] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "GIFT_CERT_STATES" + + object fields extends FieldsObject { + val stateId = new IntDatabaseField(self, "STATE_ID") + @NullableInDatabase + val certId = new IntDatabaseField(self, "CERT_ID") + @NullableInDatabase + val stateDate = new DateTimeDatabaseField(self, "STATE_DATE") + val ownerPersonId = new NullableIntDatabaseField(self, "OWNER_PERSON_ID") + val membershipTypeId = new NullableIntDatabaseField(self, "MEMBERSHIP_TYPE_ID") + val value = new NullableDoubleDatabaseField(self, "VALUE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.stateId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GiftCertificate.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GiftCertificate.scala new file mode 100644 index 00000000..b55e6c28 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GiftCertificate.scala @@ -0,0 +1,43 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class GiftCertificate extends StorableClass(GiftCertificate) { + override object values extends ValuesObject { + val certId = new IntFieldValue(self, GiftCertificate.fields.certId) + val certNumber = new StringFieldValue(self, GiftCertificate.fields.certNumber) + val createdOn = new DateTimeFieldValue(self, GiftCertificate.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, GiftCertificate.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, GiftCertificate.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, GiftCertificate.fields.updatedBy) + val redemptionHash = new NullableStringFieldValue(self, GiftCertificate.fields.redemptionHash) + val redemptionCode = new NullableStringFieldValue(self, GiftCertificate.fields.redemptionCode) + } +} + +object GiftCertificate extends StorableObject[GiftCertificate] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "GIFT_CERTIFICATES" + + object fields extends FieldsObject { + val certId = new IntDatabaseField(self, "CERT_ID") + val certNumber = new StringDatabaseField(self, "CERT_NUMBER", 50) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val redemptionHash = new NullableStringDatabaseField(self, "REDEMPTION_HASH", 50) + val redemptionCode = new NullableStringDatabaseField(self, "REDEMPTION_CODE", 20) + } + + def primaryKey: IntDatabaseField = fields.certId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GiftCertsDiscount.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GiftCertsDiscount.scala new file mode 100644 index 00000000..10dac296 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GiftCertsDiscount.scala @@ -0,0 +1,39 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class GiftCertsDiscount extends StorableClass(GiftCertsDiscount) { + override object values extends ValuesObject { + val assignId = new IntFieldValue(self, GiftCertsDiscount.fields.assignId) + val typeId = new NullableIntFieldValue(self, GiftCertsDiscount.fields.typeId) + val instanceId = new IntFieldValue(self, GiftCertsDiscount.fields.instanceId) + val discountAmt = new NullableDoubleFieldValue(self, GiftCertsDiscount.fields.discountAmt) + val availableOnline = new NullableBooleanFieldValue(self, GiftCertsDiscount.fields.availableOnline) + val fixedCostThreshold = new NullableDoubleFieldValue(self, GiftCertsDiscount.fields.fixedCostThreshold) + val limit = new NullableDoubleFieldValue(self, GiftCertsDiscount.fields.limit) + } +} + +object GiftCertsDiscount extends StorableObject[GiftCertsDiscount] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "GIFT_CERTS_DISCOUNTS" + + object fields extends FieldsObject { + val assignId = new IntDatabaseField(self, "ASSIGN_ID") + val typeId = new NullableIntDatabaseField(self, "TYPE_ID") + val instanceId = new IntDatabaseField(self, "INSTANCE_ID") + val discountAmt = new NullableDoubleDatabaseField(self, "DISCOUNT_AMT") + val availableOnline = new NullableBooleanDatabaseField(self, "AVAILABLE_ONLINE") + val fixedCostThreshold = new NullableDoubleDatabaseField(self, "FIXED_COST_THRESHOLD") + val limit = new NullableDoubleDatabaseField(self, "LIMIT") + } + + def primaryKey: IntDatabaseField = fields.assignId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GlobalConstant.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GlobalConstant.scala new file mode 100644 index 00000000..86471d6d --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GlobalConstant.scala @@ -0,0 +1,39 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class GlobalConstant extends StorableClass(GlobalConstant) { + override object values extends ValuesObject { + val constantId = new IntFieldValue(self, GlobalConstant.fields.constantId) + val constantName = new StringFieldValue(self, GlobalConstant.fields.constantName) + val dataType = new DoubleFieldValue(self, GlobalConstant.fields.dataType) + val createdOn = new NullableDateTimeFieldValue(self, GlobalConstant.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, GlobalConstant.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, GlobalConstant.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, GlobalConstant.fields.updatedBy) + } +} + +object GlobalConstant extends StorableObject[GlobalConstant] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "GLOBAL_CONSTANTS" + + object fields extends FieldsObject { + val constantId = new IntDatabaseField(self, "CONSTANT_ID") + val constantName = new StringDatabaseField(self, "CONSTANT_NAME", 100) + val dataType = new DoubleDatabaseField(self, "DATA_TYPE") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.constantId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GlobalConstantDataType.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GlobalConstantDataType.scala new file mode 100644 index 00000000..f3660d97 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GlobalConstantDataType.scala @@ -0,0 +1,30 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class GlobalConstantDataType extends StorableClass(GlobalConstantDataType) { + override object values extends ValuesObject { + val typeId = new IntFieldValue(self, GlobalConstantDataType.fields.typeId) + val typeName = new StringFieldValue(self, GlobalConstantDataType.fields.typeName) + } +} + +object GlobalConstantDataType extends StorableObject[GlobalConstantDataType] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "GLOBAL_CONSTANT_DATA_TYPES" + + object fields extends FieldsObject { + val typeId = new IntDatabaseField(self, "TYPE_ID") + @NullableInDatabase + val typeName = new StringDatabaseField(self, "TYPE_NAME", 50) + } + + def primaryKey: IntDatabaseField = fields.typeId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GlobalConstantsValue.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GlobalConstantsValue.scala new file mode 100644 index 00000000..76477868 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GlobalConstantsValue.scala @@ -0,0 +1,45 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class GlobalConstantsValue extends StorableClass(GlobalConstantsValue) { + override object values extends ValuesObject { + val valueId = new IntFieldValue(self, GlobalConstantsValue.fields.valueId) + val constantId = new IntFieldValue(self, GlobalConstantsValue.fields.constantId) + val effectiveDatetime = new DateTimeFieldValue(self, GlobalConstantsValue.fields.effectiveDatetime) + val createdOn = new NullableDateTimeFieldValue(self, GlobalConstantsValue.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, GlobalConstantsValue.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, GlobalConstantsValue.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, GlobalConstantsValue.fields.updatedBy) + val valueNumber = new NullableDoubleFieldValue(self, GlobalConstantsValue.fields.valueNumber) + val valueDate = new NullableDateTimeFieldValue(self, GlobalConstantsValue.fields.valueDate) + } +} + +object GlobalConstantsValue extends StorableObject[GlobalConstantsValue] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "GLOBAL_CONSTANTS_VALUES" + + object fields extends FieldsObject { + val valueId = new IntDatabaseField(self, "VALUE_ID") + @NullableInDatabase + val constantId = new IntDatabaseField(self, "CONSTANT_ID") + @NullableInDatabase + val effectiveDatetime = new DateTimeDatabaseField(self, "EFFECTIVE_DATETIME") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val valueNumber = new NullableDoubleDatabaseField(self, "VALUE_NUMBER") + val valueDate = new NullableDateTimeDatabaseField(self, "VALUE_DATE") + } + + def primaryKey: IntDatabaseField = fields.valueId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GuestPriv.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GuestPriv.scala index 068e877b..893aedf5 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GuestPriv.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/GuestPriv.scala @@ -1,49 +1,58 @@ -package org.sailcbi.APIServer.Entities.EntityDefinitions - -import com.coleji.neptune.Storable.FieldValues._ -import com.coleji.neptune.Storable.Fields._ -import com.coleji.neptune.Storable._ - -class GuestPriv extends StorableClass(GuestPriv) { - object values extends ValuesObject { - val membershipId = new IntFieldValue(self, GuestPriv.fields.membershipId) - val orderId = new NullableIntFieldValue(self, GuestPriv.fields.orderId) - val price = new NullableDoubleFieldValue(self, GuestPriv.fields.price) - val purchaseDate = new NullableDateTimeFieldValue(self, GuestPriv.fields.purchaseDate) - val startDate = new NullableDateFieldValue(self, GuestPriv.fields.startDate) - val closeId = new NullableIntFieldValue(self, GuestPriv.fields.closeId) - val voidCloseId = new NullableIntFieldValue(self, GuestPriv.fields.voidCloseId) - val paymentLocation = new NullableStringFieldValue(self, GuestPriv.fields.paymentLocation) - val paymentMedium = new NullableStringFieldValue(self, GuestPriv.fields.paymentMedium) - val ccTransNum = new NullableIntFieldValue(self, GuestPriv.fields.ccTransNum) -// val createdOn = new NullableDateTimeFieldValue(self, GuestPriv.fields.createdOn) -// val createdBy = new NullableStringFieldValue(self, GuestPriv.fields.createdBy) -// val updatedOn = new NullableDateTimeFieldValue(self, GuestPriv.fields.updatedOn) -// val updatedBy = new NullableStringFieldValue(self, GuestPriv.fields.updatedBy) - } -} - -object GuestPriv extends StorableObject[GuestPriv] { - val entityName: String = "GUEST_PRIVS" - - override val useRuntimeFieldnamesForJson: Boolean = true - - object fields extends FieldsObject { - val membershipId = new IntDatabaseField(self, "MEMBERSHIP_ID") - val orderId = new NullableIntDatabaseField(self, "ORDER_ID") - val price = new NullableDoubleDatabaseField(self, "PRICE") - val purchaseDate = new NullableDateTimeDatabaseField(self, "PURCHASE_DATE") - val startDate = new NullableDateDatabaseField(self, "START_DATE") - val closeId = new NullableIntDatabaseField(self, "CLOSE_ID") - val voidCloseId = new NullableIntDatabaseField(self, "VOID_CLOSE_ID") - val paymentLocation = new NullableStringDatabaseField(self, "PAYMENT_LOCATION", 50) - val paymentMedium = new NullableStringDatabaseField(self, "PAYMENT_MEDIUM", 50) - val ccTransNum = new NullableIntDatabaseField(self, "CC_TRANS_NUM") -// val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") -// val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) -// val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") -// val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) - } - - def primaryKey: IntDatabaseField = fields.membershipId +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class GuestPriv extends StorableClass(GuestPriv) { + override object values extends ValuesObject { + val orderId = new NullableIntFieldValue(self, GuestPriv.fields.orderId) + val price = new DoubleFieldValue(self, GuestPriv.fields.price) + val purchaseDate = new DateTimeFieldValue(self, GuestPriv.fields.purchaseDate) + val startDate = new DateTimeFieldValue(self, GuestPriv.fields.startDate) + val closeId = new NullableIntFieldValue(self, GuestPriv.fields.closeId) + val voidCloseId = new NullableIntFieldValue(self, GuestPriv.fields.voidCloseId) + val paymentLocation = new NullableStringFieldValue(self, GuestPriv.fields.paymentLocation) + val paymentMedium = new NullableStringFieldValue(self, GuestPriv.fields.paymentMedium) + val ccTransNum = new NullableDoubleFieldValue(self, GuestPriv.fields.ccTransNum) + val createdOn = new DateTimeFieldValue(self, GuestPriv.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, GuestPriv.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, GuestPriv.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, GuestPriv.fields.updatedBy) + val membershipId = new IntFieldValue(self, GuestPriv.fields.membershipId) + } +} + +object GuestPriv extends StorableObject[GuestPriv] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "GUEST_PRIVS" + + object fields extends FieldsObject { + val orderId = new NullableIntDatabaseField(self, "ORDER_ID") + @NullableInDatabase + val price = new DoubleDatabaseField(self, "PRICE") + @NullableInDatabase + val purchaseDate = new DateTimeDatabaseField(self, "PURCHASE_DATE") + @NullableInDatabase + val startDate = new DateTimeDatabaseField(self, "START_DATE") + val closeId = new NullableIntDatabaseField(self, "CLOSE_ID") + val voidCloseId = new NullableIntDatabaseField(self, "VOID_CLOSE_ID") + val paymentLocation = new NullableStringDatabaseField(self, "PAYMENT_LOCATION", 50) + val paymentMedium = new NullableStringDatabaseField(self, "PAYMENT_MEDIUM", 50) + val ccTransNum = new NullableDoubleDatabaseField(self, "CC_TRANS_NUM") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val membershipId = new IntDatabaseField(self, "MEMBERSHIP_ID") + } + + def primaryKey: IntDatabaseField = fields.membershipId } \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/HighSchool.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/HighSchool.scala index e0fcb728..8295c989 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/HighSchool.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/HighSchool.scala @@ -1,25 +1,47 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{BooleanFieldValue, IntFieldValue, StringFieldValue} -import com.coleji.neptune.Storable.Fields.{BooleanDatabaseField, IntDatabaseField, StringDatabaseField} -import com.coleji.neptune.Storable.{FieldsObject, StorableClass, StorableObject, ValuesObject} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class HighSchool extends StorableClass(HighSchool) { - object values extends ValuesObject { + override object values extends ValuesObject { val schoolId = new IntFieldValue(self, HighSchool.fields.schoolId) val schoolName = new StringFieldValue(self, HighSchool.fields.schoolName) + val createdOn = new DateTimeFieldValue(self, HighSchool.fields.createdOn) + val createdBy = new StringFieldValue(self, HighSchool.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, HighSchool.fields.updatedOn) + val updatedBy = new StringFieldValue(self, HighSchool.fields.updatedBy) val active = new BooleanFieldValue(self, HighSchool.fields.active) + val displayOrder = new NullableDoubleFieldValue(self, HighSchool.fields.displayOrder) } } object HighSchool extends StorableObject[HighSchool] { - val entityName: String = "HIGH_SCHOOLS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "HIGH_SCHOOLS" object fields extends FieldsObject { val schoolId = new IntDatabaseField(self, "SCHOOL_ID") + @NullableInDatabase val schoolName = new StringDatabaseField(self, "SCHOOL_NAME", 200) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase val active = new BooleanDatabaseField(self, "ACTIVE", true) + val displayOrder = new NullableDoubleDatabaseField(self, "DISPLAY_ORDER") } def primaryKey: IntDatabaseField = fields.schoolId -} +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/HighSchoolFee.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/HighSchoolFee.scala new file mode 100644 index 00000000..2a3b1a72 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/HighSchoolFee.scala @@ -0,0 +1,49 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class HighSchoolFee extends StorableClass(HighSchoolFee) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, HighSchoolFee.fields.rowId) + val schoolId = new IntFieldValue(self, HighSchoolFee.fields.schoolId) + val year = new DoubleFieldValue(self, HighSchoolFee.fields.year) + val springFall = new StringFieldValue(self, HighSchoolFee.fields.springFall) + val amount = new DoubleFieldValue(self, HighSchoolFee.fields.amount) + val closeId = new IntFieldValue(self, HighSchoolFee.fields.closeId) + val voidCloseId = new NullableIntFieldValue(self, HighSchoolFee.fields.voidCloseId) + val createdOn = new NullableDateTimeFieldValue(self, HighSchoolFee.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, HighSchoolFee.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, HighSchoolFee.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, HighSchoolFee.fields.updatedBy) + } +} + +object HighSchoolFee extends StorableObject[HighSchoolFee] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "HIGH_SCHOOL_FEES" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + val schoolId = new IntDatabaseField(self, "SCHOOL_ID") + val year = new DoubleDatabaseField(self, "YEAR") + val springFall = new StringDatabaseField(self, "SPRING_FALL", 1) + @NullableInDatabase + val amount = new DoubleDatabaseField(self, "AMOUNT") + @NullableInDatabase + val closeId = new IntDatabaseField(self, "CLOSE_ID") + val voidCloseId = new NullableIntDatabaseField(self, "VOID_CLOSE_ID") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 50) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 50) + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/HighSchoolPayment.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/HighSchoolPayment.scala new file mode 100644 index 00000000..8e328c84 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/HighSchoolPayment.scala @@ -0,0 +1,54 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class HighSchoolPayment extends StorableClass(HighSchoolPayment) { + override object values extends ValuesObject { + val paymentId = new IntFieldValue(self, HighSchoolPayment.fields.paymentId) + val schoolId = new IntFieldValue(self, HighSchoolPayment.fields.schoolId) + val amount = new DoubleFieldValue(self, HighSchoolPayment.fields.amount) + val closeId = new IntFieldValue(self, HighSchoolPayment.fields.closeId) + val voidCloseId = new NullableIntFieldValue(self, HighSchoolPayment.fields.voidCloseId) + val createdOn = new NullableDateTimeFieldValue(self, HighSchoolPayment.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, HighSchoolPayment.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, HighSchoolPayment.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, HighSchoolPayment.fields.updatedBy) + val paymentMedium = new NullableStringFieldValue(self, HighSchoolPayment.fields.paymentMedium) + val ccTransNum = new NullableDoubleFieldValue(self, HighSchoolPayment.fields.ccTransNum) + val checkId = new IntFieldValue(self, HighSchoolPayment.fields.checkId) + val springFall = new StringFieldValue(self, HighSchoolPayment.fields.springFall) + val year = new DoubleFieldValue(self, HighSchoolPayment.fields.year) + } +} + +object HighSchoolPayment extends StorableObject[HighSchoolPayment] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "HIGH_SCHOOL_PAYMENTS" + + object fields extends FieldsObject { + val paymentId = new IntDatabaseField(self, "PAYMENT_ID") + val schoolId = new IntDatabaseField(self, "SCHOOL_ID") + val amount = new DoubleDatabaseField(self, "AMOUNT") + val closeId = new IntDatabaseField(self, "CLOSE_ID") + val voidCloseId = new NullableIntDatabaseField(self, "VOID_CLOSE_ID") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 50) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 50) + val paymentMedium = new NullableStringDatabaseField(self, "PAYMENT_MEDIUM", 50) + val ccTransNum = new NullableDoubleDatabaseField(self, "CC_TRANS_NUM") + @NullableInDatabase + val checkId = new IntDatabaseField(self, "CHECK_ID") + val springFall = new StringDatabaseField(self, "SPRING_FALL", 1) + val year = new DoubleDatabaseField(self, "YEAR") + } + + def primaryKey: IntDatabaseField = fields.paymentId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/IncomeLevel.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/IncomeLevel.scala new file mode 100644 index 00000000..b4890e1b --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/IncomeLevel.scala @@ -0,0 +1,43 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class IncomeLevel extends StorableClass(IncomeLevel) { + override object values extends ValuesObject { + val levelId = new IntFieldValue(self, IncomeLevel.fields.levelId) + val levelFloor = new NullableDoubleFieldValue(self, IncomeLevel.fields.levelFloor) + val levelCeiling = new NullableDoubleFieldValue(self, IncomeLevel.fields.levelCeiling) + val createdOn = new DateTimeFieldValue(self, IncomeLevel.fields.createdOn) + val createdBy = new StringFieldValue(self, IncomeLevel.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, IncomeLevel.fields.updatedOn) + val updatedBy = new StringFieldValue(self, IncomeLevel.fields.updatedBy) + } +} + +object IncomeLevel extends StorableObject[IncomeLevel] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "INCOME_LEVELS" + + object fields extends FieldsObject { + val levelId = new IntDatabaseField(self, "LEVEL_ID") + val levelFloor = new NullableDoubleDatabaseField(self, "LEVEL_FLOOR") + val levelCeiling = new NullableDoubleDatabaseField(self, "LEVEL_CEILING") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.levelId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/IndiegogoDonation.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/IndiegogoDonation.scala new file mode 100644 index 00000000..32495500 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/IndiegogoDonation.scala @@ -0,0 +1,65 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class IndiegogoDonation extends StorableClass(IndiegogoDonation) { + override object values extends ValuesObject { + val id = new IntFieldValue(self, IndiegogoDonation.fields.id) + val perkId = new NullableStringFieldValue(self, IndiegogoDonation.fields.perkId) + val pledgeId = new NullableIntFieldValue(self, IndiegogoDonation.fields.pledgeId) + val fulfillmentStatus = new NullableStringFieldValue(self, IndiegogoDonation.fields.fulfillmentStatus) + val fundingDate = new NullableStringFieldValue(self, IndiegogoDonation.fields.fundingDate) + val paymentMethod = new NullableStringFieldValue(self, IndiegogoDonation.fields.paymentMethod) + val appearance = new NullableStringFieldValue(self, IndiegogoDonation.fields.appearance) + val name = new NullableStringFieldValue(self, IndiegogoDonation.fields.name) + val email = new NullableStringFieldValue(self, IndiegogoDonation.fields.email) + val amount = new NullableStringFieldValue(self, IndiegogoDonation.fields.amount) + val perk = new NullableStringFieldValue(self, IndiegogoDonation.fields.perk) + val shippingName = new NullableStringFieldValue(self, IndiegogoDonation.fields.shippingName) + val shippingAddress = new NullableStringFieldValue(self, IndiegogoDonation.fields.shippingAddress) + val shippingAddress2 = new NullableStringFieldValue(self, IndiegogoDonation.fields.shippingAddress2) + val shippingCity = new NullableStringFieldValue(self, IndiegogoDonation.fields.shippingCity) + val shippingStateprovince = new NullableStringFieldValue(self, IndiegogoDonation.fields.shippingStateprovince) + val shippingZippostalCode = new NullableStringFieldValue(self, IndiegogoDonation.fields.shippingZippostalCode) + val shippingCountry = new NullableStringFieldValue(self, IndiegogoDonation.fields.shippingCountry) + val amountNumeric = new NullableDoubleFieldValue(self, IndiegogoDonation.fields.amountNumeric) + val instance = new DoubleFieldValue(self, IndiegogoDonation.fields.instance) + } +} + +object IndiegogoDonation extends StorableObject[IndiegogoDonation] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "INDIEGOGO_DONATIONS" + + object fields extends FieldsObject { + val id = new IntDatabaseField(self, "ID") + val perkId = new NullableStringDatabaseField(self, "PERK_ID", 30) + val pledgeId = new NullableIntDatabaseField(self, "PLEDGE_ID") + val fulfillmentStatus = new NullableStringDatabaseField(self, "FULFILLMENT_STATUS", 60) + val fundingDate = new NullableStringDatabaseField(self, "FUNDING_DATE", 30) + val paymentMethod = new NullableStringDatabaseField(self, "PAYMENT_METHOD", 30) + val appearance = new NullableStringDatabaseField(self, "APPEARANCE", 30) + val name = new NullableStringDatabaseField(self, "NAME", 1) + val email = new NullableStringDatabaseField(self, "EMAIL", 255) + val amount = new NullableStringDatabaseField(self, "AMOUNT", 30) + val perk = new NullableStringDatabaseField(self, "PERK", 255) + val shippingName = new NullableStringDatabaseField(self, "SHIPPING_NAME", 30) + val shippingAddress = new NullableStringDatabaseField(self, "SHIPPING_ADDRESS", 255) + val shippingAddress2 = new NullableStringDatabaseField(self, "SHIPPING_ADDRESS_2", 30) + val shippingCity = new NullableStringDatabaseField(self, "SHIPPING_CITY", 30) + val shippingStateprovince = new NullableStringDatabaseField(self, "SHIPPING_STATEPROVINCE", 30) + val shippingZippostalCode = new NullableStringDatabaseField(self, "SHIPPING_ZIPPOSTAL_CODE", 30) + val shippingCountry = new NullableStringDatabaseField(self, "SHIPPING_COUNTRY", 30) + val amountNumeric = new NullableDoubleDatabaseField(self, "AMOUNT_NUMERIC") + val instance = new DoubleDatabaseField(self, "INSTANCE") + } + + def primaryKey: IntDatabaseField = fields.id +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/InstallmentSale.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/InstallmentSale.scala new file mode 100644 index 00000000..62801ce2 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/InstallmentSale.scala @@ -0,0 +1,35 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class InstallmentSale extends StorableClass(InstallmentSale) { + override object values extends ValuesObject { + val saleId = new IntFieldValue(self, InstallmentSale.fields.saleId) + val amountInCents = new DoubleFieldValue(self, InstallmentSale.fields.amountInCents) + val staggerId = new IntFieldValue(self, InstallmentSale.fields.staggerId) + val closeId = new IntFieldValue(self, InstallmentSale.fields.closeId) + val voidCloseId = new NullableIntFieldValue(self, InstallmentSale.fields.voidCloseId) + } +} + +object InstallmentSale extends StorableObject[InstallmentSale] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "INSTALLMENT_SALES" + + object fields extends FieldsObject { + val saleId = new IntDatabaseField(self, "SALE_ID") + val amountInCents = new DoubleDatabaseField(self, "AMOUNT_IN_CENTS") + val staggerId = new IntDatabaseField(self, "STAGGER_ID") + val closeId = new IntDatabaseField(self, "CLOSE_ID") + val voidCloseId = new NullableIntDatabaseField(self, "VOID_CLOSE_ID") + } + + def primaryKey: IntDatabaseField = fields.saleId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/InstructionQueue.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/InstructionQueue.scala new file mode 100644 index 00000000..d6a617eb --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/InstructionQueue.scala @@ -0,0 +1,57 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class InstructionQueue extends StorableClass(InstructionQueue) { + override object values extends ValuesObject { + val instructionId = new IntFieldValue(self, InstructionQueue.fields.instructionId) + val cardNum = new StringFieldValue(self, InstructionQueue.fields.cardNum) + val signoutId = new NullableIntFieldValue(self, InstructionQueue.fields.signoutId) + val addedDatetime = new DateTimeFieldValue(self, InstructionQueue.fields.addedDatetime) + val createdOn = new DateTimeFieldValue(self, InstructionQueue.fields.createdOn) + val createdBy = new StringFieldValue(self, InstructionQueue.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, InstructionQueue.fields.updatedOn) + val updatedBy = new StringFieldValue(self, InstructionQueue.fields.updatedBy) + val programId = new IntFieldValue(self, InstructionQueue.fields.programId) + val queueOrder = new DoubleFieldValue(self, InstructionQueue.fields.queueOrder) + val personId = new IntFieldValue(self, InstructionQueue.fields.personId) + val startActive = new NullableDateTimeFieldValue(self, InstructionQueue.fields.startActive) + val endActive = new NullableDateTimeFieldValue(self, InstructionQueue.fields.endActive) + } +} + +object InstructionQueue extends StorableObject[InstructionQueue] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "INSTRUCTION_QUEUE" + + object fields extends FieldsObject { + val instructionId = new IntDatabaseField(self, "INSTRUCTION_ID") + val cardNum = new StringDatabaseField(self, "CARD_NUM", 50) + val signoutId = new NullableIntDatabaseField(self, "SIGNOUT_ID") + @NullableInDatabase + val addedDatetime = new DateTimeDatabaseField(self, "ADDED_DATETIME") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val programId = new IntDatabaseField(self, "PROGRAM_ID") + @NullableInDatabase + val queueOrder = new DoubleDatabaseField(self, "QUEUE_ORDER") + val personId = new IntDatabaseField(self, "PERSON_ID") + val startActive = new NullableDateTimeDatabaseField(self, "START_ACTIVE") + val endActive = new NullableDateTimeDatabaseField(self, "END_ACTIVE") + } + + def primaryKey: IntDatabaseField = fields.instructionId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassAttendance.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassAttendance.scala new file mode 100644 index 00000000..d24e71a9 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassAttendance.scala @@ -0,0 +1,41 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class JpClassAttendance extends StorableClass(JpClassAttendance) { + override object values extends ValuesObject { + val attendId = new IntFieldValue(self, JpClassAttendance.fields.attendId) + val sessionId = new IntFieldValue(self, JpClassAttendance.fields.sessionId) + val signupId = new IntFieldValue(self, JpClassAttendance.fields.signupId) + val attend = new NullableStringFieldValue(self, JpClassAttendance.fields.attend) + val createdOn = new NullableDateTimeFieldValue(self, JpClassAttendance.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, JpClassAttendance.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, JpClassAttendance.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, JpClassAttendance.fields.updatedBy) + } +} + +object JpClassAttendance extends StorableObject[JpClassAttendance] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_CLASS_ATTENDANCE" + + object fields extends FieldsObject { + val attendId = new IntDatabaseField(self, "ATTEND_ID") + val sessionId = new IntDatabaseField(self, "SESSION_ID") + val signupId = new IntDatabaseField(self, "SIGNUP_ID") + val attend = new NullableStringDatabaseField(self, "ATTEND", 1) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.attendId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassInstance.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassInstance.scala index 00fc1ada..2adcb618 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassInstance.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassInstance.scala @@ -1,50 +1,78 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{BooleanFieldValue, IntFieldValue, NullableIntFieldValue} -import com.coleji.neptune.Storable.Fields.{BooleanDatabaseField, IntDatabaseField, NullableIntDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.{Initializable, InitializableFromCollectionSubset} +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class JpClassInstance extends StorableClass(JpClassInstance) { + + override object calculations extends CalculationsObject { + lazy val firstSession: JpClassSession = references.jpClassSessions.get.sortWith((a: JpClassSession, b: JpClassSession) => { + a.values.sessionDatetime.get.isBefore(b.values.sessionDatetime.get) + }).head + } + override object references extends ReferencesObject { val classLocation = new Initializable[Option[ClassLocation]] val classInstructor = new Initializable[Option[ClassInstructor]] val jpClassType = new Initializable[JpClassType] - val jpClassSessions = new Initializable[IndexedSeq[JpClassSession]] - val jpClassSignups = new Initializable[IndexedSeq[JpClassSignup]] + val jpClassSessions = new InitializableSeq[JpClassSession, IndexedSeq[JpClassSession]] + val jpClassSignups = new InitializableSeq[JpClassSignup, IndexedSeq[JpClassSignup]] } - object values extends ValuesObject { + override object values extends ValuesObject { val instanceId = new IntFieldValue(self, JpClassInstance.fields.instanceId) + val typeId = new IntFieldValue(self, JpClassInstance.fields.typeId) + val limitOverride = new NullableDoubleFieldValue(self, JpClassInstance.fields.limitOverride) + val nameOverride = new NullableStringFieldValue(self, JpClassInstance.fields.nameOverride) + val maxAge = new NullableDoubleFieldValue(self, JpClassInstance.fields.maxAge) + val createdOn = new DateTimeFieldValue(self, JpClassInstance.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, JpClassInstance.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpClassInstance.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, JpClassInstance.fields.updatedBy) + val minAge = new NullableDoubleFieldValue(self, JpClassInstance.fields.minAge) + val price = new NullableDoubleFieldValue(self, JpClassInstance.fields.price) + val regCodeRowId = new NullableIntFieldValue(self, JpClassInstance.fields.regCodeRowId) + val confirmTemplate = new NullableStringFieldValue(self, JpClassInstance.fields.confirmTemplate) + val adminHold = new NullableBooleanFieldValue(self, JpClassInstance.fields.adminHold) val instructorId = new NullableIntFieldValue(self, JpClassInstance.fields.instructorId) val locationId = new NullableIntFieldValue(self, JpClassInstance.fields.locationId) - val typeId = new IntFieldValue(self, JpClassInstance.fields.typeId) - val adminHold = new BooleanFieldValue(self, JpClassInstance.fields.adminHold) - } - - object calculatedValues extends CalculatedValuesObject { - val sessions = new InitializableFromCollectionSubset[List[JpClassSession], JpClassSession]((s: JpClassSession) => { - s.values.instanceId.get == values.instanceId.get - }) - - // TODO: is there a way to make this not compile if you call it unsafely? Better way to structure this? - lazy val firstSession: JpClassSession = sessions.get.sortWith((a: JpClassSession, b: JpClassSession) => { - a.values.sessionDateTime.get.isBefore(b.values.sessionDateTime.get) - }).head + val reservedForGroup = new NullableBooleanFieldValue(self, JpClassInstance.fields.reservedForGroup) + val overrideNoLimit = new NullableBooleanFieldValue(self, JpClassInstance.fields.overrideNoLimit) } - } object JpClassInstance extends StorableObject[JpClassInstance] { - val entityName: String = "JP_CLASS_INSTANCES" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_CLASS_INSTANCES" object fields extends FieldsObject { val instanceId = new IntDatabaseField(self, "INSTANCE_ID") + val typeId = new IntDatabaseField(self, "TYPE_ID") + val limitOverride = new NullableDoubleDatabaseField(self, "LIMIT_OVERRIDE") + val nameOverride = new NullableStringDatabaseField(self, "NAME_OVERRIDE", 200) + val maxAge = new NullableDoubleDatabaseField(self, "MAX_AGE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val minAge = new NullableDoubleDatabaseField(self, "MIN_AGE") + val price = new NullableDoubleDatabaseField(self, "PRICE") + val regCodeRowId = new NullableIntDatabaseField(self, "REG_CODE_ROW_ID") + val confirmTemplate = new NullableStringDatabaseField(self, "CONFIRM_TEMPLATE", 100) + val adminHold = new NullableBooleanDatabaseField(self, "ADMIN_HOLD") val instructorId = new NullableIntDatabaseField(self, "INSTRUCTOR_ID") val locationId = new NullableIntDatabaseField(self, "LOCATION_ID") - val typeId = new IntDatabaseField(self, "TYPE_ID") - val adminHold = new BooleanDatabaseField(self, "ADMIN_HOLD", true) + val reservedForGroup = new NullableBooleanDatabaseField(self, "RESERVED_FOR_GROUP") + val overrideNoLimit = new NullableBooleanDatabaseField(self, "OVERRIDE_NO_LIMIT") } def primaryKey: IntDatabaseField = fields.instanceId -} +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSection.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSection.scala index bf2bf68e..dd9083af 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSection.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSection.scala @@ -1,10 +1,12 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.IntFieldValue -import com.coleji.neptune.Storable.Fields.IntDatabaseField +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable +import com.coleji.neptune.Util._ import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class JpClassSection extends StorableClass(JpClassSection) { override object references extends ReferencesObject { @@ -12,15 +14,23 @@ class JpClassSection extends StorableClass(JpClassSection) { val sectionLookup = new Initializable[JpClassSectionLookup] } - object values extends ValuesObject { + override object values extends ValuesObject { val sectionId = new IntFieldValue(self, JpClassSection.fields.sectionId) val instanceId = new IntFieldValue(self, JpClassSection.fields.instanceId) val lookupId = new IntFieldValue(self, JpClassSection.fields.lookupId) + val createdOn = new DateTimeFieldValue(self, JpClassSection.fields.createdOn) + val createdBy = new StringFieldValue(self, JpClassSection.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpClassSection.fields.updatedOn) + val updatedBy = new StringFieldValue(self, JpClassSection.fields.updatedBy) + val locationId = new NullableIntFieldValue(self, JpClassSection.fields.locationId) + val instructorId = new NullableIntFieldValue(self, JpClassSection.fields.instructorId) } } object JpClassSection extends StorableObject[JpClassSection] { - val entityName: String = "JP_CLASS_SECTIONS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_CLASS_SECTIONS" object fields extends FieldsObject { val sectionId = new IntDatabaseField(self, "SECTION_ID") @@ -28,6 +38,16 @@ object JpClassSection extends StorableObject[JpClassSection] { val instanceId = new IntDatabaseField(self, "INSTANCE_ID") @NullableInDatabase val lookupId = new IntDatabaseField(self, "LOOKUP_ID") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val locationId = new NullableIntDatabaseField(self, "LOCATION_ID") + val instructorId = new NullableIntDatabaseField(self, "INSTRUCTOR_ID") } def primaryKey: IntDatabaseField = fields.sectionId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSectionLookup.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSectionLookup.scala index d699c376..a38b524a 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSectionLookup.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSectionLookup.scala @@ -1,32 +1,50 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{IntFieldValue, StringFieldValue} -import com.coleji.neptune.Storable.Fields.{IntDatabaseField, StringDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class JpClassSectionLookup extends StorableClass(JpClassSectionLookup) { - override object references extends ReferencesObject { - } - - object values extends ValuesObject { + override object values extends ValuesObject { val sectionId = new IntFieldValue(self, JpClassSectionLookup.fields.sectionId) val sectionName = new StringFieldValue(self, JpClassSectionLookup.fields.sectionName) + val createdOn = new DateTimeFieldValue(self, JpClassSectionLookup.fields.createdOn) + val createdBy = new StringFieldValue(self, JpClassSectionLookup.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpClassSectionLookup.fields.updatedOn) + val updatedBy = new StringFieldValue(self, JpClassSectionLookup.fields.updatedBy) + val active = new NullableBooleanFieldValue(self, JpClassSectionLookup.fields.active) + val displayOrder = new DoubleFieldValue(self, JpClassSectionLookup.fields.displayOrder) val svgUrl = new StringFieldValue(self, JpClassSectionLookup.fields.svgUrl) } - } object JpClassSectionLookup extends StorableObject[JpClassSectionLookup] { - val entityName: String = "JP_CLASS_SECTION_LOOKUP" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_CLASS_SECTION_LOOKUP" object fields extends FieldsObject { val sectionId = new IntDatabaseField(self, "SECTION_ID") @NullableInDatabase val sectionName = new StringDatabaseField(self, "SECTION_NAME", 50) @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + @NullableInDatabase + val displayOrder = new DoubleDatabaseField(self, "DISPLAY_ORDER") + @NullableInDatabase val svgUrl = new StringDatabaseField(self, "SVG_URL", 100) } def primaryKey: IntDatabaseField = fields.sectionId -} +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSession.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSession.scala index 5a30da94..1ea5cf77 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSession.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSession.scala @@ -1,40 +1,50 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Core.UnlockedRequestCache -import com.coleji.neptune.Storable.FieldValues.{DateTimeFieldValue, IntFieldValue, NullableDoubleFieldValue} -import com.coleji.neptune.Storable.Fields.{DateTimeDatabaseField, IntDatabaseField, NullableDoubleDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.{DefinedInitializable, Initializable} -import org.sailcbi.APIServer.IO.CachedData - +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class JpClassSession extends StorableClass(JpClassSession) { + + override object calculations extends CalculationsObject { + val weekAlias = new Initializable[Option[String]] + } + override object references extends ReferencesObject { val jpClassInstance = new Initializable[JpClassInstance] } - object values extends ValuesObject { + override object values extends ValuesObject { val sessionId = new IntFieldValue(self, JpClassSession.fields.sessionId) val instanceId = new IntFieldValue(self, JpClassSession.fields.instanceId) - val sessionDateTime = new DateTimeFieldValue(self, JpClassSession.fields.sessionDateTime) + val sessionDatetime = new DateTimeFieldValue(self, JpClassSession.fields.sessionDatetime) + val createdOn = new DateTimeFieldValue(self, JpClassSession.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, JpClassSession.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpClassSession.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, JpClassSession.fields.updatedBy) val lengthOverride = new NullableDoubleFieldValue(self, JpClassSession.fields.lengthOverride) } - - object calculatedValues extends CalculatedValuesObject { - val jpWeekAlias = new DefinedInitializable[UnlockedRequestCache, Option[String]]((rc: UnlockedRequestCache) => { - val cache = new CachedData(rc) - cache.getJpWeekAlias(values.sessionDateTime.get.toLocalDate) - }) - } } object JpClassSession extends StorableObject[JpClassSession] { - val entityName: String = "JP_CLASS_SESSIONS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_CLASS_SESSIONS" object fields extends FieldsObject { val sessionId = new IntDatabaseField(self, "SESSION_ID") val instanceId = new IntDatabaseField(self, "INSTANCE_ID") - val sessionDateTime = new DateTimeDatabaseField(self, "SESSION_DATETIME") + val sessionDatetime = new DateTimeDatabaseField(self, "SESSION_DATETIME") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) val lengthOverride = new NullableDoubleDatabaseField(self, "LENGTH_OVERRIDE") } diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSignup.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSignup.scala index af9f8fa4..5d4b2329 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSignup.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSignup.scala @@ -1,10 +1,12 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{DateTimeFieldValue, IntFieldValue, NullableIntFieldValue, StringFieldValue} -import com.coleji.neptune.Storable.Fields.{DateTimeDatabaseField, IntDatabaseField, NullableIntDatabaseField, StringDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable +import com.coleji.neptune.Util._ import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class JpClassSignup extends StorableClass(JpClassSignup) { override object references extends ReferencesObject { @@ -15,32 +17,70 @@ class JpClassSignup extends StorableClass(JpClassSignup) { val section = new Initializable[Option[JpClassSection]] } - object values extends ValuesObject { + override object values extends ValuesObject { val signupId = new IntFieldValue(self, JpClassSignup.fields.signupId) val instanceId = new IntFieldValue(self, JpClassSignup.fields.instanceId) - val signupType = new StringFieldValue(self, JpClassSignup.fields.signupType) val personId = new IntFieldValue(self, JpClassSignup.fields.personId) val signupDatetime = new DateTimeFieldValue(self, JpClassSignup.fields.signupDatetime) - val sequence = new IntFieldValue(self, JpClassSignup.fields.sequence) + val sequence = new DoubleFieldValue(self, JpClassSignup.fields.sequence) + val signupType = new StringFieldValue(self, JpClassSignup.fields.signupType) val groupId = new NullableIntFieldValue(self, JpClassSignup.fields.groupId) - val sectionid = new NullableIntFieldValue(self, JpClassSignup.fields.sectionId) + val createdOn = new DateTimeFieldValue(self, JpClassSignup.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, JpClassSignup.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpClassSignup.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, JpClassSignup.fields.updatedBy) + val isReserve = new NullableBooleanFieldValue(self, JpClassSignup.fields.isReserve) + val ccTransNum = new NullableStringFieldValue(self, JpClassSignup.fields.ccTransNum) + val closeId = new NullableIntFieldValue(self, JpClassSignup.fields.closeId) + val discountInstanceId = new NullableIntFieldValue(self, JpClassSignup.fields.discountInstanceId) + val orderId = new NullableIntFieldValue(self, JpClassSignup.fields.orderId) + val paymentMedium = new NullableStringFieldValue(self, JpClassSignup.fields.paymentMedium) + val price = new NullableDoubleFieldValue(self, JpClassSignup.fields.price) + val voidCloseId = new NullableIntFieldValue(self, JpClassSignup.fields.voidCloseId) + val signupNote = new NullableStringFieldValue(self, JpClassSignup.fields.signupNote) + val ignoreIllegalSignup = new NullableBooleanFieldValue(self, JpClassSignup.fields.ignoreIllegalSignup) + val staggerId = new NullableIntFieldValue(self, JpClassSignup.fields.staggerId) + val parentSignupNote = new NullableStringFieldValue(self, JpClassSignup.fields.parentSignupNote) + val sectionLookupId = new NullableIntFieldValue(self, JpClassSignup.fields.sectionLookupId) + val sectionId = new NullableIntFieldValue(self, JpClassSignup.fields.sectionId) } } object JpClassSignup extends StorableObject[JpClassSignup] { - val entityName: String = "JP_CLASS_SIGNUPS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_CLASS_SIGNUPS" object fields extends FieldsObject { val signupId = new IntDatabaseField(self, "SIGNUP_ID") val instanceId = new IntDatabaseField(self, "INSTANCE_ID") - @NullableInDatabase - val signupType = new StringDatabaseField(self, "SIGNUP_TYPE", 1) val personId = new IntDatabaseField(self, "PERSON_ID") @NullableInDatabase val signupDatetime = new DateTimeDatabaseField(self, "SIGNUP_DATETIME") @NullableInDatabase - val sequence = new IntDatabaseField(self, "SEQUENCE") + val sequence = new DoubleDatabaseField(self, "SEQUENCE") + @NullableInDatabase + val signupType = new StringDatabaseField(self, "SIGNUP_TYPE", 1) val groupId = new NullableIntDatabaseField(self, "GROUP_ID") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val isReserve = new NullableBooleanDatabaseField(self, "IS_RESERVE") + val ccTransNum = new NullableStringDatabaseField(self, "CC_TRANS_NUM", 10) + val closeId = new NullableIntDatabaseField(self, "CLOSE_ID") + val discountInstanceId = new NullableIntDatabaseField(self, "DISCOUNT_INSTANCE_ID") + val orderId = new NullableIntDatabaseField(self, "ORDER_ID") + val paymentMedium = new NullableStringDatabaseField(self, "PAYMENT_MEDIUM", 50) + val price = new NullableDoubleDatabaseField(self, "PRICE") + val voidCloseId = new NullableIntDatabaseField(self, "VOID_CLOSE_ID") + val signupNote = new NullableStringDatabaseField(self, "SIGNUP_NOTE", 4000) + val ignoreIllegalSignup = new NullableBooleanDatabaseField(self, "IGNORE_ILLEGAL_SIGNUP") + val staggerId = new NullableIntDatabaseField(self, "STAGGER_ID") + val parentSignupNote = new NullableStringDatabaseField(self, "PARENT_SIGNUP_NOTE", 4000) + val sectionLookupId = new NullableIntDatabaseField(self, "SECTION_LOOKUP_ID") val sectionId = new NullableIntDatabaseField(self, "SECTION_ID") } diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSignupsSkill.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSignupsSkill.scala new file mode 100644 index 00000000..fd929c64 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSignupsSkill.scala @@ -0,0 +1,54 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class JpClassSignupsSkill extends StorableClass(JpClassSignupsSkill) { + override object values extends ValuesObject { + val assignId = new IntFieldValue(self, JpClassSignupsSkill.fields.assignId) + val signupId = new IntFieldValue(self, JpClassSignupsSkill.fields.signupId) + val skillId = new IntFieldValue(self, JpClassSignupsSkill.fields.skillId) + val ratingId = new NullableIntFieldValue(self, JpClassSignupsSkill.fields.ratingId) + val changedDatetime = new DateTimeFieldValue(self, JpClassSignupsSkill.fields.changedDatetime) + val instructor = new NullableStringFieldValue(self, JpClassSignupsSkill.fields.instructor) + val comments = new NullableStringFieldValue(self, JpClassSignupsSkill.fields.comments) + val createdOn = new DateTimeFieldValue(self, JpClassSignupsSkill.fields.createdOn) + val createdBy = new StringFieldValue(self, JpClassSignupsSkill.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpClassSignupsSkill.fields.updatedOn) + val updatedBy = new StringFieldValue(self, JpClassSignupsSkill.fields.updatedBy) + } +} + +object JpClassSignupsSkill extends StorableObject[JpClassSignupsSkill] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_CLASS_SIGNUPS_SKILLS" + + object fields extends FieldsObject { + val assignId = new IntDatabaseField(self, "ASSIGN_ID") + @NullableInDatabase + val signupId = new IntDatabaseField(self, "SIGNUP_ID") + @NullableInDatabase + val skillId = new IntDatabaseField(self, "SKILL_ID") + val ratingId = new NullableIntDatabaseField(self, "RATING_ID") + @NullableInDatabase + val changedDatetime = new DateTimeDatabaseField(self, "CHANGED_DATETIME") + val instructor = new NullableStringDatabaseField(self, "INSTRUCTOR", 500) + val comments = new NullableStringDatabaseField(self, "COMMENTS", -1) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.assignId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSkill.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSkill.scala new file mode 100644 index 00000000..34355b3c --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSkill.scala @@ -0,0 +1,52 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class JpClassSkill extends StorableClass(JpClassSkill) { + override object values extends ValuesObject { + val skillId = new IntFieldValue(self, JpClassSkill.fields.skillId) + val typeId = new IntFieldValue(self, JpClassSkill.fields.typeId) + val skillName = new StringFieldValue(self, JpClassSkill.fields.skillName) + val assessment = new StringFieldValue(self, JpClassSkill.fields.assessment) + val createdOn = new DateTimeFieldValue(self, JpClassSkill.fields.createdOn) + val createdBy = new StringFieldValue(self, JpClassSkill.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpClassSkill.fields.updatedOn) + val updatedBy = new StringFieldValue(self, JpClassSkill.fields.updatedBy) + val displayOrder = new DoubleFieldValue(self, JpClassSkill.fields.displayOrder) + val active = new NullableBooleanFieldValue(self, JpClassSkill.fields.active) + } +} + +object JpClassSkill extends StorableObject[JpClassSkill] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_CLASS_SKILLS" + + object fields extends FieldsObject { + val skillId = new IntDatabaseField(self, "SKILL_ID") + @NullableInDatabase + val typeId = new IntDatabaseField(self, "TYPE_ID") + val skillName = new StringDatabaseField(self, "SKILL_NAME", 200) + @NullableInDatabase + val assessment = new StringDatabaseField(self, "ASSESSMENT", 1000) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase + val displayOrder = new DoubleDatabaseField(self, "DISPLAY_ORDER") + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + } + + def primaryKey: IntDatabaseField = fields.skillId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSkillsRating.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSkillsRating.scala new file mode 100644 index 00000000..c3271af7 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassSkillsRating.scala @@ -0,0 +1,45 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class JpClassSkillsRating extends StorableClass(JpClassSkillsRating) { + override object values extends ValuesObject { + val ratingId = new IntFieldValue(self, JpClassSkillsRating.fields.ratingId) + val skillId = new IntFieldValue(self, JpClassSkillsRating.fields.skillId) + val ratingName = new StringFieldValue(self, JpClassSkillsRating.fields.ratingName) + val ratingSeq = new DoubleFieldValue(self, JpClassSkillsRating.fields.ratingSeq) + val createdOn = new DateTimeFieldValue(self, JpClassSkillsRating.fields.createdOn) + val createdBy = new StringFieldValue(self, JpClassSkillsRating.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpClassSkillsRating.fields.updatedOn) + val updatedBy = new StringFieldValue(self, JpClassSkillsRating.fields.updatedBy) + } +} + +object JpClassSkillsRating extends StorableObject[JpClassSkillsRating] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_CLASS_SKILLS_RATINGS" + + object fields extends FieldsObject { + val ratingId = new IntDatabaseField(self, "RATING_ID") + val skillId = new IntDatabaseField(self, "SKILL_ID") + val ratingName = new StringDatabaseField(self, "RATING_NAME", 50) + val ratingSeq = new DoubleDatabaseField(self, "RATING_SEQ") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.ratingId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassStagger.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassStagger.scala index 8507ae18..3a145a2f 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassStagger.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassStagger.scala @@ -1,32 +1,51 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{DateTimeFieldValue, IntFieldValue} -import com.coleji.neptune.Storable.Fields.{DateTimeDatabaseField, IntDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class JpClassStagger extends StorableClass(JpClassStagger) { override object references extends ReferencesObject { val jpClassInstance = new Initializable[JpClassInstance] } - object values extends ValuesObject { - val sessionId = new IntFieldValue(self, JpClassStagger.fields.staggerId) + override object values extends ValuesObject { + val staggerId = new IntFieldValue(self, JpClassStagger.fields.staggerId) val instanceId = new IntFieldValue(self, JpClassStagger.fields.instanceId) val staggerDate = new DateTimeFieldValue(self, JpClassStagger.fields.staggerDate) - val occupancy = new IntFieldValue(self, JpClassStagger.fields.occupancy) + val occupancy = new DoubleFieldValue(self, JpClassStagger.fields.occupancy) + val createdOn = new DateTimeFieldValue(self, JpClassStagger.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, JpClassStagger.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpClassStagger.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, JpClassStagger.fields.updatedBy) + val reserveOnly = new NullableBooleanFieldValue(self, JpClassStagger.fields.reserveOnly) + val reserveRelease = new NullableDateTimeFieldValue(self, JpClassStagger.fields.reserveRelease) } } object JpClassStagger extends StorableObject[JpClassStagger] { + override val useRuntimeFieldnamesForJson: Boolean = true + override val entityName: String = "JP_CLASS_STAGGERS" object fields extends FieldsObject { val staggerId = new IntDatabaseField(self, "STAGGER_ID") val instanceId = new IntDatabaseField(self, "INSTANCE_ID") val staggerDate = new DateTimeDatabaseField(self, "STAGGER_DATE") - val occupancy = new IntDatabaseField(self, "OCCUPANCY") + val occupancy = new DoubleDatabaseField(self, "OCCUPANCY") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val reserveOnly = new NullableBooleanDatabaseField(self, "RESERVE_ONLY") + val reserveRelease = new NullableDateTimeDatabaseField(self, "RESERVE_RELEASE") } - override def primaryKey: IntDatabaseField = fields.staggerId -} + def primaryKey: IntDatabaseField = fields.staggerId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassType.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassType.scala index fbafb900..d0868e77 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassType.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassType.scala @@ -1,29 +1,68 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{DoubleFieldValue, IntFieldValue, NullableIntFieldValue, StringFieldValue} -import com.coleji.neptune.Storable.Fields.{DoubleDatabaseField, IntDatabaseField, NullableIntDatabaseField, StringDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class JpClassType extends StorableClass(JpClassType) { - object values extends ValuesObject { + override object values extends ValuesObject { val typeId = new IntFieldValue(self, JpClassType.fields.typeId) val typeName = new StringFieldValue(self, JpClassType.fields.typeName) - val displayOrder = new NullableIntFieldValue(self, JpClassType.fields.displayOrder) - val sessionlength = new DoubleFieldValue(self, JpClassType.fields.sessionLength) + val signupMax = new DoubleFieldValue(self, JpClassType.fields.signupMax) + val allowMultiple = new NullableBooleanFieldValue(self, JpClassType.fields.allowMultiple) + val ratingPrereq = new NullableDoubleFieldValue(self, JpClassType.fields.ratingPrereq) + val createdOn = new DateTimeFieldValue(self, JpClassType.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, JpClassType.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpClassType.fields.updatedOn) + val updatedBy = new StringFieldValue(self, JpClassType.fields.updatedBy) + val sessionLength = new DoubleFieldValue(self, JpClassType.fields.sessionLength) + val sessionCt = new DoubleFieldValue(self, JpClassType.fields.sessionCt) + val ratingOverkill = new NullableDoubleFieldValue(self, JpClassType.fields.ratingOverkill) + val minAge = new NullableDoubleFieldValue(self, JpClassType.fields.minAge) + val maxAge = new NullableDoubleFieldValue(self, JpClassType.fields.maxAge) + val minSessionsForAttended = new DoubleFieldValue(self, JpClassType.fields.minSessionsForAttended) + val active = new NullableBooleanFieldValue(self, JpClassType.fields.active) + val displayOrder = new NullableDoubleFieldValue(self, JpClassType.fields.displayOrder) + val noLimit = new NullableBooleanFieldValue(self, JpClassType.fields.noLimit) } } object JpClassType extends StorableObject[JpClassType] { - val entityName: String = "JP_CLASS_TYPES" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_CLASS_TYPES" object fields extends FieldsObject { val typeId = new IntDatabaseField(self, "TYPE_ID") @NullableInDatabase - val typeName = new StringDatabaseField(self, "TYPE_NAME", 50) - val displayOrder = new NullableIntDatabaseField(self, "DISPLAY_ORDER") + val typeName = new StringDatabaseField(self, "TYPE_NAME", 100) + @NullableInDatabase + val signupMax = new DoubleDatabaseField(self, "SIGNUP_MAX") + val allowMultiple = new NullableBooleanDatabaseField(self, "ALLOW_MULTIPLE") + val ratingPrereq = new NullableDoubleDatabaseField(self, "RATING_PREREQ") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) @NullableInDatabase val sessionLength = new DoubleDatabaseField(self, "SESSION_LENGTH") + @NullableInDatabase + val sessionCt = new DoubleDatabaseField(self, "SESSION_CT") + val ratingOverkill = new NullableDoubleDatabaseField(self, "RATING_OVERKILL") + val minAge = new NullableDoubleDatabaseField(self, "MIN_AGE") + val maxAge = new NullableDoubleDatabaseField(self, "MAX_AGE") + @NullableInDatabase + val minSessionsForAttended = new DoubleDatabaseField(self, "MIN_SESSIONS_FOR_ATTENDED") + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + val displayOrder = new NullableDoubleDatabaseField(self, "DISPLAY_ORDER") + val noLimit = new NullableBooleanDatabaseField(self, "NO_LIMIT") } def primaryKey: IntDatabaseField = fields.typeId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassTypeOverride.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassTypeOverride.scala new file mode 100644 index 00000000..a04c7a0e --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassTypeOverride.scala @@ -0,0 +1,47 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class JpClassTypeOverride extends StorableClass(JpClassTypeOverride) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, JpClassTypeOverride.fields.rowId) + val personId = new IntFieldValue(self, JpClassTypeOverride.fields.personId) + val typeId = new IntFieldValue(self, JpClassTypeOverride.fields.typeId) + val season = new NullableDoubleFieldValue(self, JpClassTypeOverride.fields.season) + val isForOverkill = new BooleanFieldValue(self, JpClassTypeOverride.fields.isForOverkill) + val createdOn = new DateTimeFieldValue(self, JpClassTypeOverride.fields.createdOn) + val createdBy = new StringFieldValue(self, JpClassTypeOverride.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpClassTypeOverride.fields.updatedOn) + val updatedBy = new StringFieldValue(self, JpClassTypeOverride.fields.updatedBy) + } +} + +object JpClassTypeOverride extends StorableObject[JpClassTypeOverride] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_CLASS_TYPE_OVERRIDES" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + val personId = new IntDatabaseField(self, "PERSON_ID") + val typeId = new IntDatabaseField(self, "TYPE_ID") + val season = new NullableDoubleDatabaseField(self, "SEASON") + val isForOverkill = new BooleanDatabaseField(self, "IS_FOR_OVERKILL", false) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassWlResult.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassWlResult.scala index c5f49494..5f25b748 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassWlResult.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClassWlResult.scala @@ -1,59 +1,48 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{DateTimeFieldValue, IntFieldValue, StringFieldValue} -import com.coleji.neptune.Storable.Fields.{DateTimeDatabaseField, IntDatabaseField, StringDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.DateUtil -import play.api.libs.json.{JsString, JsValue} - -import java.time.LocalDateTime +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class JpClassWlResult extends StorableClass(JpClassWlResult) { - object values extends ValuesObject { + override object values extends ValuesObject { val signupId = new IntFieldValue(self, JpClassWlResult.fields.signupId) + val foVmDatetime = new NullableDateTimeFieldValue(self, JpClassWlResult.fields.foVmDatetime) val wlResult = new StringFieldValue(self, JpClassWlResult.fields.wlResult) + val createdOn = new DateTimeFieldValue(self, JpClassWlResult.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, JpClassWlResult.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpClassWlResult.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, JpClassWlResult.fields.updatedBy) + val foAlertDatetime = new DateTimeFieldValue(self, JpClassWlResult.fields.foAlertDatetime) val offerExpDatetime = new DateTimeFieldValue(self, JpClassWlResult.fields.offerExpDatetime) + val permitOvercrowd = new NullableBooleanFieldValue(self, JpClassWlResult.fields.permitOvercrowd) + val preapprovedExp = new NullableDateTimeFieldValue(self, JpClassWlResult.fields.preapprovedExp) } - - def getDisplayStatus: String = { -// (case -// when wl_result = 'F' then 'No Longer Eligible' -// when wl_result = 'E' then 'Enrolled from Wait List' -// when (wl_result = 'P' and offer_exp_datetime >= util_pkg.get_sysdate) then 'Offer Pending (expires '||to_char(wlr.offer_exp_datetime,'MM/DD/YYYY HH:MIPM')||')' -// when (wl_result = 'P' and offer_exp_datetime < util_pkg.get_sysdate) then 'Offer Expired' -// when (wl_result = 'A' and preapproved_exp >= util_pkg.get_sysdate) then 'Preapproved through '||to_char(preapproved_exp,'MM/DD/YYYY') -// when (wl_result = 'A' and preapproved_exp < util_pkg.get_sysdate) then 'Preapproved (Expired)' -// else '' -// end) as wait_list_status, - val result = this.values.wlResult.get - if (result == "F") { - "No Longer Eligible" - } else if (result == "E") { - "Enrolled from Wait List" - } else if (result == "P" ) { - val offerExp = this.values.offerExpDatetime.get - if (offerExp.isBefore(LocalDateTime.now)) { - "Offer Expired" - } else { - s"Offer Pending (expires ${offerExp.format(DateUtil.DATE_TIME_FORMATTER)})" - } - } else { - result - } - } - - override def extraFieldsForJSValue: Map[String, JsValue] = Map( - "statusString" -> JsString(this.getDisplayStatus) - ) } object JpClassWlResult extends StorableObject[JpClassWlResult] { - val entityName: String = "JP_CLASS_WL_RESULTS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_CLASS_WL_RESULTS" object fields extends FieldsObject { val signupId = new IntDatabaseField(self, "SIGNUP_ID") + val foVmDatetime = new NullableDateTimeDatabaseField(self, "FO_VM_DATETIME") val wlResult = new StringDatabaseField(self, "WL_RESULT", 1) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val foAlertDatetime = new DateTimeDatabaseField(self, "FO_ALERT_DATETIME") val offerExpDatetime = new DateTimeDatabaseField(self, "OFFER_EXP_DATETIME") + val permitOvercrowd = new NullableBooleanDatabaseField(self, "PERMIT_OVERCROWD") + val preapprovedExp = new NullableDateTimeDatabaseField(self, "PREAPPROVED_EXP") } def primaryKey: IntDatabaseField = fields.signupId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClosure.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClosure.scala new file mode 100644 index 00000000..a83e20b9 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpClosure.scala @@ -0,0 +1,43 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class JpClosure extends StorableClass(JpClosure) { + override object values extends ValuesObject { + val closureId = new IntFieldValue(self, JpClosure.fields.closureId) + val drDate = new NullableDateTimeFieldValue(self, JpClosure.fields.drDate) + val closeTime = new NullableDateTimeFieldValue(self, JpClosure.fields.closeTime) + val reopenTime = new NullableDateTimeFieldValue(self, JpClosure.fields.reopenTime) + val createdOn = new DateTimeFieldValue(self, JpClosure.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, JpClosure.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpClosure.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, JpClosure.fields.updatedBy) + } +} + +object JpClosure extends StorableObject[JpClosure] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_CLOSURES" + + object fields extends FieldsObject { + val closureId = new IntDatabaseField(self, "CLOSURE_ID") + val drDate = new NullableDateTimeDatabaseField(self, "DR_DATE") + val closeTime = new NullableDateTimeDatabaseField(self, "CLOSE_TIME") + val reopenTime = new NullableDateTimeDatabaseField(self, "REOPEN_TIME") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.closureId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpEmailTracking.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpEmailTracking.scala new file mode 100644 index 00000000..6f2b1b86 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpEmailTracking.scala @@ -0,0 +1,53 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class JpEmailTracking extends StorableClass(JpEmailTracking) { + override object values extends ValuesObject { + val emailId = new IntFieldValue(self, JpEmailTracking.fields.emailId) + val signupId = new NullableIntFieldValue(self, JpEmailTracking.fields.signupId) + val emailFrom = new NullableStringFieldValue(self, JpEmailTracking.fields.emailFrom) + val emailTo = new NullableStringFieldValue(self, JpEmailTracking.fields.emailTo) + val emailSubj = new NullableStringFieldValue(self, JpEmailTracking.fields.emailSubj) + val emailPlainBody = new NullableStringFieldValue(self, JpEmailTracking.fields.emailPlainBody) + val emailHtmlBody = new NullableStringFieldValue(self, JpEmailTracking.fields.emailHtmlBody) + val sendDatetime = new NullableDateTimeFieldValue(self, JpEmailTracking.fields.sendDatetime) + val emailCc = new NullableStringFieldValue(self, JpEmailTracking.fields.emailCc) + val emailBcc = new NullableStringFieldValue(self, JpEmailTracking.fields.emailBcc) + val createdOn = new NullableDateTimeFieldValue(self, JpEmailTracking.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, JpEmailTracking.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, JpEmailTracking.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, JpEmailTracking.fields.updatedBy) + } +} + +object JpEmailTracking extends StorableObject[JpEmailTracking] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_EMAIL_TRACKING" + + object fields extends FieldsObject { + val emailId = new IntDatabaseField(self, "EMAIL_ID") + val signupId = new NullableIntDatabaseField(self, "SIGNUP_ID") + val emailFrom = new NullableStringDatabaseField(self, "EMAIL_FROM", 200) + val emailTo = new NullableStringDatabaseField(self, "EMAIL_TO", 200) + val emailSubj = new NullableStringDatabaseField(self, "EMAIL_SUBJ", 500) + val emailPlainBody = new NullableStringDatabaseField(self, "EMAIL_PLAIN_BODY", 4000) + val emailHtmlBody = new NullableStringDatabaseField(self, "EMAIL_HTML_BODY", 4000) + val sendDatetime = new NullableDateTimeDatabaseField(self, "SEND_DATETIME") + val emailCc = new NullableStringDatabaseField(self, "EMAIL_CC", 200) + val emailBcc = new NullableStringDatabaseField(self, "EMAIL_BCC", 200) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.emailId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpGroup.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpGroup.scala index 84d2ed43..5b224066 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpGroup.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpGroup.scala @@ -1,24 +1,43 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{IntFieldValue, StringFieldValue} -import com.coleji.neptune.Storable.Fields.{IntDatabaseField, StringDatabaseField} -import com.coleji.neptune.Storable.{FieldsObject, StorableClass, StorableObject, ValuesObject} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class JpGroup extends StorableClass(JpGroup) { - object values extends ValuesObject { + override object values extends ValuesObject { val groupId = new IntFieldValue(self, JpGroup.fields.groupId) val groupName = new StringFieldValue(self, JpGroup.fields.groupName) + val createdOn = new DateTimeFieldValue(self, JpGroup.fields.createdOn) + val createdBy = new StringFieldValue(self, JpGroup.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpGroup.fields.updatedOn) + val updatedBy = new StringFieldValue(self, JpGroup.fields.updatedBy) + val active = new NullableBooleanFieldValue(self, JpGroup.fields.active) } } object JpGroup extends StorableObject[JpGroup] { - val entityName: String = "JP_GROUPS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_GROUPS" object fields extends FieldsObject { val groupId = new IntDatabaseField(self, "GROUP_ID") @NullableInDatabase val groupName = new StringDatabaseField(self, "GROUP_NAME", 200) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val active = new NullableBooleanDatabaseField(self, "ACTIVE") } def primaryKey: IntDatabaseField = fields.groupId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpNoSwim.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpNoSwim.scala new file mode 100644 index 00000000..d3963a39 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpNoSwim.scala @@ -0,0 +1,40 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class JpNoSwim extends StorableClass(JpNoSwim) { + override object values extends ValuesObject { + val swimId = new IntFieldValue(self, JpNoSwim.fields.swimId) + val cardNum = new StringFieldValue(self, JpNoSwim.fields.cardNum) + val createdOn = new DateTimeFieldValue(self, JpNoSwim.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, JpNoSwim.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpNoSwim.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, JpNoSwim.fields.updatedBy) + } +} + +object JpNoSwim extends StorableObject[JpNoSwim] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_NO_SWIM" + + object fields extends FieldsObject { + val swimId = new IntDatabaseField(self, "SWIM_ID") + @NullableInDatabase + val cardNum = new StringDatabaseField(self, "CARD_NUM", 20) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.swimId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpRatingsGranted.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpRatingsGranted.scala new file mode 100644 index 00000000..e5ccb8cd --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpRatingsGranted.scala @@ -0,0 +1,43 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class JpRatingsGranted extends StorableClass(JpRatingsGranted) { + override object values extends ValuesObject { + val grantId = new IntFieldValue(self, JpRatingsGranted.fields.grantId) + val ratingId = new NullableIntFieldValue(self, JpRatingsGranted.fields.ratingId) + val quantity = new NullableDoubleFieldValue(self, JpRatingsGranted.fields.quantity) + val drDate = new NullableDateTimeFieldValue(self, JpRatingsGranted.fields.drDate) + val createdOn = new DateTimeFieldValue(self, JpRatingsGranted.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, JpRatingsGranted.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpRatingsGranted.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, JpRatingsGranted.fields.updatedBy) + } +} + +object JpRatingsGranted extends StorableObject[JpRatingsGranted] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_RATINGS_GRANTED" + + object fields extends FieldsObject { + val grantId = new IntDatabaseField(self, "GRANT_ID") + val ratingId = new NullableIntDatabaseField(self, "RATING_ID") + val quantity = new NullableDoubleDatabaseField(self, "QUANTITY") + val drDate = new NullableDateTimeDatabaseField(self, "DR_DATE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.grantId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpReplMapping.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpReplMapping.scala new file mode 100644 index 00000000..800398c2 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpReplMapping.scala @@ -0,0 +1,41 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class JpReplMapping extends StorableClass(JpReplMapping) { + override object values extends ValuesObject { + val mapId = new IntFieldValue(self, JpReplMapping.fields.mapId) + val originalNum = new NullableStringFieldValue(self, JpReplMapping.fields.originalNum) + val replNum = new NullableStringFieldValue(self, JpReplMapping.fields.replNum) + val createdOn = new DateTimeFieldValue(self, JpReplMapping.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, JpReplMapping.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpReplMapping.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, JpReplMapping.fields.updatedBy) + } +} + +object JpReplMapping extends StorableObject[JpReplMapping] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_REPL_MAPPING" + + object fields extends FieldsObject { + val mapId = new IntDatabaseField(self, "MAP_ID") + val originalNum = new NullableStringDatabaseField(self, "ORIGINAL_NUM", 15) + val replNum = new NullableStringDatabaseField(self, "REPL_NUM", 15) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.mapId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpSpecialNeed.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpSpecialNeed.scala new file mode 100644 index 00000000..8dd13478 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpSpecialNeed.scala @@ -0,0 +1,41 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class JpSpecialNeed extends StorableClass(JpSpecialNeed) { + override object values extends ValuesObject { + val cardId = new IntFieldValue(self, JpSpecialNeed.fields.cardId) + val cardNum = new NullableStringFieldValue(self, JpSpecialNeed.fields.cardNum) + val personId = new NullableIntFieldValue(self, JpSpecialNeed.fields.personId) + val createdOn = new DateTimeFieldValue(self, JpSpecialNeed.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, JpSpecialNeed.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpSpecialNeed.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, JpSpecialNeed.fields.updatedBy) + } +} + +object JpSpecialNeed extends StorableObject[JpSpecialNeed] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_SPECIAL_NEEDS" + + object fields extends FieldsObject { + val cardId = new IntDatabaseField(self, "CARD_ID") + val cardNum = new NullableStringDatabaseField(self, "CARD_NUM", 50) + val personId = new NullableIntDatabaseField(self, "PERSON_ID") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.cardId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpSpringWaitlist.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpSpringWaitlist.scala new file mode 100644 index 00000000..e6083dc8 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpSpringWaitlist.scala @@ -0,0 +1,45 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class JpSpringWaitlist extends StorableClass(JpSpringWaitlist) { + override object values extends ValuesObject { + val regId = new IntFieldValue(self, JpSpringWaitlist.fields.regId) + val membershipTypeId = new NullableIntFieldValue(self, JpSpringWaitlist.fields.membershipTypeId) + val personId = new NullableIntFieldValue(self, JpSpringWaitlist.fields.personId) + val createdOn = new DateTimeFieldValue(self, JpSpringWaitlist.fields.createdOn) + val createdBy = new StringFieldValue(self, JpSpringWaitlist.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpSpringWaitlist.fields.updatedOn) + val updatedBy = new StringFieldValue(self, JpSpringWaitlist.fields.updatedBy) + val waitBegin = new NullableDateTimeFieldValue(self, JpSpringWaitlist.fields.waitBegin) + } +} + +object JpSpringWaitlist extends StorableObject[JpSpringWaitlist] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_SPRING_WAITLIST" + + object fields extends FieldsObject { + val regId = new IntDatabaseField(self, "REG_ID") + val membershipTypeId = new NullableIntDatabaseField(self, "MEMBERSHIP_TYPE_ID") + val personId = new NullableIntDatabaseField(self, "PERSON_ID") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val waitBegin = new NullableDateTimeDatabaseField(self, "WAIT_BEGIN") + } + + def primaryKey: IntDatabaseField = fields.regId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpTeam.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpTeam.scala index 356c96b8..2518ce5e 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpTeam.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpTeam.scala @@ -1,24 +1,42 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{IntFieldValue, StringFieldValue} -import com.coleji.neptune.Storable.Fields.{IntDatabaseField, StringDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class JpTeam extends StorableClass(JpTeam) { - object values extends ValuesObject { + override object values extends ValuesObject { val teamId = new IntFieldValue(self, JpTeam.fields.teamId) val teamName = new StringFieldValue(self, JpTeam.fields.teamName) + val createdOn = new NullableDateTimeFieldValue(self, JpTeam.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, JpTeam.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, JpTeam.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, JpTeam.fields.updatedBy) + val active = new NullableBooleanFieldValue(self, JpTeam.fields.active) + val imageFilename = new StringFieldValue(self, JpTeam.fields.imageFilename) } } object JpTeam extends StorableObject[JpTeam] { - val entityName: String = "JP_TEAMS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_TEAMS" object fields extends FieldsObject { val teamId = new IntDatabaseField(self, "TEAM_ID") @NullableInDatabase val teamName = new StringDatabaseField(self, "TEAM_NAME", 100) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + @NullableInDatabase + val imageFilename = new StringDatabaseField(self, "IMAGE_FILENAME", 50) } def primaryKey: IntDatabaseField = fields.teamId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpTeamEvent.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpTeamEvent.scala new file mode 100644 index 00000000..9a70aae4 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpTeamEvent.scala @@ -0,0 +1,42 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class JpTeamEvent extends StorableClass(JpTeamEvent) { + override object values extends ValuesObject { + val eventId = new IntFieldValue(self, JpTeamEvent.fields.eventId) + val memo = new NullableStringFieldValue(self, JpTeamEvent.fields.memo) + val awardedBy = new NullableStringFieldValue(self, JpTeamEvent.fields.awardedBy) + val createdOn = new NullableDateTimeFieldValue(self, JpTeamEvent.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, JpTeamEvent.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, JpTeamEvent.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, JpTeamEvent.fields.updatedBy) + val awardedDate = new DateTimeFieldValue(self, JpTeamEvent.fields.awardedDate) + } +} + +object JpTeamEvent extends StorableObject[JpTeamEvent] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_TEAM_EVENTS" + + object fields extends FieldsObject { + val eventId = new IntDatabaseField(self, "EVENT_ID") + val memo = new NullableStringDatabaseField(self, "MEMO", 4000) + val awardedBy = new NullableStringDatabaseField(self, "AWARDED_BY", 100) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase + val awardedDate = new DateTimeDatabaseField(self, "AWARDED_DATE") + } + + def primaryKey: IntDatabaseField = fields.eventId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpTeamEventPoints.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpTeamEventPoints.scala index 74eb7206..729ebe9b 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpTeamEventPoints.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpTeamEventPoints.scala @@ -1,32 +1,39 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.IntFieldValue -import com.coleji.neptune.Storable.Fields.IntDatabaseField +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable +import com.coleji.neptune.Util._ import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class JpTeamEventPoints extends StorableClass(JpTeamEventPoints) { override object references extends ReferencesObject { val jpTeam = new Initializable[JpTeam] } - object values extends ValuesObject { + override object values extends ValuesObject { val rowId = new IntFieldValue(self, JpTeamEventPoints.fields.rowId) + val eventId = new IntFieldValue(self, JpTeamEventPoints.fields.eventId) val teamId = new IntFieldValue(self, JpTeamEventPoints.fields.teamId) - val points = new IntFieldValue(self, JpTeamEventPoints.fields.points) + val points = new DoubleFieldValue(self, JpTeamEventPoints.fields.points) } } object JpTeamEventPoints extends StorableObject[JpTeamEventPoints] { - val entityName: String = "JP_TEAM_EVENT_POINTS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_TEAM_EVENT_POINTS" object fields extends FieldsObject { val rowId = new IntDatabaseField(self, "ROW_ID") @NullableInDatabase + val eventId = new IntDatabaseField(self, "EVENT_ID") + @NullableInDatabase val teamId = new IntDatabaseField(self, "TEAM_ID") @NullableInDatabase - val points = new IntDatabaseField(self, "POINTS") + val points = new DoubleDatabaseField(self, "POINTS") } def primaryKey: IntDatabaseField = fields.rowId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpWeather.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpWeather.scala new file mode 100644 index 00000000..5fa4b0a8 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpWeather.scala @@ -0,0 +1,55 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class JpWeather extends StorableClass(JpWeather) { + override object values extends ValuesObject { + val weatherId = new IntFieldValue(self, JpWeather.fields.weatherId) + val drDate = new NullableDateTimeFieldValue(self, JpWeather.fields.drDate) + val weatherTime = new NullableStringFieldValue(self, JpWeather.fields.weatherTime) + val conditions = new NullableStringFieldValue(self, JpWeather.fields.conditions) + val temp = new NullableDoubleFieldValue(self, JpWeather.fields.temp) + val windDir = new NullableStringFieldValue(self, JpWeather.fields.windDir) + val windSteady = new NullableDoubleFieldValue(self, JpWeather.fields.windSteady) + val windGust = new NullableDoubleFieldValue(self, JpWeather.fields.windGust) + val flag = new NullableStringFieldValue(self, JpWeather.fields.flag) + val restrictions = new NullableStringFieldValue(self, JpWeather.fields.restrictions) + val createdOn = new DateTimeFieldValue(self, JpWeather.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, JpWeather.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpWeather.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, JpWeather.fields.updatedBy) + } +} + +object JpWeather extends StorableObject[JpWeather] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JP_WEATHER" + + object fields extends FieldsObject { + val weatherId = new IntDatabaseField(self, "WEATHER_ID") + val drDate = new NullableDateTimeDatabaseField(self, "DR_DATE") + val weatherTime = new NullableStringDatabaseField(self, "WEATHER_TIME", 20) + val conditions = new NullableStringDatabaseField(self, "CONDITIONS", 100) + val temp = new NullableDoubleDatabaseField(self, "TEMP") + val windDir = new NullableStringDatabaseField(self, "WIND_DIR", 5) + val windSteady = new NullableDoubleDatabaseField(self, "WIND_STEADY") + val windGust = new NullableDoubleDatabaseField(self, "WIND_GUST") + val flag = new NullableStringDatabaseField(self, "FLAG", 20) + val restrictions = new NullableStringDatabaseField(self, "RESTRICTIONS", 4000) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.weatherId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpcInstancesDiscount.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpcInstancesDiscount.scala new file mode 100644 index 00000000..07065e5f --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/JpcInstancesDiscount.scala @@ -0,0 +1,45 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class JpcInstancesDiscount extends StorableClass(JpcInstancesDiscount) { + override object values extends ValuesObject { + val assignId = new IntFieldValue(self, JpcInstancesDiscount.fields.assignId) + val classInstanceId = new NullableIntFieldValue(self, JpcInstancesDiscount.fields.classInstanceId) + val discountInstanceId = new NullableIntFieldValue(self, JpcInstancesDiscount.fields.discountInstanceId) + val discountAmt = new NullableDoubleFieldValue(self, JpcInstancesDiscount.fields.discountAmt) + val createdOn = new NullableDateTimeFieldValue(self, JpcInstancesDiscount.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, JpcInstancesDiscount.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, JpcInstancesDiscount.fields.updatedOn) + val updatedBy = new StringFieldValue(self, JpcInstancesDiscount.fields.updatedBy) + val regCodeRowId = new NullableIntFieldValue(self, JpcInstancesDiscount.fields.regCodeRowId) + } +} + +object JpcInstancesDiscount extends StorableObject[JpcInstancesDiscount] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "JPC_INSTANCES_DISCOUNTS" + + object fields extends FieldsObject { + val assignId = new IntDatabaseField(self, "ASSIGN_ID") + val classInstanceId = new NullableIntDatabaseField(self, "CLASS_INSTANCE_ID") + val discountInstanceId = new NullableIntDatabaseField(self, "DISCOUNT_INSTANCE_ID") + val discountAmt = new NullableDoubleDatabaseField(self, "DISCOUNT_AMT") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val regCodeRowId = new NullableIntDatabaseField(self, "REG_CODE_ROW_ID") + } + + def primaryKey: IntDatabaseField = fields.assignId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Language.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Language.scala new file mode 100644 index 00000000..c2a02b46 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Language.scala @@ -0,0 +1,30 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class Language extends StorableClass(Language) { + override object values extends ValuesObject { + val languageId = new IntFieldValue(self, Language.fields.languageId) + val languageName = new StringFieldValue(self, Language.fields.languageName) + } +} + +object Language extends StorableObject[Language] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "LANGUAGES" + + object fields extends FieldsObject { + val languageId = new IntDatabaseField(self, "LANGUAGE_ID") + @NullableInDatabase + val languageName = new StringDatabaseField(self, "LANGUAGE_NAME", 100) + } + + def primaryKey: IntDatabaseField = fields.languageId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MemTypesAllowedRating.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MemTypesAllowedRating.scala new file mode 100644 index 00000000..4c974069 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MemTypesAllowedRating.scala @@ -0,0 +1,33 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class MemTypesAllowedRating extends StorableClass(MemTypesAllowedRating) { + override object values extends ValuesObject { + val assignId = new IntFieldValue(self, MemTypesAllowedRating.fields.assignId) + val membershipTypeId = new IntFieldValue(self, MemTypesAllowedRating.fields.membershipTypeId) + val ratingId = new IntFieldValue(self, MemTypesAllowedRating.fields.ratingId) + } +} + +object MemTypesAllowedRating extends StorableObject[MemTypesAllowedRating] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "MEM_TYPES_ALLOWED_RATINGS" + + object fields extends FieldsObject { + val assignId = new IntDatabaseField(self, "ASSIGN_ID") + @NullableInDatabase + val membershipTypeId = new IntDatabaseField(self, "MEMBERSHIP_TYPE_ID") + @NullableInDatabase + val ratingId = new IntDatabaseField(self, "RATING_ID") + } + + def primaryKey: IntDatabaseField = fields.assignId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MemTypesApClassType.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MemTypesApClassType.scala new file mode 100644 index 00000000..31125731 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MemTypesApClassType.scala @@ -0,0 +1,29 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class MemTypesApClassType extends StorableClass(MemTypesApClassType) { + override object values extends ValuesObject { + val membershipTypeId = new IntFieldValue(self, MemTypesApClassType.fields.membershipTypeId) + val apClassTypeId = new IntFieldValue(self, MemTypesApClassType.fields.apClassTypeId) + } +} + +object MemTypesApClassType extends StorableObject[MemTypesApClassType] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "MEM_TYPES_AP_CLASS_TYPES" + + object fields extends FieldsObject { + val membershipTypeId = new IntDatabaseField(self, "MEMBERSHIP_TYPE_ID") + val apClassTypeId = new IntDatabaseField(self, "AP_CLASS_TYPE_ID") + } + + def primaryKey: IntDatabaseField = fields.membershipTypeId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MembershipPrice.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MembershipPrice.scala new file mode 100644 index 00000000..4b41bcee --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MembershipPrice.scala @@ -0,0 +1,45 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class MembershipPrice extends StorableClass(MembershipPrice) { + override object values extends ValuesObject { + val instanceId = new IntFieldValue(self, MembershipPrice.fields.instanceId) + val membershipTypeId = new IntFieldValue(self, MembershipPrice.fields.membershipTypeId) + val price = new DoubleFieldValue(self, MembershipPrice.fields.price) + val startActive = new NullableDateTimeFieldValue(self, MembershipPrice.fields.startActive) + val endActive = new NullableDateTimeFieldValue(self, MembershipPrice.fields.endActive) + val createdOn = new NullableDateTimeFieldValue(self, MembershipPrice.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, MembershipPrice.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, MembershipPrice.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, MembershipPrice.fields.updatedBy) + } +} + +object MembershipPrice extends StorableObject[MembershipPrice] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "MEMBERSHIP_PRICES" + + object fields extends FieldsObject { + val instanceId = new IntDatabaseField(self, "INSTANCE_ID") + @NullableInDatabase + val membershipTypeId = new IntDatabaseField(self, "MEMBERSHIP_TYPE_ID") + @NullableInDatabase + val price = new DoubleDatabaseField(self, "PRICE") + val startActive = new NullableDateTimeDatabaseField(self, "START_ACTIVE") + val endActive = new NullableDateTimeDatabaseField(self, "END_ACTIVE") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.instanceId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MembershipType.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MembershipType.scala index d728f747..1f0e3183 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MembershipType.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MembershipType.scala @@ -1,40 +1,83 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{BooleanFieldValue, IntFieldValue, NullableDoubleFieldValue, StringFieldValue} -import com.coleji.neptune.Storable.Fields.{BooleanDatabaseField, IntDatabaseField, NullableDoubleDatabaseField, StringDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.InitializableFromCollectionElement +import com.coleji.neptune.Util._ import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class MembershipType extends StorableClass(MembershipType) { override object references extends ReferencesObject { - val program = new InitializableFromCollectionElement[ProgramType](_.values.programId.get == values.programId.get) + val program = new Initializable[ProgramType] } - object values extends ValuesObject { + override object values extends ValuesObject { val membershipTypeId = new IntFieldValue(self, MembershipType.fields.membershipTypeId) - val membershipTypeName = new StringFieldValue(self, MembershipType.fields.membershipTypeName) val programId = new IntFieldValue(self, MembershipType.fields.programId) + val membershipTypeName = new StringFieldValue(self, MembershipType.fields.membershipTypeName) + val displayOrder = new DoubleFieldValue(self, MembershipType.fields.displayOrder) + val active = new NullableBooleanFieldValue(self, MembershipType.fields.active) + val createdOn = new DateTimeFieldValue(self, MembershipType.fields.createdOn) + val createdBy = new StringFieldValue(self, MembershipType.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, MembershipType.fields.updatedOn) + val updatedBy = new StringFieldValue(self, MembershipType.fields.updatedBy) + val duration = new NullableDoubleFieldValue(self, MembershipType.fields.duration) + val expirationType = new StringFieldValue(self, MembershipType.fields.expirationType) val price = new NullableDoubleFieldValue(self, MembershipType.fields.price) - val active = new BooleanFieldValue(self, MembershipType.fields.active) - val displayOrder = new IntFieldValue(self, MembershipType.fields.displayOrder) + val oldDiscountType = new NullableDoubleFieldValue(self, MembershipType.fields.oldDiscountType) + val regCodeRowId = new NullableIntFieldValue(self, MembershipType.fields.regCodeRowId) + val alertOnClose = new NullableBooleanFieldValue(self, MembershipType.fields.alertOnClose) + val gcEligible = new NullableBooleanFieldValue(self, MembershipType.fields.gcEligible) + val membershipTypeDisplayName = new NullableStringFieldValue(self, MembershipType.fields.membershipTypeDisplayName) + val availableOnline = new NullableBooleanFieldValue(self, MembershipType.fields.availableOnline) + val canHaveGuestPrivs = new NullableBooleanFieldValue(self, MembershipType.fields.canHaveGuestPrivs) + val gcRegCodeRowId = new NullableIntFieldValue(self, MembershipType.fields.gcRegCodeRowId) + val ratingsRestricted = new NullableBooleanFieldValue(self, MembershipType.fields.ratingsRestricted) + val taxable = new NullableBooleanFieldValue(self, MembershipType.fields.taxable) + val programPriority = new NullableDoubleFieldValue(self, MembershipType.fields.programPriority) + val renewalEligible = new NullableBooleanFieldValue(self, MembershipType.fields.renewalEligible) } } object MembershipType extends StorableObject[MembershipType] { override val useRuntimeFieldnamesForJson: Boolean = true - val entityName: String = "MEMBERSHIP_TYPES" + override val entityName: String = "MEMBERSHIP_TYPES" object fields extends FieldsObject { val membershipTypeId = new IntDatabaseField(self, "MEMBERSHIP_TYPE_ID") @NullableInDatabase - val membershipTypeName = new StringDatabaseField(self, "MEMBERSHIP_TYPE_NAME", 100) - @NullableInDatabase val programId = new IntDatabaseField(self, "PROGRAM_ID") + @NullableInDatabase + val membershipTypeName = new StringDatabaseField(self, "MEMBERSHIP_TYPE_NAME", 200) + val displayOrder = new DoubleDatabaseField(self, "DISPLAY_ORDER") + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val duration = new NullableDoubleDatabaseField(self, "DURATION") + @NullableInDatabase + val expirationType = new StringDatabaseField(self, "EXPIRATION_TYPE", 50) val price = new NullableDoubleDatabaseField(self, "PRICE") - val active = new BooleanDatabaseField(self, "ACTIVE", true) - val displayOrder = new IntDatabaseField(self, "DISPLAY_ORDER") + val oldDiscountType = new NullableDoubleDatabaseField(self, "OLD_DISCOUNT_TYPE") + val regCodeRowId = new NullableIntDatabaseField(self, "REG_CODE_ROW_ID") + val alertOnClose = new NullableBooleanDatabaseField(self, "ALERT_ON_CLOSE") + val gcEligible = new NullableBooleanDatabaseField(self, "GC_ELIGIBLE") + val membershipTypeDisplayName = new NullableStringDatabaseField(self, "MEMBERSHIP_TYPE_DISPLAY_NAME", 100) + val availableOnline = new NullableBooleanDatabaseField(self, "AVAILABLE_ONLINE") + val canHaveGuestPrivs = new NullableBooleanDatabaseField(self, "CAN_HAVE_GUEST_PRIVS") + val gcRegCodeRowId = new NullableIntDatabaseField(self, "GC_REG_CODE_ROW_ID") + val ratingsRestricted = new NullableBooleanDatabaseField(self, "RATINGS_RESTRICTED") + val taxable = new NullableBooleanDatabaseField(self, "TAXABLE") + val programPriority = new NullableDoubleDatabaseField(self, "PROGRAM_PRIORITY") + val renewalEligible = new NullableBooleanDatabaseField(self, "RENEWAL_ELIGIBLE") } def primaryKey: IntDatabaseField = fields.membershipTypeId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MembershipTypeDiscount.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MembershipTypeDiscount.scala new file mode 100644 index 00000000..5f67a4db --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MembershipTypeDiscount.scala @@ -0,0 +1,48 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class MembershipTypeDiscount extends StorableClass(MembershipTypeDiscount) { + override object values extends ValuesObject { + val discountId = new IntFieldValue(self, MembershipTypeDiscount.fields.discountId) + val membershipTypeId = new NullableIntFieldValue(self, MembershipTypeDiscount.fields.membershipTypeId) + val discountAmt = new NullableDoubleFieldValue(self, MembershipTypeDiscount.fields.discountAmt) + val description = new StringFieldValue(self, MembershipTypeDiscount.fields.description) + val createdOn = new DateTimeFieldValue(self, MembershipTypeDiscount.fields.createdOn) + val createdBy = new StringFieldValue(self, MembershipTypeDiscount.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, MembershipTypeDiscount.fields.updatedOn) + val updatedBy = new StringFieldValue(self, MembershipTypeDiscount.fields.updatedBy) + val regCodeRowId = new NullableIntFieldValue(self, MembershipTypeDiscount.fields.regCodeRowId) + } +} + +object MembershipTypeDiscount extends StorableObject[MembershipTypeDiscount] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "MEMBERSHIP_TYPE_DISCOUNTS" + + object fields extends FieldsObject { + val discountId = new IntDatabaseField(self, "DISCOUNT_ID") + val membershipTypeId = new NullableIntDatabaseField(self, "MEMBERSHIP_TYPE_ID") + val discountAmt = new NullableDoubleDatabaseField(self, "DISCOUNT_AMT") + @NullableInDatabase + val description = new StringDatabaseField(self, "DESCRIPTION", 100) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val regCodeRowId = new NullableIntDatabaseField(self, "REG_CODE_ROW_ID") + } + + def primaryKey: IntDatabaseField = fields.discountId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MembershipTypeExp.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MembershipTypeExp.scala index 79a5a777..b962a4cc 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MembershipTypeExp.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MembershipTypeExp.scala @@ -1,35 +1,51 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{DateFieldValue, IntFieldValue} -import com.coleji.neptune.Storable.Fields.{DateDatabaseField, IntDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.InitializableFromCollectionElement +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class MembershipTypeExp extends StorableClass(MembershipTypeExp) { override object references extends ReferencesObject { - val membershipType = new InitializableFromCollectionElement[MembershipType](_.values.membershipTypeId.get == values.membershipTypeId.get) + val membershipType = new Initializable[MembershipType] } - object values extends ValuesObject { + override object values extends ValuesObject { val expirationId = new IntFieldValue(self, MembershipTypeExp.fields.expirationId) val membershipTypeId = new IntFieldValue(self, MembershipTypeExp.fields.membershipTypeId) val season = new IntFieldValue(self, MembershipTypeExp.fields.season) - val startDate = new DateFieldValue(self, MembershipTypeExp.fields.startDate) - val expirationDate = new DateFieldValue(self, MembershipTypeExp.fields.expirationDate) + val expirationDate = new DateTimeFieldValue(self, MembershipTypeExp.fields.expirationDate) + val createdOn = new DateTimeFieldValue(self, MembershipTypeExp.fields.createdOn) + val createdBy = new StringFieldValue(self, MembershipTypeExp.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, MembershipTypeExp.fields.updatedOn) + val updatedBy = new StringFieldValue(self, MembershipTypeExp.fields.updatedBy) + val startDate = new DateTimeFieldValue(self, MembershipTypeExp.fields.startDate) } } object MembershipTypeExp extends StorableObject[MembershipTypeExp] { - val entityName: String = "MEMBERSHIP_TYPE_EXP" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "MEMBERSHIP_TYPE_EXP" object fields extends FieldsObject { val expirationId = new IntDatabaseField(self, "EXPIRATION_ID") val membershipTypeId = new IntDatabaseField(self, "MEMBERSHIP_TYPE_ID") val season = new IntDatabaseField(self, "SEASON") - val startDate = new DateDatabaseField(self, "START_DATE") - val expirationDate = new DateDatabaseField(self, "EXPIRATION_DATE") + val expirationDate = new DateTimeDatabaseField(self, "EXPIRATION_DATE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val startDate = new DateTimeDatabaseField(self, "START_DATE") } def primaryKey: IntDatabaseField = fields.expirationId - } \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MembershipsDiscount.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MembershipsDiscount.scala new file mode 100644 index 00000000..cfa57086 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MembershipsDiscount.scala @@ -0,0 +1,54 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class MembershipsDiscount extends StorableClass(MembershipsDiscount) { + override object values extends ValuesObject { + val assignId = new IntFieldValue(self, MembershipsDiscount.fields.assignId) + val typeId = new IntFieldValue(self, MembershipsDiscount.fields.typeId) + val instanceId = new IntFieldValue(self, MembershipsDiscount.fields.instanceId) + val discountAmt = new NullableDoubleFieldValue(self, MembershipsDiscount.fields.discountAmt) + val createdOn = new NullableDateTimeFieldValue(self, MembershipsDiscount.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, MembershipsDiscount.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, MembershipsDiscount.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, MembershipsDiscount.fields.updatedBy) + val regCodeRowId = new NullableIntFieldValue(self, MembershipsDiscount.fields.regCodeRowId) + val arSourceId = new NullableIntFieldValue(self, MembershipsDiscount.fields.arSourceId) + val arAmount = new NullableDoubleFieldValue(self, MembershipsDiscount.fields.arAmount) + val autoGrant = new NullableBooleanFieldValue(self, MembershipsDiscount.fields.autoGrant) + val freeGp = new NullableBooleanFieldValue(self, MembershipsDiscount.fields.freeGp) + val freeDw = new NullableBooleanFieldValue(self, MembershipsDiscount.fields.freeDw) + } +} + +object MembershipsDiscount extends StorableObject[MembershipsDiscount] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "MEMBERSHIPS_DISCOUNTS" + + object fields extends FieldsObject { + val assignId = new IntDatabaseField(self, "ASSIGN_ID") + val typeId = new IntDatabaseField(self, "TYPE_ID") + @NullableInDatabase + val instanceId = new IntDatabaseField(self, "INSTANCE_ID") + val discountAmt = new NullableDoubleDatabaseField(self, "DISCOUNT_AMT") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val regCodeRowId = new NullableIntDatabaseField(self, "REG_CODE_ROW_ID") + val arSourceId = new NullableIntDatabaseField(self, "AR_SOURCE_ID") + val arAmount = new NullableDoubleDatabaseField(self, "AR_AMOUNT") + val autoGrant = new NullableBooleanDatabaseField(self, "AUTO_GRANT") + val freeGp = new NullableBooleanDatabaseField(self, "FREE_GP") + val freeDw = new NullableBooleanDatabaseField(self, "FREE_DW") + } + + def primaryKey: IntDatabaseField = fields.assignId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MergeHistory.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MergeHistory.scala new file mode 100644 index 00000000..b4ec6226 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/MergeHistory.scala @@ -0,0 +1,51 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class MergeHistory extends StorableClass(MergeHistory) { + override object values extends ValuesObject { + val actionId = new IntFieldValue(self, MergeHistory.fields.actionId) + val oldId = new IntFieldValue(self, MergeHistory.fields.oldId) + val newId = new IntFieldValue(self, MergeHistory.fields.newId) + val tableName = new StringFieldValue(self, MergeHistory.fields.tableName) + val columnName = new StringFieldValue(self, MergeHistory.fields.columnName) + val createdOn = new DateTimeFieldValue(self, MergeHistory.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, MergeHistory.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, MergeHistory.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, MergeHistory.fields.updatedBy) + val tablePk = new NullableDoubleFieldValue(self, MergeHistory.fields.tablePk) + } +} + +object MergeHistory extends StorableObject[MergeHistory] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "MERGE_HISTORY" + + object fields extends FieldsObject { + val actionId = new IntDatabaseField(self, "ACTION_ID") + @NullableInDatabase + val oldId = new IntDatabaseField(self, "OLD_ID") + @NullableInDatabase + val newId = new IntDatabaseField(self, "NEW_ID") + @NullableInDatabase + val tableName = new StringDatabaseField(self, "TABLE_NAME", 500) + @NullableInDatabase + val columnName = new StringDatabaseField(self, "COLUMN_NAME", 500) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val tablePk = new NullableDoubleDatabaseField(self, "TABLE_PK") + } + + def primaryKey: IntDatabaseField = fields.actionId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OptOutGroup.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OptOutGroup.scala new file mode 100644 index 00000000..9e9efd0d --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OptOutGroup.scala @@ -0,0 +1,42 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class OptOutGroup extends StorableClass(OptOutGroup) { + override object values extends ValuesObject { + val optOutGrpId = new IntFieldValue(self, OptOutGroup.fields.optOutGrpId) + val groupName = new StringFieldValue(self, OptOutGroup.fields.groupName) + val createdOn = new DateTimeFieldValue(self, OptOutGroup.fields.createdOn) + val createdBy = new StringFieldValue(self, OptOutGroup.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, OptOutGroup.fields.updatedOn) + val updatedBy = new StringFieldValue(self, OptOutGroup.fields.updatedBy) + } +} + +object OptOutGroup extends StorableObject[OptOutGroup] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "OPT_OUT_GROUPS" + + object fields extends FieldsObject { + val optOutGrpId = new IntDatabaseField(self, "OPT_OUT_GRP_ID") + @NullableInDatabase + val groupName = new StringDatabaseField(self, "GROUP_NAME", 100) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.optOutGrpId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OptOutRequest.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OptOutRequest.scala new file mode 100644 index 00000000..10b7fa00 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OptOutRequest.scala @@ -0,0 +1,48 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class OptOutRequest extends StorableClass(OptOutRequest) { + override object values extends ValuesObject { + val reqId = new IntFieldValue(self, OptOutRequest.fields.reqId) + val email = new StringFieldValue(self, OptOutRequest.fields.email) + val optOutGrpId = new IntFieldValue(self, OptOutRequest.fields.optOutGrpId) + val doNotSend = new NullableBooleanFieldValue(self, OptOutRequest.fields.doNotSend) + val token = new StringFieldValue(self, OptOutRequest.fields.token) + val createdOn = new DateTimeFieldValue(self, OptOutRequest.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, OptOutRequest.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, OptOutRequest.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, OptOutRequest.fields.updatedBy) + } +} + +object OptOutRequest extends StorableObject[OptOutRequest] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "OPT_OUT_REQUESTS" + + object fields extends FieldsObject { + val reqId = new IntDatabaseField(self, "REQ_ID") + @NullableInDatabase + val email = new StringDatabaseField(self, "EMAIL", 500) + @NullableInDatabase + val optOutGrpId = new IntDatabaseField(self, "OPT_OUT_GRP_ID") + val doNotSend = new NullableBooleanDatabaseField(self, "DO_NOT_SEND") + @NullableInDatabase + val token = new StringDatabaseField(self, "TOKEN", 50) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.reqId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OrderNumber.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OrderNumber.scala new file mode 100644 index 00000000..79ae11f5 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OrderNumber.scala @@ -0,0 +1,54 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class OrderNumber extends StorableClass(OrderNumber) { + override object values extends ValuesObject { + val orderId = new IntFieldValue(self, OrderNumber.fields.orderId) + val personId = new IntFieldValue(self, OrderNumber.fields.personId) + val orderNum = new StringFieldValue(self, OrderNumber.fields.orderNum) + val approvedTransId = new NullableIntFieldValue(self, OrderNumber.fields.approvedTransId) + val createdOn = new DateTimeFieldValue(self, OrderNumber.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, OrderNumber.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, OrderNumber.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, OrderNumber.fields.updatedBy) + val processedDate = new NullableDateTimeFieldValue(self, OrderNumber.fields.processedDate) + val approvedStripeChargeAtt = new NullableDoubleFieldValue(self, OrderNumber.fields.approvedStripeChargeAtt) + val addlStaggeredPayments = new NullableDoubleFieldValue(self, OrderNumber.fields.addlStaggeredPayments) + val appAlias = new StringFieldValue(self, OrderNumber.fields.appAlias) + val usePaymentIntent = new NullableBooleanFieldValue(self, OrderNumber.fields.usePaymentIntent) + } +} + +object OrderNumber extends StorableObject[OrderNumber] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "ORDER_NUMBERS" + + object fields extends FieldsObject { + val orderId = new IntDatabaseField(self, "ORDER_ID") + val personId = new IntDatabaseField(self, "PERSON_ID") + val orderNum = new StringDatabaseField(self, "ORDER_NUM", 25) + val approvedTransId = new NullableIntDatabaseField(self, "APPROVED_TRANS_ID") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val processedDate = new NullableDateTimeDatabaseField(self, "PROCESSED_DATE") + val approvedStripeChargeAtt = new NullableDoubleDatabaseField(self, "APPROVED_STRIPE_CHARGE_ATT") + val addlStaggeredPayments = new NullableDoubleDatabaseField(self, "ADDL_STAGGERED_PAYMENTS") + @NullableInDatabase + val appAlias = new StringDatabaseField(self, "APP_ALIAS", 20) + val usePaymentIntent = new NullableBooleanDatabaseField(self, "USE_PAYMENT_INTENT") + } + + def primaryKey: IntDatabaseField = fields.orderId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OrderStaggeredPayment.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OrderStaggeredPayment.scala new file mode 100644 index 00000000..d08472e4 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OrderStaggeredPayment.scala @@ -0,0 +1,51 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class OrderStaggeredPayment extends StorableClass(OrderStaggeredPayment) { + override object values extends ValuesObject { + val staggerId = new IntFieldValue(self, OrderStaggeredPayment.fields.staggerId) + val orderId = new IntFieldValue(self, OrderStaggeredPayment.fields.orderId) + val seq = new DoubleFieldValue(self, OrderStaggeredPayment.fields.seq) + val expectedPaymentDate = new DateTimeFieldValue(self, OrderStaggeredPayment.fields.expectedPaymentDate) + val paid = new BooleanFieldValue(self, OrderStaggeredPayment.fields.paid) + val approvedStripeChargeAtt = new NullableDoubleFieldValue(self, OrderStaggeredPayment.fields.approvedStripeChargeAtt) + val paidCloseId = new NullableIntFieldValue(self, OrderStaggeredPayment.fields.paidCloseId) + val redeemedCloseId = new NullableIntFieldValue(self, OrderStaggeredPayment.fields.redeemedCloseId) + val rawAmountInCents = new DoubleFieldValue(self, OrderStaggeredPayment.fields.rawAmountInCents) + val addlAmountInCents = new DoubleFieldValue(self, OrderStaggeredPayment.fields.addlAmountInCents) + val paymentIntentRowId = new NullableIntFieldValue(self, OrderStaggeredPayment.fields.paymentIntentRowId) + val failedCron = new NullableBooleanFieldValue(self, OrderStaggeredPayment.fields.failedCron) + } +} + +object OrderStaggeredPayment extends StorableObject[OrderStaggeredPayment] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "ORDER_STAGGERED_PAYMENTS" + + object fields extends FieldsObject { + val staggerId = new IntDatabaseField(self, "STAGGER_ID") + val orderId = new IntDatabaseField(self, "ORDER_ID") + val seq = new DoubleDatabaseField(self, "SEQ") + val expectedPaymentDate = new DateTimeDatabaseField(self, "EXPECTED_PAYMENT_DATE") + val paid = new BooleanDatabaseField(self, "PAID", false) + val approvedStripeChargeAtt = new NullableDoubleDatabaseField(self, "APPROVED_STRIPE_CHARGE_ATT") + val paidCloseId = new NullableIntDatabaseField(self, "PAID_CLOSE_ID") + val redeemedCloseId = new NullableIntDatabaseField(self, "REDEEMED_CLOSE_ID") + @NullableInDatabase + val rawAmountInCents = new DoubleDatabaseField(self, "RAW_AMOUNT_IN_CENTS") + @NullableInDatabase + val addlAmountInCents = new DoubleDatabaseField(self, "ADDL_AMOUNT_IN_CENTS") + val paymentIntentRowId = new NullableIntDatabaseField(self, "PAYMENT_INTENT_ROW_ID") + val failedCron = new NullableBooleanDatabaseField(self, "FAILED_CRON") + } + + def primaryKey: IntDatabaseField = fields.staggerId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OrdersPromo.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OrdersPromo.scala new file mode 100644 index 00000000..c688468f --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OrdersPromo.scala @@ -0,0 +1,43 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class OrdersPromo extends StorableClass(OrdersPromo) { + override object values extends ValuesObject { + val assignId = new IntFieldValue(self, OrdersPromo.fields.assignId) + val orderId = new IntFieldValue(self, OrdersPromo.fields.orderId) + val instanceId = new IntFieldValue(self, OrdersPromo.fields.instanceId) + val createdOn = new DateTimeFieldValue(self, OrdersPromo.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, OrdersPromo.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, OrdersPromo.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, OrdersPromo.fields.updatedBy) + } +} + +object OrdersPromo extends StorableObject[OrdersPromo] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "ORDERS_PROMOS" + + object fields extends FieldsObject { + val assignId = new IntDatabaseField(self, "ASSIGN_ID") + @NullableInDatabase + val orderId = new IntDatabaseField(self, "ORDER_ID") + @NullableInDatabase + val instanceId = new IntDatabaseField(self, "INSTANCE_ID") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.assignId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OrdersStripePaymentIntent.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OrdersStripePaymentIntent.scala new file mode 100644 index 00000000..292973d8 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/OrdersStripePaymentIntent.scala @@ -0,0 +1,37 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class OrdersStripePaymentIntent extends StorableClass(OrdersStripePaymentIntent) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, OrdersStripePaymentIntent.fields.rowId) + val orderId = new IntFieldValue(self, OrdersStripePaymentIntent.fields.orderId) + val paymentIntentId = new StringFieldValue(self, OrdersStripePaymentIntent.fields.paymentIntentId) + val amountInCents = new DoubleFieldValue(self, OrdersStripePaymentIntent.fields.amountInCents) + val paid = new BooleanFieldValue(self, OrdersStripePaymentIntent.fields.paid) + val paidCloseId = new IntFieldValue(self, OrdersStripePaymentIntent.fields.paidCloseId) + } +} + +object OrdersStripePaymentIntent extends StorableObject[OrdersStripePaymentIntent] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "ORDERS_STRIPE_PAYMENT_INTENTS" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + val orderId = new IntDatabaseField(self, "ORDER_ID") + val paymentIntentId = new StringDatabaseField(self, "PAYMENT_INTENT_ID", 50) + val amountInCents = new DoubleDatabaseField(self, "AMOUNT_IN_CENTS") + val paid = new BooleanDatabaseField(self, "PAID", false) + val paidCloseId = new IntDatabaseField(self, "PAID_CLOSE_ID") + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Pa.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Pa.scala new file mode 100644 index 00000000..07602cc2 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Pa.scala @@ -0,0 +1,37 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class Pa extends StorableClass(Pa) { + override object values extends ValuesObject { + val pasId = new IntFieldValue(self, Pa.fields.pasId) + val userName = new NullableStringFieldValue(self, Pa.fields.userName) + val pas = new NullableStringFieldValue(self, Pa.fields.pas) + val expiration = new NullableDateTimeFieldValue(self, Pa.fields.expiration) + val procName = new NullableStringFieldValue(self, Pa.fields.procName) + val argString = new NullableStringFieldValue(self, Pa.fields.argString) + } +} + +object Pa extends StorableObject[Pa] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "PAS" + + object fields extends FieldsObject { + val pasId = new IntDatabaseField(self, "PAS_ID") + val userName = new NullableStringDatabaseField(self, "USER_NAME", 100) + val pas = new NullableStringDatabaseField(self, "PAS", 100) + val expiration = new NullableDateTimeDatabaseField(self, "EXPIRATION") + val procName = new NullableStringDatabaseField(self, "PROC_NAME", 100) + val argString = new NullableStringDatabaseField(self, "ARG_STRING", 500) + } + + def primaryKey: IntDatabaseField = fields.pasId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PerformanceLog.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PerformanceLog.scala new file mode 100644 index 00000000..169f8ac5 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PerformanceLog.scala @@ -0,0 +1,51 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class PerformanceLog extends StorableClass(PerformanceLog) { + override object values extends ValuesObject { + val logId = new IntFieldValue(self, PerformanceLog.fields.logId) + val appId = new IntFieldValue(self, PerformanceLog.fields.appId) + val connectTime = new DoubleFieldValue(self, PerformanceLog.fields.connectTime) + val requestTime = new DoubleFieldValue(self, PerformanceLog.fields.requestTime) + val responseTime = new DoubleFieldValue(self, PerformanceLog.fields.responseTime) + val processTime = new DoubleFieldValue(self, PerformanceLog.fields.processTime) + val totalTime = new DoubleFieldValue(self, PerformanceLog.fields.totalTime) + val logDatetime = new DateTimeFieldValue(self, PerformanceLog.fields.logDatetime) + val userName = new StringFieldValue(self, PerformanceLog.fields.userName) + } +} + +object PerformanceLog extends StorableObject[PerformanceLog] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "PERFORMANCE_LOG" + + object fields extends FieldsObject { + val logId = new IntDatabaseField(self, "LOG_ID") + @NullableInDatabase + val appId = new IntDatabaseField(self, "APP_ID") + @NullableInDatabase + val connectTime = new DoubleDatabaseField(self, "CONNECT_TIME") + @NullableInDatabase + val requestTime = new DoubleDatabaseField(self, "REQUEST_TIME") + @NullableInDatabase + val responseTime = new DoubleDatabaseField(self, "RESPONSE_TIME") + @NullableInDatabase + val processTime = new DoubleDatabaseField(self, "PROCESS_TIME") + @NullableInDatabase + val totalTime = new DoubleDatabaseField(self, "TOTAL_TIME") + @NullableInDatabase + val logDatetime = new DateTimeDatabaseField(self, "LOG_DATETIME") + @NullableInDatabase + val userName = new StringDatabaseField(self, "USER_NAME", 100) + } + + def primaryKey: IntDatabaseField = fields.logId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Person.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Person.scala index 7fe7de26..c08ce06a 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Person.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Person.scala @@ -3,20 +3,22 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.{Initializable, InitializableCastableToJs} -import org.sailcbi.APIServer.Entities.entitycalculations.MaxBoatFlag -import play.api.libs.json.Json +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class Person extends StorableClass(Person) { - override object references extends ReferencesObject { - val personRatings = new Initializable[IndexedSeq[PersonRating]] - } override object calculations extends CalculationsObject { val maxBoatFlags = new InitializableCastableToJs[IndexedSeq[MaxBoatFlag]](Json.toJson) } + + override object references extends ReferencesObject { + val personRatings = new InitializableSeq[PersonRating, IndexedSeq[PersonRating]] + } - object values extends ValuesObject { + override object values extends ValuesObject { val personId = new IntFieldValue(self, Person.fields.personId) val nameFirst = new NullableStringFieldValue(self, Person.fields.nameFirst) val nameMiddleInitial = new NullableStringFieldValue(self, Person.fields.nameMiddleInitial) @@ -24,7 +26,7 @@ class Person extends StorableClass(Person) { val namePrefix = new NullableStringFieldValue(self, Person.fields.namePrefix) val nameSuffix = new NullableStringFieldValue(self, Person.fields.nameSuffix) val gender = new NullableStringFieldValue(self, Person.fields.gender) - val dob = new NullableDateFieldValue(self, Person.fields.dob) + val dob = new NullableDateTimeFieldValue(self, Person.fields.dob) val email = new NullableStringFieldValue(self, Person.fields.email) val parentEmail = new NullableStringFieldValue(self, Person.fields.parentEmail) val addr1 = new NullableStringFieldValue(self, Person.fields.addr1) @@ -49,11 +51,11 @@ class Person extends StorableClass(Person) { val allergies = new NullableStringFieldValue(self, Person.fields.allergies) val medications = new NullableStringFieldValue(self, Person.fields.medications) val specialNeeds = new NullableStringFieldValue(self, Person.fields.specialNeeds) - val badMail = new BooleanFieldValue(self, Person.fields.badMail) - val deceased = new BooleanFieldValue(self, Person.fields.deceased) - val doNotCall = new BooleanFieldValue(self, Person.fields.doNotCall) - val doNotEmail = new BooleanFieldValue(self, Person.fields.doNotEmail) - val doNotMail = new BooleanFieldValue(self, Person.fields.doNotMail) + val badMail = new NullableBooleanFieldValue(self, Person.fields.badMail) + val deceased = new NullableBooleanFieldValue(self, Person.fields.deceased) + val doNotCall = new NullableBooleanFieldValue(self, Person.fields.doNotCall) + val doNotEmail = new NullableBooleanFieldValue(self, Person.fields.doNotEmail) + val doNotMail = new NullableBooleanFieldValue(self, Person.fields.doNotMail) val occupation = new NullableStringFieldValue(self, Person.fields.occupation) val employer = new NullableStringFieldValue(self, Person.fields.employer) val matchingGifts = new NullableStringFieldValue(self, Person.fields.matchingGifts) @@ -66,58 +68,58 @@ class Person extends StorableClass(Person) { val orgContact = new NullableStringFieldValue(self, Person.fields.orgContact) val student = new NullableBooleanFieldValue(self, Person.fields.student) val school = new NullableStringFieldValue(self, Person.fields.school) -// val createdOn = new NullableLocalDateTimeFieldValue(self, Person.fields.createdOn) -// val createdBy = new NullableStringFieldValue(self, Person.fields.createdBy) -// val updatedOn = new NullableLocalDateTimeFieldValue(self, Person.fields.updatedOn) -// val updatedBy = new NullableStringFieldValue(self, Person.fields.updatedBy) + val createdOn = new NullableDateTimeFieldValue(self, Person.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, Person.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, Person.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, Person.fields.updatedBy) val ethnicityOther = new NullableStringFieldValue(self, Person.fields.ethnicityOther) val referralOther = new NullableStringFieldValue(self, Person.fields.referralOther) - val allowSignouts = new NullableStringFieldValue(self, Person.fields.allowSignouts) - val sendAlert = new BooleanFieldValue(self, Person.fields.sendAlert) + val allowSignouts = new NullableBooleanFieldValue(self, Person.fields.allowSignouts) + val sendAlert = new NullableBooleanFieldValue(self, Person.fields.sendAlert) val temp = new StringFieldValue(self, Person.fields.temp) - val personType = new NullableIntFieldValue(self, Person.fields.personType) + val personType = new NullableDoubleFieldValue(self, Person.fields.personType) val emerg1PhonePrimaryType = new NullableStringFieldValue(self, Person.fields.emerg1PhonePrimaryType) val emerg1PhoneAlternateType = new NullableStringFieldValue(self, Person.fields.emerg1PhoneAlternateType) val emerg2PhonePrimaryType = new NullableStringFieldValue(self, Person.fields.emerg2PhonePrimaryType) val emerg2PhoneAlternateType = new NullableStringFieldValue(self, Person.fields.emerg2PhoneAlternateType) - val badPhone = new BooleanFieldValue(self, Person.fields.badPhone) - val badEmail = new BooleanFieldValue(self, Person.fields.badEmail) + val badPhone = new NullableBooleanFieldValue(self, Person.fields.badPhone) + val badEmail = new NullableBooleanFieldValue(self, Person.fields.badEmail) val military = new NullableStringFieldValue(self, Person.fields.military) - val reducedLunch = new BooleanFieldValue(self, Person.fields.reducedLunch) + val reducedLunch = new NullableBooleanFieldValue(self, Person.fields.reducedLunch) val pwHash = new NullableStringFieldValue(self, Person.fields.pwHash) - val incomeLevel = new NullableIntFieldValue(self, Person.fields.incomeLevel) - val swimProof = new NullableIntFieldValue(self, Person.fields.swimProof) + val incomeLevel = new NullableDoubleFieldValue(self, Person.fields.incomeLevel) + val swimProof = new NullableDoubleFieldValue(self, Person.fields.swimProof) val oldFundraisingGreeting = new NullableStringFieldValue(self, Person.fields.oldFundraisingGreeting) val oldPhoneWork = new NullableStringFieldValue(self, Person.fields.oldPhoneWork) val languageOther = new NullableStringFieldValue(self, Person.fields.languageOther) - val dobVerified = new BooleanFieldValue(self, Person.fields.dobVerified) - val prevMember = new NullableBooleanFieldValue(self, Person.fields.prevMember) + val dobVerified = new NullableBooleanFieldValue(self, Person.fields.dobVerified) val prevCard = new NullableStringFieldValue(self, Person.fields.prevCard) - val jpAgeOverride = new BooleanFieldValue(self, Person.fields.jpAgeOverride) + val prevMember = new NullableBooleanFieldValue(self, Person.fields.prevMember) + val jpAgeOverride = new NullableBooleanFieldValue(self, Person.fields.jpAgeOverride) val mergeStatus = new NullableStringFieldValue(self, Person.fields.mergeStatus) -// val incomeAmt = new NullableDoubleFieldValue(self, Person.fields.incomeAmt) -// val incomeAmtRaw = new NullableStringFieldValue(self, Person.fields.incomeAmtRaw) - val specNeedsVerified = new BooleanFieldValue(self, Person.fields.specNeedsVerified) - val memberComment = new NullableClobFieldValue(self, Person.fields.memberComment) + val incomeAmt = new NullableDoubleFieldValue(self, Person.fields.incomeAmt) + val incomeAmtRaw = new NullableStringFieldValue(self, Person.fields.incomeAmtRaw) + val specNeedsVerified = new NullableBooleanFieldValue(self, Person.fields.specNeedsVerified) + val memberComment = new NullableStringFieldValue(self, Person.fields.memberComment) val verifiedEmail = new NullableStringFieldValue(self, Person.fields.verifiedEmail) - val uapBoat = new NullableIntFieldValue(self, Person.fields.uapBoat) - val ignoreJpMinAge = new BooleanFieldValue(self, Person.fields.ignoreJpMinAge) - val uapInterestedLessons = new BooleanFieldValue(self, Person.fields.uapInterestedLessons) - val uapInterestedRides = new BooleanFieldValue(self, Person.fields.uapInterestedRides) - val entityType = new NullableStringFieldValue(self, Person.fields.entityType) + val uapBoat = new NullableDoubleFieldValue(self, Person.fields.uapBoat) + val ignoreJpMinAge = new NullableBooleanFieldValue(self, Person.fields.ignoreJpMinAge) + val uapInterestedLessons = new NullableBooleanFieldValue(self, Person.fields.uapInterestedLessons) + val uapInterestedRides = new NullableBooleanFieldValue(self, Person.fields.uapInterestedRides) + val entityType = new NullableBooleanFieldValue(self, Person.fields.entityType) val jpTeamId = new NullableIntFieldValue(self, Person.fields.jpTeamId) - val guestPortalReg = new BooleanFieldValue(self, Person.fields.guestPortalReg) - val signoutBlockReason = new NullableClobFieldValue(self, Person.fields.signoutBlockReason) - val dataUnconfirmed = new BooleanFieldValue(self, Person.fields.dataUnconfirmed) + val guestPortalReg = new NullableStringFieldValue(self, Person.fields.guestPortalReg) + val signoutBlockReason = new NullableStringFieldValue(self, Person.fields.signoutBlockReason) val campFair = new NullableStringFieldValue(self, Person.fields.campFair) val previousMember = new NullableBooleanFieldValue(self, Person.fields.previousMember) + val dataUnconfirmed = new NullableBooleanFieldValue(self, Person.fields.dataUnconfirmed) val protopersonCookie = new NullableStringFieldValue(self, Person.fields.protopersonCookie) val protoState = new NullableStringFieldValue(self, Person.fields.protoState) - val veteranEligible = new BooleanFieldValue(self, Person.fields.veteranEligible) + val veteranEligible = new NullableBooleanFieldValue(self, Person.fields.veteranEligible) val stripeCustomerId = new NullableStringFieldValue(self, Person.fields.stripeCustomerId) - val hasAuthedAs = new NullableIntFieldValue(self, Person.fields.hasAuthedAs) + val hasAuthedAs = new NullableDoubleFieldValue(self, Person.fields.hasAuthedAs) val pwHashScheme = new NullableStringFieldValue(self, Person.fields.pwHashScheme) - val nextRecurringDonation = new NullableDateFieldValue(self, Person.fields.nextRecurringDonation) + val nextRecurringDonation = new NullableDateTimeFieldValue(self, Person.fields.nextRecurringDonation) val slackUserId = new NullableStringFieldValue(self, Person.fields.slackUserId) } } @@ -125,7 +127,7 @@ class Person extends StorableClass(Person) { object Person extends StorableObject[Person] { override val useRuntimeFieldnamesForJson: Boolean = true - val entityName: String = "PERSONS" + override val entityName: String = "PERSONS" object fields extends FieldsObject { val personId = new IntDatabaseField(self, "PERSON_ID") @@ -135,7 +137,7 @@ object Person extends StorableObject[Person] { val namePrefix = new NullableStringDatabaseField(self, "NAME_PREFIX", 50) val nameSuffix = new NullableStringDatabaseField(self, "NAME_SUFFIX", 50) val gender = new NullableStringDatabaseField(self, "GENDER", 1) - val dob = new NullableDateDatabaseField(self, "DOB") + val dob = new NullableDateTimeDatabaseField(self, "DOB") val email = new NullableStringDatabaseField(self, "EMAIL", 100) val parentEmail = new NullableStringDatabaseField(self, "PARENT_EMAIL", 100) val addr1 = new NullableStringDatabaseField(self, "ADDR_1", 200) @@ -160,11 +162,11 @@ object Person extends StorableObject[Person] { val allergies = new NullableStringDatabaseField(self, "ALLERGIES", 4000) val medications = new NullableStringDatabaseField(self, "MEDICATIONS", 4000) val specialNeeds = new NullableStringDatabaseField(self, "SPECIAL_NEEDS", 4000) - val badMail = new BooleanDatabaseField(self, "BAD_MAIL", true) - val deceased = new BooleanDatabaseField(self, "DECEASED", true) - val doNotCall = new BooleanDatabaseField(self, "DO_NOT_CALL", true) - val doNotEmail = new BooleanDatabaseField(self, "DO_NOT_EMAIL", true) - val doNotMail = new BooleanDatabaseField(self, "DO_NOT_MAIL", true) + val badMail = new NullableBooleanDatabaseField(self, "BAD_MAIL") + val deceased = new NullableBooleanDatabaseField(self, "DECEASED") + val doNotCall = new NullableBooleanDatabaseField(self, "DO_NOT_CALL") + val doNotEmail = new NullableBooleanDatabaseField(self, "DO_NOT_EMAIL") + val doNotMail = new NullableBooleanDatabaseField(self, "DO_NOT_MAIL") val occupation = new NullableStringDatabaseField(self, "OCCUPATION", 100) val employer = new NullableStringDatabaseField(self, "EMPLOYER", 100) val matchingGifts = new NullableStringDatabaseField(self, "MATCHING_GIFTS", 1) @@ -177,60 +179,61 @@ object Person extends StorableObject[Person] { val orgContact = new NullableStringDatabaseField(self, "ORG_CONTACT", 200) val student = new NullableBooleanDatabaseField(self, "STUDENT") val school = new NullableStringDatabaseField(self, "SCHOOL", 100) -// val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") -// val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) -// val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") -// val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) val ethnicityOther = new NullableStringDatabaseField(self, "ETHNICITY_OTHER", 100) val referralOther = new NullableStringDatabaseField(self, "REFERRAL_OTHER", 100) - val allowSignouts = new NullableStringDatabaseField(self, "ALLOW_SIGNOUTS", 1) - val sendAlert = new BooleanDatabaseField(self, "SEND_ALERT", true) + val allowSignouts = new NullableBooleanDatabaseField(self, "ALLOW_SIGNOUTS") + val sendAlert = new NullableBooleanDatabaseField(self, "SEND_ALERT") val temp = new StringDatabaseField(self, "TEMP", 1) - val personType = new NullableIntDatabaseField(self, "PERSON_TYPE") + val personType = new NullableDoubleDatabaseField(self, "PERSON_TYPE") val emerg1PhonePrimaryType = new NullableStringDatabaseField(self, "EMERG1_PHONE_PRIMARY_TYPE", 50) val emerg1PhoneAlternateType = new NullableStringDatabaseField(self, "EMERG1_PHONE_ALTERNATE_TYPE", 50) val emerg2PhonePrimaryType = new NullableStringDatabaseField(self, "EMERG2_PHONE_PRIMARY_TYPE", 50) val emerg2PhoneAlternateType = new NullableStringDatabaseField(self, "EMERG2_PHONE_ALTERNATE_TYPE", 50) - val badPhone = new BooleanDatabaseField(self, "BAD_PHONE", true) - val badEmail = new BooleanDatabaseField(self, "BAD_EMAIL", true) + val badPhone = new NullableBooleanDatabaseField(self, "BAD_PHONE") + val badEmail = new NullableBooleanDatabaseField(self, "BAD_EMAIL") val military = new NullableStringDatabaseField(self, "MILITARY", 50) - val reducedLunch = new BooleanDatabaseField(self, "REDUCED_LUNCH", true) + val reducedLunch = new NullableBooleanDatabaseField(self, "REDUCED_LUNCH") val pwHash = new NullableStringDatabaseField(self, "PW_HASH", 100) - val incomeLevel = new NullableIntDatabaseField(self, "INCOME_LEVEL") - val swimProof = new NullableIntDatabaseField(self, "SWIM_PROOF") + val incomeLevel = new NullableDoubleDatabaseField(self, "INCOME_LEVEL") + val swimProof = new NullableDoubleDatabaseField(self, "SWIM_PROOF") val oldFundraisingGreeting = new NullableStringDatabaseField(self, "OLD_FUNDRAISING_GREETING", 300) val oldPhoneWork = new NullableStringDatabaseField(self, "OLD_PHONE_WORK", 50) val languageOther = new NullableStringDatabaseField(self, "LANGUAGE_OTHER", 200) - val dobVerified = new BooleanDatabaseField(self, "DOB_VERIFIED", true) - val prevMember = new NullableBooleanDatabaseField(self, "PREV_MEMBER") + val dobVerified = new NullableBooleanDatabaseField(self, "DOB_VERIFIED") val prevCard = new NullableStringDatabaseField(self, "PREV_CARD", 50) - val jpAgeOverride = new BooleanDatabaseField(self, "JP_AGE_OVERRIDE", true) + val prevMember = new NullableBooleanDatabaseField(self, "PREV_MEMBER") + val jpAgeOverride = new NullableBooleanDatabaseField(self, "JP_AGE_OVERRIDE") val mergeStatus = new NullableStringDatabaseField(self, "MERGE_STATUS", 1) -// val incomeAmt = new NullableDoubleDatabaseField(self, "INCOME_AMT") -// val incomeAmtRaw = new NullableStringDatabaseField(self, "INCOME_AMT_RAW", 50) - val specNeedsVerified = new BooleanDatabaseField(self, "SPEC_NEEDS_VERIFIED", true) - val memberComment = new NullableClobDatabaseField(self, "MEMBER_COMMENT") + val incomeAmt = new NullableDoubleDatabaseField(self, "INCOME_AMT") + val incomeAmtRaw = new NullableStringDatabaseField(self, "INCOME_AMT_RAW", 50) + val specNeedsVerified = new NullableBooleanDatabaseField(self, "SPEC_NEEDS_VERIFIED") + val memberComment = new NullableStringDatabaseField(self, "MEMBER_COMMENT", -1) val verifiedEmail = new NullableStringDatabaseField(self, "VERIFIED_EMAIL", 1000) - val uapBoat = new NullableIntDatabaseField(self, "UAP_BOAT") - val ignoreJpMinAge = new BooleanDatabaseField(self, "IGNORE_JP_MIN_AGE", true) - val uapInterestedLessons = new BooleanDatabaseField(self, "UAP_INTERESTED_LESSONS", true) - val uapInterestedRides = new BooleanDatabaseField(self, "UAP_INTERESTED_RIDES", true) - val entityType = new NullableStringDatabaseField(self, "ENTITY_TYPE", 1) + val uapBoat = new NullableDoubleDatabaseField(self, "UAP_BOAT") + val ignoreJpMinAge = new NullableBooleanDatabaseField(self, "IGNORE_JP_MIN_AGE") + val uapInterestedLessons = new NullableBooleanDatabaseField(self, "UAP_INTERESTED_LESSONS") + val uapInterestedRides = new NullableBooleanDatabaseField(self, "UAP_INTERESTED_RIDES") + val entityType = new NullableBooleanDatabaseField(self, "ENTITY_TYPE") val jpTeamId = new NullableIntDatabaseField(self, "JP_TEAM_ID") - val guestPortalReg = new BooleanDatabaseField(self, "GUEST_PORTAL_REG", true) - val signoutBlockReason = new NullableClobDatabaseField(self, "SIGNOUT_BLOCK_REASON") - val dataUnconfirmed = new BooleanDatabaseField(self, "DATA_UNCONFIRMED", true) + val guestPortalReg = new NullableStringDatabaseField(self, "GUEST_PORTAL_REG", 1) + val signoutBlockReason = new NullableStringDatabaseField(self, "SIGNOUT_BLOCK_REASON", -1) val campFair = new NullableStringDatabaseField(self, "CAMP_FAIR", 50) val previousMember = new NullableBooleanDatabaseField(self, "PREVIOUS_MEMBER") + val dataUnconfirmed = new NullableBooleanDatabaseField(self, "DATA_UNCONFIRMED") val protopersonCookie = new NullableStringDatabaseField(self, "PROTOPERSON_COOKIE", 50) val protoState = new NullableStringDatabaseField(self, "PROTO_STATE", 1) - val veteranEligible = new BooleanDatabaseField(self, "VETERAN_ELIGIBLE", true) + val veteranEligible = new NullableBooleanDatabaseField(self, "VETERAN_ELIGIBLE") val stripeCustomerId = new NullableStringDatabaseField(self, "STRIPE_CUSTOMER_ID", 30) - val hasAuthedAs = new NullableIntDatabaseField(self, "HAS_AUTHED_AS") + val hasAuthedAs = new NullableDoubleDatabaseField(self, "HAS_AUTHED_AS") val pwHashScheme = new NullableStringDatabaseField(self, "PW_HASH_SCHEME", 20) - val nextRecurringDonation = new NullableDateDatabaseField(self, "NEXT_RECURRING_DONATION") + val nextRecurringDonation = new NullableDateTimeDatabaseField(self, "NEXT_RECURRING_DONATION") val slackUserId = new NullableStringDatabaseField(self, "SLACK_USER_ID", 20) } def primaryKey: IntDatabaseField = fields.personId -} +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonCard.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonCard.scala index dd988bdc..cd68d67d 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonCard.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonCard.scala @@ -3,38 +3,58 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class PersonCard extends StorableClass(PersonCard) { - object values extends ValuesObject { + override object values extends ValuesObject { val assignId = new IntFieldValue(self, PersonCard.fields.assignId) val personId = new IntFieldValue(self, PersonCard.fields.personId) val issueDate = new DateTimeFieldValue(self, PersonCard.fields.issueDate) + val createdOn = new DateTimeFieldValue(self, PersonCard.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, PersonCard.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, PersonCard.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, PersonCard.fields.updatedBy) val cardNum = new StringFieldValue(self, PersonCard.fields.cardNum) + val temp = new BooleanFieldValue(self, PersonCard.fields.temp) val active = new BooleanFieldValue(self, PersonCard.fields.active) - val price = new NullableDoubleFieldValue(self, PersonCard.fields.price) - val paymentMedium = new NullableStringFieldValue(self, PersonCard.fields.paymentMedium) val ccTransNum = new NullableDoubleFieldValue(self, PersonCard.fields.ccTransNum) - val paid = new NullableStringFieldValue(self, PersonCard.fields.paid) + val paymentMedium = new NullableStringFieldValue(self, PersonCard.fields.paymentMedium) + val price = new NullableDoubleFieldValue(self, PersonCard.fields.price) val closeId = new NullableIntFieldValue(self, PersonCard.fields.closeId) + val paid = new NullableStringFieldValue(self, PersonCard.fields.paid) val voidCloseId = new NullableIntFieldValue(self, PersonCard.fields.voidCloseId) val nonce = new NullableStringFieldValue(self, PersonCard.fields.nonce) } } object PersonCard extends StorableObject[PersonCard] { - val entityName: String = "PERSONS_CARDS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "PERSONS_CARDS" object fields extends FieldsObject { val assignId = new IntDatabaseField(self, "ASSIGN_ID") + @NullableInDatabase val personId = new IntDatabaseField(self, "PERSON_ID") val issueDate = new DateTimeDatabaseField(self, "ISSUE_DATE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) val cardNum = new StringDatabaseField(self, "CARD_NUM", 50) - val active = new BooleanDatabaseField(self, "ACTIVE") - val price = new NullableDoubleDatabaseField(self, "PRICE") - val paymentMedium = new NullableStringDatabaseField(self, "PAYMENT_MEDIUM", 100) + val temp = new BooleanDatabaseField(self, "TEMP", false) + @NullableInDatabase + val active = new BooleanDatabaseField(self, "ACTIVE", false) val ccTransNum = new NullableDoubleDatabaseField(self, "CC_TRANS_NUM") - val paid = new NullableStringDatabaseField(self, "PAID", 1) + val paymentMedium = new NullableStringDatabaseField(self, "PAYMENT_MEDIUM", 100) + val price = new NullableDoubleDatabaseField(self, "PRICE") val closeId = new NullableIntDatabaseField(self, "CLOSE_ID") + val paid = new NullableStringDatabaseField(self, "PAID", 1) val voidCloseId = new NullableIntDatabaseField(self, "VOID_CLOSE_ID") val nonce = new NullableStringDatabaseField(self, "NONCE", 10) } diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonMembership.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonMembership.scala index b6dc2210..7aaeed5e 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonMembership.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonMembership.scala @@ -3,16 +3,17 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.{Initializable, InitializableCastableToJs} -import play.api.libs.json.JsBoolean - -import java.time.LocalDate +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class PersonMembership extends StorableClass(PersonMembership) { + override object calculations extends CalculationsObject { val isDiscountFrozen = new InitializableCastableToJs[Boolean](JsBoolean) } - + override object references extends ReferencesObject { val person = new Initializable[Person] val membershipType = new Initializable[MembershipType] @@ -20,7 +21,7 @@ class PersonMembership extends StorableClass(PersonMembership) { val guestPriv = new Initializable[Option[GuestPriv]] } - object values extends ValuesObject { + override object values extends ValuesObject { val assignId = new IntFieldValue(self, PersonMembership.fields.assignId) val personId = new IntFieldValue(self, PersonMembership.fields.personId) val membershipTypeId = new IntFieldValue(self, PersonMembership.fields.membershipTypeId) @@ -30,47 +31,39 @@ class PersonMembership extends StorableClass(PersonMembership) { val schoolId = new NullableIntFieldValue(self, PersonMembership.fields.schoolId) val orderId = new NullableIntFieldValue(self, PersonMembership.fields.orderId) val price = new DoubleFieldValue(self, PersonMembership.fields.price) -// val createdOn = new NullableLocalDateTimeFieldValue(self, PersonMembership.fields.createdOn) -// val createdBy = new NullableStringFieldValue(self, PersonMembership.fields.createdBy) -// val updatedOn = new NullableLocalDateTimeFieldValue(self, PersonMembership.fields.updatedOn) -// val updatedBy = new NullableStringFieldValue(self, PersonMembership.fields.updatedBy) + val createdOn = new DateTimeFieldValue(self, PersonMembership.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, PersonMembership.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, PersonMembership.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, PersonMembership.fields.updatedBy) val temp = new BooleanFieldValue(self, PersonMembership.fields.temp) val paymentLocation = new NullableStringFieldValue(self, PersonMembership.fields.paymentLocation) val paymentMedium = new NullableStringFieldValue(self, PersonMembership.fields.paymentMedium) -// val oldCardNum = new NullableStringFieldValue(self, PersonMembership.fields.oldCardNum) -// val oldCompReason = new NullableStringFieldValue(self, PersonMembership.fields.oldCompReason) -// val oldDmgWaiver = new NullableBooleanFIeldValue(self, PersonMembership.fields.oldDmgWaiver) + val discountId = new NullableIntFieldValue(self, PersonMembership.fields.discountId) + val oldCardNum = new NullableStringFieldValue(self, PersonMembership.fields.oldCardNum) + val oldCompReason = new NullableStringFieldValue(self, PersonMembership.fields.oldCompReason) + val oldDmgWaiver = new NullableBooleanFieldValue(self, PersonMembership.fields.oldDmgWaiver) val closeId = new NullableIntFieldValue(self, PersonMembership.fields.closeId) - val ccTransNum = new NullableIntFieldValue(self, PersonMembership.fields.ccTransNum) + val ccTransNum = new NullableDoubleFieldValue(self, PersonMembership.fields.ccTransNum) val groupId = new NullableIntFieldValue(self, PersonMembership.fields.groupId) val discountInstanceId = new NullableIntFieldValue(self, PersonMembership.fields.discountInstanceId) val notes = new NullableStringFieldValue(self, PersonMembership.fields.notes) -// val discountId = new NullableIntFieldValue(self, PersonMembership.fields.discountId) val voidCloseId = new NullableIntFieldValue(self, PersonMembership.fields.voidCloseId) val discountAmt = new NullableDoubleFieldValue(self, PersonMembership.fields.discountAmt) - val taxRate = new NullableDoubleFieldValue(self, PersonMembership.fields.taxRate) val pretaxPrice = new NullableDoubleFieldValue(self, PersonMembership.fields.pretaxPrice) + val taxRate = new NullableDoubleFieldValue(self, PersonMembership.fields.taxRate) val uapGroupId = new NullableIntFieldValue(self, PersonMembership.fields.uapGroupId) - val ignoreDiscountFrozen = new BooleanFieldValue(self, PersonMembership.fields.ignoreDiscountFrozen) -// val covidDays = new NullableDoubleFieldValue(self, PersonMembership.fields.covidDays) -// val covidEmailSent = new NullableBooleanFIeldValue(self, PersonMembership.fields.covidEmailSent) -// val originalExpirationDate = new NullableLocalDateTimeFieldValue(self, PersonMembership.fields.originalExpirationDate) - } - - def isActive(now: LocalDate): Boolean = { - val start = values.startDate.get - val exp = values.expirationDate.get - - (start.isEmpty || !start.get.isAfter(now)) && - (exp.isEmpty || !exp.get.isBefore(now)) + val ignoreDiscountFrozen = new NullableBooleanFieldValue(self, PersonMembership.fields.ignoreDiscountFrozen) + val originalExpirationDate = new NullableDateTimeFieldValue(self, PersonMembership.fields.originalExpirationDate) + val covidEmailSent = new NullableBooleanFieldValue(self, PersonMembership.fields.covidEmailSent) + val covidDays = new NullableDoubleFieldValue(self, PersonMembership.fields.covidDays) } } object PersonMembership extends StorableObject[PersonMembership] { - val entityName: String = "PERSONS_MEMBERSHIPS" - override val useRuntimeFieldnamesForJson: Boolean = true + override val entityName: String = "PERSONS_MEMBERSHIPS" + object fields extends FieldsObject { val assignId = new IntDatabaseField(self, "ASSIGN_ID") val personId = new IntDatabaseField(self, "PERSON_ID") @@ -81,32 +74,34 @@ object PersonMembership extends StorableObject[PersonMembership] { val schoolId = new NullableIntDatabaseField(self, "SCHOOL_ID") val orderId = new NullableIntDatabaseField(self, "ORDER_ID") val price = new DoubleDatabaseField(self, "PRICE") -// val createdOn = new NullableLocalDateTimeDatabaseField(self, "CREATED_ON") -// val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) -// val updatedOn = new NullableLocalDateTimeDatabaseField(self, "UPDATED_ON") -// val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) - val temp = new BooleanDatabaseField(self, "TEMP") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val temp = new BooleanDatabaseField(self, "TEMP", false) val paymentLocation = new NullableStringDatabaseField(self, "PAYMENT_LOCATION", 50) val paymentMedium = new NullableStringDatabaseField(self, "PAYMENT_MEDIUM", 50) -// val oldCardNum = new NullableStringDatabaseField(self, "OLD_CARD_NUM", 100) -// val oldCompReason = new NullableStringDatabaseField(self, "OLD_COMP_REASON", 500) -// val oldDmgWaiver = new NullableBooleanDatabaseField(self, "OLD_DMG_WAIVER") + val discountId = new NullableIntDatabaseField(self, "DISCOUNT_ID") + val oldCardNum = new NullableStringDatabaseField(self, "OLD_CARD_NUM", 100) + val oldCompReason = new NullableStringDatabaseField(self, "OLD_COMP_REASON", 500) + val oldDmgWaiver = new NullableBooleanDatabaseField(self, "OLD_DMG_WAIVER") val closeId = new NullableIntDatabaseField(self, "CLOSE_ID") - val ccTransNum = new NullableIntDatabaseField(self, "CC_TRANS_NUM") + val ccTransNum = new NullableDoubleDatabaseField(self, "CC_TRANS_NUM") val groupId = new NullableIntDatabaseField(self, "GROUP_ID") val discountInstanceId = new NullableIntDatabaseField(self, "DISCOUNT_INSTANCE_ID") val notes = new NullableStringDatabaseField(self, "NOTES", 4000) -// val discountId = new NullableIntDatabaseField(self, "DISCOUNT_ID") val voidCloseId = new NullableIntDatabaseField(self, "VOID_CLOSE_ID") val discountAmt = new NullableDoubleDatabaseField(self, "DISCOUNT_AMT") - val taxRate = new NullableDoubleDatabaseField(self, "TAX_RATE") val pretaxPrice = new NullableDoubleDatabaseField(self, "PRETAX_PRICE") + val taxRate = new NullableDoubleDatabaseField(self, "TAX_RATE") val uapGroupId = new NullableIntDatabaseField(self, "UAP_GROUP_ID") - val ignoreDiscountFrozen = new BooleanDatabaseField(self, "IGNORE_DISCOUNT_FROZEN", true) -// val covidDays = new NullableDoubleDatabaseField(self, "COVID_DAYS") -// val covidEmailSent = new NullableBooleanDatabaseField(self, "COVID_EMAIL_SENT") -// val originalExpirationDate = new NullableLocalDateTimeDatabaseField(self, "ORIGINAL_EXPIRATION_DATE") + val ignoreDiscountFrozen = new NullableBooleanDatabaseField(self, "IGNORE_DISCOUNT_FROZEN") + val originalExpirationDate = new NullableDateTimeDatabaseField(self, "ORIGINAL_EXPIRATION_DATE") + val covidEmailSent = new NullableBooleanDatabaseField(self, "COVID_EMAIL_SENT") + val covidDays = new NullableDoubleDatabaseField(self, "COVID_DAYS") } def primaryKey: IntDatabaseField = fields.assignId -} +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonRating.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonRating.scala index 6e2527ee..accd8430 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonRating.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonRating.scala @@ -1,10 +1,12 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.IntFieldValue -import com.coleji.neptune.Storable.Fields.IntDatabaseField +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable -import org.sailcbi.APIServer.Entities.EntityDefinitions.PersonRating.CasePersonRating +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class PersonRating extends StorableClass(PersonRating) { override object references extends ReferencesObject { @@ -13,33 +15,35 @@ class PersonRating extends StorableClass(PersonRating) { val program = new Initializable[ProgramType] } - object values extends ValuesObject { + override object values extends ValuesObject { val assignId = new IntFieldValue(self, PersonRating.fields.assignId) val personId = new IntFieldValue(self, PersonRating.fields.personId) val ratingId = new IntFieldValue(self, PersonRating.fields.ratingId) + val createdOn = new NullableDateTimeFieldValue(self, PersonRating.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, PersonRating.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, PersonRating.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, PersonRating.fields.updatedBy) val programId = new IntFieldValue(self, PersonRating.fields.programId) + val testSignoutId = new NullableIntFieldValue(self, PersonRating.fields.testSignoutId) } - - lazy val asCaseClass = CasePersonRating( - this.values.personId.get, - this.values.ratingId.get, - this.values.programId.get - ) } object PersonRating extends StorableObject[PersonRating] { - val entityName: String = "PERSONS_RATINGS" override val useRuntimeFieldnamesForJson: Boolean = true + override val entityName: String = "PERSONS_RATINGS" + object fields extends FieldsObject { val assignId = new IntDatabaseField(self, "ASSIGN_ID") val personId = new IntDatabaseField(self, "PERSON_ID") val ratingId = new IntDatabaseField(self, "RATING_ID") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) val programId = new IntDatabaseField(self, "PROGRAM_ID") + val testSignoutId = new NullableIntDatabaseField(self, "TEST_SIGNOUT_ID") } def primaryKey: IntDatabaseField = fields.assignId - - case class CasePersonRating(personId: Int, ratingId: Int, programId: Int) - } \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonRelationship.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonRelationship.scala index a8446644..947f7c26 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonRelationship.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonRelationship.scala @@ -1,10 +1,12 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.IntFieldValue -import com.coleji.neptune.Storable.Fields.IntDatabaseField +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable +import com.coleji.neptune.Util._ import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class PersonRelationship extends StorableClass(PersonRelationship) { override object references extends ReferencesObject { @@ -12,16 +14,22 @@ class PersonRelationship extends StorableClass(PersonRelationship) { val b = new Initializable[Person] } - object values extends ValuesObject { + override object values extends ValuesObject { val relationId = new IntFieldValue(self, PersonRelationship.fields.relationId) val a = new IntFieldValue(self, PersonRelationship.fields.a) val b = new IntFieldValue(self, PersonRelationship.fields.b) val typeId = new IntFieldValue(self, PersonRelationship.fields.typeId) + val createdOn = new DateTimeFieldValue(self, PersonRelationship.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, PersonRelationship.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, PersonRelationship.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, PersonRelationship.fields.updatedBy) } } object PersonRelationship extends StorableObject[PersonRelationship] { - val entityName: String = "PERSON_RELATIONSHIPS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "PERSON_RELATIONSHIPS" object fields extends FieldsObject { val relationId = new IntDatabaseField(self, "RELATION_ID") @@ -31,10 +39,12 @@ object PersonRelationship extends StorableObject[PersonRelationship] { val b = new IntDatabaseField(self, "B") @NullableInDatabase val typeId = new IntDatabaseField(self, "TYPE_ID") - } - - object specialIDs { - val TYPE_ID_PARENT_CHILD_ACCT_LINKED: Int = 2 + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) } def primaryKey: IntDatabaseField = fields.relationId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonRelationshipType.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonRelationshipType.scala new file mode 100644 index 00000000..cc971aa8 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonRelationshipType.scala @@ -0,0 +1,47 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class PersonRelationshipType extends StorableClass(PersonRelationshipType) { + override object values extends ValuesObject { + val typeId = new IntFieldValue(self, PersonRelationshipType.fields.typeId) + val aTitle = new StringFieldValue(self, PersonRelationshipType.fields.aTitle) + val bTitle = new StringFieldValue(self, PersonRelationshipType.fields.bTitle) + val createdOn = new DateTimeFieldValue(self, PersonRelationshipType.fields.createdOn) + val createdBy = new StringFieldValue(self, PersonRelationshipType.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, PersonRelationshipType.fields.updatedOn) + val updatedBy = new StringFieldValue(self, PersonRelationshipType.fields.updatedBy) + val acctLink = new NullableBooleanFieldValue(self, PersonRelationshipType.fields.acctLink) + } +} + +object PersonRelationshipType extends StorableObject[PersonRelationshipType] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "PERSON_RELATIONSHIP_TYPES" + + object fields extends FieldsObject { + val typeId = new IntDatabaseField(self, "TYPE_ID") + @NullableInDatabase + val aTitle = new StringDatabaseField(self, "A_TITLE", 500) + @NullableInDatabase + val bTitle = new StringDatabaseField(self, "B_TITLE", 500) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val acctLink = new NullableBooleanDatabaseField(self, "ACCT_LINK") + } + + def primaryKey: IntDatabaseField = fields.typeId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonTag.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonTag.scala index 3137455b..3495d5d0 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonTag.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonTag.scala @@ -1,10 +1,12 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.IntFieldValue -import com.coleji.neptune.Storable.Fields.IntDatabaseField +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable +import com.coleji.neptune.Util._ import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class PersonTag extends StorableClass(PersonTag) { override object references extends ReferencesObject { @@ -12,15 +14,21 @@ class PersonTag extends StorableClass(PersonTag) { val tag = new Initializable[Tag] } - object values extends ValuesObject { + override object values extends ValuesObject { val assignId = new IntFieldValue(self, PersonTag.fields.assignId) val personId = new IntFieldValue(self, PersonTag.fields.personId) val tagId = new IntFieldValue(self, PersonTag.fields.tagId) + val createdOn = new DateTimeFieldValue(self, PersonTag.fields.createdOn) + val createdBy = new StringFieldValue(self, PersonTag.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, PersonTag.fields.updatedOn) + val updatedBy = new StringFieldValue(self, PersonTag.fields.updatedBy) } } object PersonTag extends StorableObject[PersonTag] { - val entityName: String = "PERSONS_TAGS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "PERSONS_TAGS" object fields extends FieldsObject { val assignId = new IntDatabaseField(self, "ASSIGN_ID") @@ -28,6 +36,14 @@ object PersonTag extends StorableObject[PersonTag] { val personId = new IntDatabaseField(self, "PERSON_ID") @NullableInDatabase val tagId = new IntDatabaseField(self, "TAG_ID") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) } def primaryKey: IntDatabaseField = fields.assignId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonType.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonType.scala new file mode 100644 index 00000000..cf70865f --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonType.scala @@ -0,0 +1,45 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class PersonType extends StorableClass(PersonType) { + override object values extends ValuesObject { + val typeId = new IntFieldValue(self, PersonType.fields.typeId) + val typeName = new StringFieldValue(self, PersonType.fields.typeName) + val createdOn = new DateTimeFieldValue(self, PersonType.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, PersonType.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, PersonType.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, PersonType.fields.updatedBy) + val active = new NullableBooleanFieldValue(self, PersonType.fields.active) + val displayOrder = new DoubleFieldValue(self, PersonType.fields.displayOrder) + } +} + +object PersonType extends StorableObject[PersonType] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "PERSON_TYPES" + + object fields extends FieldsObject { + val typeId = new IntDatabaseField(self, "TYPE_ID") + @NullableInDatabase + val typeName = new StringDatabaseField(self, "TYPE_NAME", 100) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + @NullableInDatabase + val displayOrder = new DoubleDatabaseField(self, "DISPLAY_ORDER") + } + + def primaryKey: IntDatabaseField = fields.typeId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonTypesField.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonTypesField.scala new file mode 100644 index 00000000..2b3c363b --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonTypesField.scala @@ -0,0 +1,47 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class PersonTypesField extends StorableClass(PersonTypesField) { + override object values extends ValuesObject { + val assignId = new IntFieldValue(self, PersonTypesField.fields.assignId) + val typeId = new IntFieldValue(self, PersonTypesField.fields.typeId) + val itemName = new StringFieldValue(self, PersonTypesField.fields.itemName) + val createdOn = new DateTimeFieldValue(self, PersonTypesField.fields.createdOn) + val createdBy = new StringFieldValue(self, PersonTypesField.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, PersonTypesField.fields.updatedOn) + val updatedBy = new StringFieldValue(self, PersonTypesField.fields.updatedBy) + val display = new NullableBooleanFieldValue(self, PersonTypesField.fields.display) + } +} + +object PersonTypesField extends StorableObject[PersonTypesField] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "PERSON_TYPES_FIELDS" + + object fields extends FieldsObject { + val assignId = new IntDatabaseField(self, "ASSIGN_ID") + @NullableInDatabase + val typeId = new IntDatabaseField(self, "TYPE_ID") + @NullableInDatabase + val itemName = new StringDatabaseField(self, "ITEM_NAME", 100) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val display = new NullableBooleanDatabaseField(self, "DISPLAY") + } + + def primaryKey: IntDatabaseField = fields.assignId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsCardsAlternate.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsCardsAlternate.scala new file mode 100644 index 00000000..b4d63b76 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsCardsAlternate.scala @@ -0,0 +1,61 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class PersonsCardsAlternate extends StorableClass(PersonsCardsAlternate) { + override object values extends ValuesObject { + val assignId = new IntFieldValue(self, PersonsCardsAlternate.fields.assignId) + val personId = new NullableIntFieldValue(self, PersonsCardsAlternate.fields.personId) + val issueDate = new NullableDateTimeFieldValue(self, PersonsCardsAlternate.fields.issueDate) + val createdOn = new DateTimeFieldValue(self, PersonsCardsAlternate.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, PersonsCardsAlternate.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, PersonsCardsAlternate.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, PersonsCardsAlternate.fields.updatedBy) + val cardNum = new NullableStringFieldValue(self, PersonsCardsAlternate.fields.cardNum) + val temp = new BooleanFieldValue(self, PersonsCardsAlternate.fields.temp) + val active = new NullableBooleanFieldValue(self, PersonsCardsAlternate.fields.active) + val ccTransNum = new NullableDoubleFieldValue(self, PersonsCardsAlternate.fields.ccTransNum) + val paymentMedium = new NullableStringFieldValue(self, PersonsCardsAlternate.fields.paymentMedium) + val price = new NullableDoubleFieldValue(self, PersonsCardsAlternate.fields.price) + val closeId = new NullableIntFieldValue(self, PersonsCardsAlternate.fields.closeId) + val paid = new NullableBooleanFieldValue(self, PersonsCardsAlternate.fields.paid) + val voidCloseId = new NullableIntFieldValue(self, PersonsCardsAlternate.fields.voidCloseId) + val nonce = new NullableStringFieldValue(self, PersonsCardsAlternate.fields.nonce) + } +} + +object PersonsCardsAlternate extends StorableObject[PersonsCardsAlternate] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "PERSONS_CARDS_ALTERNATE" + + object fields extends FieldsObject { + val assignId = new IntDatabaseField(self, "ASSIGN_ID") + val personId = new NullableIntDatabaseField(self, "PERSON_ID") + val issueDate = new NullableDateTimeDatabaseField(self, "ISSUE_DATE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val cardNum = new NullableStringDatabaseField(self, "CARD_NUM", 50) + val temp = new BooleanDatabaseField(self, "TEMP", false) + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + val ccTransNum = new NullableDoubleDatabaseField(self, "CC_TRANS_NUM") + val paymentMedium = new NullableStringDatabaseField(self, "PAYMENT_MEDIUM", 100) + val price = new NullableDoubleDatabaseField(self, "PRICE") + val closeId = new NullableIntDatabaseField(self, "CLOSE_ID") + val paid = new NullableBooleanDatabaseField(self, "PAID") + val voidCloseId = new NullableIntDatabaseField(self, "VOID_CLOSE_ID") + val nonce = new NullableStringDatabaseField(self, "NONCE", 10) + } + + def primaryKey: IntDatabaseField = fields.assignId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsDiscountsEligible.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsDiscountsEligible.scala new file mode 100644 index 00000000..0510e6d5 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsDiscountsEligible.scala @@ -0,0 +1,48 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class PersonsDiscountsEligible extends StorableClass(PersonsDiscountsEligible) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, PersonsDiscountsEligible.fields.rowId) + val personId = new IntFieldValue(self, PersonsDiscountsEligible.fields.personId) + val discountId = new IntFieldValue(self, PersonsDiscountsEligible.fields.discountId) + val season = new DoubleFieldValue(self, PersonsDiscountsEligible.fields.season) + val createdOn = new DateTimeFieldValue(self, PersonsDiscountsEligible.fields.createdOn) + val createdBy = new StringFieldValue(self, PersonsDiscountsEligible.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, PersonsDiscountsEligible.fields.updatedOn) + val updatedBy = new StringFieldValue(self, PersonsDiscountsEligible.fields.updatedBy) + } +} + +object PersonsDiscountsEligible extends StorableObject[PersonsDiscountsEligible] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "PERSONS_DISCOUNTS_ELIGIBLE" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + @NullableInDatabase + val personId = new IntDatabaseField(self, "PERSON_ID") + @NullableInDatabase + val discountId = new IntDatabaseField(self, "DISCOUNT_ID") + @NullableInDatabase + val season = new DoubleDatabaseField(self, "SEASON") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsEvent.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsEvent.scala new file mode 100644 index 00000000..defb4235 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsEvent.scala @@ -0,0 +1,45 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class PersonsEvent extends StorableClass(PersonsEvent) { + override object values extends ValuesObject { + val assignId = new IntFieldValue(self, PersonsEvent.fields.assignId) + val personId = new IntFieldValue(self, PersonsEvent.fields.personId) + val eventId = new IntFieldValue(self, PersonsEvent.fields.eventId) + val createdOn = new DateTimeFieldValue(self, PersonsEvent.fields.createdOn) + val createdBy = new StringFieldValue(self, PersonsEvent.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, PersonsEvent.fields.updatedOn) + val updatedBy = new StringFieldValue(self, PersonsEvent.fields.updatedBy) + } +} + +object PersonsEvent extends StorableObject[PersonsEvent] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "PERSONS_EVENTS" + + object fields extends FieldsObject { + val assignId = new IntDatabaseField(self, "ASSIGN_ID") + @NullableInDatabase + val personId = new IntDatabaseField(self, "PERSON_ID") + @NullableInDatabase + val eventId = new IntDatabaseField(self, "EVENT_ID") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.assignId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsNotificationPreference.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsNotificationPreference.scala new file mode 100644 index 00000000..ed07b770 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsNotificationPreference.scala @@ -0,0 +1,44 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class PersonsNotificationPreference extends StorableClass(PersonsNotificationPreference) { + override object values extends ValuesObject { + val prefId = new IntFieldValue(self, PersonsNotificationPreference.fields.prefId) + val personId = new IntFieldValue(self, PersonsNotificationPreference.fields.personId) + val notificationEvent = new StringFieldValue(self, PersonsNotificationPreference.fields.notificationEvent) + val notificationMethod = new StringFieldValue(self, PersonsNotificationPreference.fields.notificationMethod) + val createdOn = new NullableDateTimeFieldValue(self, PersonsNotificationPreference.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, PersonsNotificationPreference.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, PersonsNotificationPreference.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, PersonsNotificationPreference.fields.updatedBy) + } +} + +object PersonsNotificationPreference extends StorableObject[PersonsNotificationPreference] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "PERSONS_NOTIFICATION_PREFERENCES" + + object fields extends FieldsObject { + val prefId = new IntDatabaseField(self, "PREF_ID") + @NullableInDatabase + val personId = new IntDatabaseField(self, "PERSON_ID") + @NullableInDatabase + val notificationEvent = new StringDatabaseField(self, "NOTIFICATION_EVENT", 25) + @NullableInDatabase + val notificationMethod = new StringDatabaseField(self, "NOTIFICATION_METHOD", 25) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.prefId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsRecurringDonation.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsRecurringDonation.scala new file mode 100644 index 00000000..69bab1e8 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsRecurringDonation.scala @@ -0,0 +1,37 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class PersonsRecurringDonation extends StorableClass(PersonsRecurringDonation) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, PersonsRecurringDonation.fields.rowId) + val personId = new IntFieldValue(self, PersonsRecurringDonation.fields.personId) + val fundId = new IntFieldValue(self, PersonsRecurringDonation.fields.fundId) + val amountInCents = new DoubleFieldValue(self, PersonsRecurringDonation.fields.amountInCents) + val createdOn = new NullableDateTimeFieldValue(self, PersonsRecurringDonation.fields.createdOn) + val embryonic = new NullableBooleanFieldValue(self, PersonsRecurringDonation.fields.embryonic) + } +} + +object PersonsRecurringDonation extends StorableObject[PersonsRecurringDonation] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "PERSONS_RECURRING_DONATIONS" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + val personId = new IntDatabaseField(self, "PERSON_ID") + val fundId = new IntDatabaseField(self, "FUND_ID") + val amountInCents = new DoubleDatabaseField(self, "AMOUNT_IN_CENTS") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val embryonic = new NullableBooleanDatabaseField(self, "EMBRYONIC") + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsTemp.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsTemp.scala new file mode 100644 index 00000000..79a08cdb --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsTemp.scala @@ -0,0 +1,173 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class PersonsTemp extends StorableClass(PersonsTemp) { + override object values extends ValuesObject { + val personId = new IntFieldValue(self, PersonsTemp.fields.personId) + val nameFirst = new NullableStringFieldValue(self, PersonsTemp.fields.nameFirst) + val nameMiddleInitial = new NullableStringFieldValue(self, PersonsTemp.fields.nameMiddleInitial) + val nameLast = new NullableStringFieldValue(self, PersonsTemp.fields.nameLast) + val namePrefix = new NullableStringFieldValue(self, PersonsTemp.fields.namePrefix) + val nameSuffix = new NullableStringFieldValue(self, PersonsTemp.fields.nameSuffix) + val gender = new NullableStringFieldValue(self, PersonsTemp.fields.gender) + val dob = new NullableDateTimeFieldValue(self, PersonsTemp.fields.dob) + val email = new NullableStringFieldValue(self, PersonsTemp.fields.email) + val parentEmail = new NullableStringFieldValue(self, PersonsTemp.fields.parentEmail) + val addr1 = new NullableStringFieldValue(self, PersonsTemp.fields.addr1) + val addr2 = new NullableStringFieldValue(self, PersonsTemp.fields.addr2) + val addr3 = new NullableStringFieldValue(self, PersonsTemp.fields.addr3) + val city = new NullableStringFieldValue(self, PersonsTemp.fields.city) + val state = new NullableStringFieldValue(self, PersonsTemp.fields.state) + val zip = new NullableStringFieldValue(self, PersonsTemp.fields.zip) + val country = new NullableStringFieldValue(self, PersonsTemp.fields.country) + val phonePrimary = new NullableStringFieldValue(self, PersonsTemp.fields.phonePrimary) + val phonePrimaryType = new NullableStringFieldValue(self, PersonsTemp.fields.phonePrimaryType) + val phoneAlternate = new NullableStringFieldValue(self, PersonsTemp.fields.phoneAlternate) + val phoneAlternateType = new NullableStringFieldValue(self, PersonsTemp.fields.phoneAlternateType) + val emerg1Name = new NullableStringFieldValue(self, PersonsTemp.fields.emerg1Name) + val emerg1Relation = new NullableStringFieldValue(self, PersonsTemp.fields.emerg1Relation) + val emerg1PhonePrimary = new NullableStringFieldValue(self, PersonsTemp.fields.emerg1PhonePrimary) + val emerg1PhoneAlternate = new NullableStringFieldValue(self, PersonsTemp.fields.emerg1PhoneAlternate) + val emerg2Name = new NullableStringFieldValue(self, PersonsTemp.fields.emerg2Name) + val emerg2Relation = new NullableStringFieldValue(self, PersonsTemp.fields.emerg2Relation) + val emerg2PhonePrimary = new NullableStringFieldValue(self, PersonsTemp.fields.emerg2PhonePrimary) + val emerg2PhoneAlternate = new NullableStringFieldValue(self, PersonsTemp.fields.emerg2PhoneAlternate) + val allergies = new NullableStringFieldValue(self, PersonsTemp.fields.allergies) + val medications = new NullableStringFieldValue(self, PersonsTemp.fields.medications) + val specialNeeds = new NullableStringFieldValue(self, PersonsTemp.fields.specialNeeds) + val badMail = new NullableBooleanFieldValue(self, PersonsTemp.fields.badMail) + val deceased = new NullableBooleanFieldValue(self, PersonsTemp.fields.deceased) + val doNotCall = new NullableBooleanFieldValue(self, PersonsTemp.fields.doNotCall) + val doNotEmail = new NullableBooleanFieldValue(self, PersonsTemp.fields.doNotEmail) + val doNotMail = new NullableBooleanFieldValue(self, PersonsTemp.fields.doNotMail) + val occupation = new NullableStringFieldValue(self, PersonsTemp.fields.occupation) + val employer = new NullableStringFieldValue(self, PersonsTemp.fields.employer) + val matchingGifts = new NullableStringFieldValue(self, PersonsTemp.fields.matchingGifts) + val citizenship = new NullableStringFieldValue(self, PersonsTemp.fields.citizenship) + val ethnicity = new NullableStringFieldValue(self, PersonsTemp.fields.ethnicity) + val language = new NullableStringFieldValue(self, PersonsTemp.fields.language) + val referralSource = new NullableStringFieldValue(self, PersonsTemp.fields.referralSource) + val sailingExp = new NullableStringFieldValue(self, PersonsTemp.fields.sailingExp) + val organization = new NullableStringFieldValue(self, PersonsTemp.fields.organization) + val orgContact = new NullableStringFieldValue(self, PersonsTemp.fields.orgContact) + val student = new NullableBooleanFieldValue(self, PersonsTemp.fields.student) + val school = new NullableStringFieldValue(self, PersonsTemp.fields.school) + val createdOn = new NullableDateTimeFieldValue(self, PersonsTemp.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, PersonsTemp.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, PersonsTemp.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, PersonsTemp.fields.updatedBy) + val ethnicityOther = new NullableStringFieldValue(self, PersonsTemp.fields.ethnicityOther) + val referralOther = new NullableStringFieldValue(self, PersonsTemp.fields.referralOther) + val allowSignouts = new NullableBooleanFieldValue(self, PersonsTemp.fields.allowSignouts) + val sendAlert = new NullableBooleanFieldValue(self, PersonsTemp.fields.sendAlert) + val temp = new StringFieldValue(self, PersonsTemp.fields.temp) + val personType = new NullableDoubleFieldValue(self, PersonsTemp.fields.personType) + val emerg1PhonePrimaryType = new NullableStringFieldValue(self, PersonsTemp.fields.emerg1PhonePrimaryType) + val emerg1PhoneAlternateType = new NullableStringFieldValue(self, PersonsTemp.fields.emerg1PhoneAlternateType) + val emerg2PhonePrimaryType = new NullableStringFieldValue(self, PersonsTemp.fields.emerg2PhonePrimaryType) + val emerg2PhoneAlternateType = new NullableStringFieldValue(self, PersonsTemp.fields.emerg2PhoneAlternateType) + val badPhone = new NullableBooleanFieldValue(self, PersonsTemp.fields.badPhone) + val badEmail = new NullableBooleanFieldValue(self, PersonsTemp.fields.badEmail) + val military = new NullableStringFieldValue(self, PersonsTemp.fields.military) + val reducedLunch = new NullableBooleanFieldValue(self, PersonsTemp.fields.reducedLunch) + val pwHash = new NullableStringFieldValue(self, PersonsTemp.fields.pwHash) + val incomeLevel = new NullableDoubleFieldValue(self, PersonsTemp.fields.incomeLevel) + val newReturning = new NullableBooleanFieldValue(self, PersonsTemp.fields.newReturning) + val swimProof = new NullableDoubleFieldValue(self, PersonsTemp.fields.swimProof) + val oldFundraisingGreeting = new NullableStringFieldValue(self, PersonsTemp.fields.oldFundraisingGreeting) + val oldPhoneWork = new NullableStringFieldValue(self, PersonsTemp.fields.oldPhoneWork) + val languageOther = new NullableStringFieldValue(self, PersonsTemp.fields.languageOther) + } +} + +object PersonsTemp extends StorableObject[PersonsTemp] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "PERSONS_TEMP" + + object fields extends FieldsObject { + val personId = new IntDatabaseField(self, "PERSON_ID") + val nameFirst = new NullableStringDatabaseField(self, "NAME_FIRST", 100) + val nameMiddleInitial = new NullableStringDatabaseField(self, "NAME_MIDDLE_INITIAL", 5) + val nameLast = new NullableStringDatabaseField(self, "NAME_LAST", 100) + val namePrefix = new NullableStringDatabaseField(self, "NAME_PREFIX", 50) + val nameSuffix = new NullableStringDatabaseField(self, "NAME_SUFFIX", 50) + val gender = new NullableStringDatabaseField(self, "GENDER", 1) + val dob = new NullableDateTimeDatabaseField(self, "DOB") + val email = new NullableStringDatabaseField(self, "EMAIL", 100) + val parentEmail = new NullableStringDatabaseField(self, "PARENT_EMAIL", 100) + val addr1 = new NullableStringDatabaseField(self, "ADDR_1", 200) + val addr2 = new NullableStringDatabaseField(self, "ADDR_2", 200) + val addr3 = new NullableStringDatabaseField(self, "ADDR_3", 200) + val city = new NullableStringDatabaseField(self, "CITY", 50) + val state = new NullableStringDatabaseField(self, "STATE", 50) + val zip = new NullableStringDatabaseField(self, "ZIP", 15) + val country = new NullableStringDatabaseField(self, "COUNTRY", 50) + val phonePrimary = new NullableStringDatabaseField(self, "PHONE_PRIMARY", 100) + val phonePrimaryType = new NullableStringDatabaseField(self, "PHONE_PRIMARY_TYPE", 50) + val phoneAlternate = new NullableStringDatabaseField(self, "PHONE_ALTERNATE", 30) + val phoneAlternateType = new NullableStringDatabaseField(self, "PHONE_ALTERNATE_TYPE", 50) + val emerg1Name = new NullableStringDatabaseField(self, "EMERG1_NAME", 200) + val emerg1Relation = new NullableStringDatabaseField(self, "EMERG1_RELATION", 50) + val emerg1PhonePrimary = new NullableStringDatabaseField(self, "EMERG1_PHONE_PRIMARY", 100) + val emerg1PhoneAlternate = new NullableStringDatabaseField(self, "EMERG1_PHONE_ALTERNATE", 100) + val emerg2Name = new NullableStringDatabaseField(self, "EMERG2_NAME", 200) + val emerg2Relation = new NullableStringDatabaseField(self, "EMERG2_RELATION", 50) + val emerg2PhonePrimary = new NullableStringDatabaseField(self, "EMERG2_PHONE_PRIMARY", 100) + val emerg2PhoneAlternate = new NullableStringDatabaseField(self, "EMERG2_PHONE_ALTERNATE", 100) + val allergies = new NullableStringDatabaseField(self, "ALLERGIES", 4000) + val medications = new NullableStringDatabaseField(self, "MEDICATIONS", 4000) + val specialNeeds = new NullableStringDatabaseField(self, "SPECIAL_NEEDS", 4000) + val badMail = new NullableBooleanDatabaseField(self, "BAD_MAIL") + val deceased = new NullableBooleanDatabaseField(self, "DECEASED") + val doNotCall = new NullableBooleanDatabaseField(self, "DO_NOT_CALL") + val doNotEmail = new NullableBooleanDatabaseField(self, "DO_NOT_EMAIL") + val doNotMail = new NullableBooleanDatabaseField(self, "DO_NOT_MAIL") + val occupation = new NullableStringDatabaseField(self, "OCCUPATION", 100) + val employer = new NullableStringDatabaseField(self, "EMPLOYER", 100) + val matchingGifts = new NullableStringDatabaseField(self, "MATCHING_GIFTS", 1) + val citizenship = new NullableStringDatabaseField(self, "CITIZENSHIP", 100) + val ethnicity = new NullableStringDatabaseField(self, "ETHNICITY", 100) + val language = new NullableStringDatabaseField(self, "LANGUAGE", 100) + val referralSource = new NullableStringDatabaseField(self, "REFERRAL_SOURCE", 200) + val sailingExp = new NullableStringDatabaseField(self, "SAILING_EXP", 100) + val organization = new NullableStringDatabaseField(self, "ORGANIZATION", 100) + val orgContact = new NullableStringDatabaseField(self, "ORG_CONTACT", 200) + val student = new NullableBooleanDatabaseField(self, "STUDENT") + val school = new NullableStringDatabaseField(self, "SCHOOL", 100) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val ethnicityOther = new NullableStringDatabaseField(self, "ETHNICITY_OTHER", 100) + val referralOther = new NullableStringDatabaseField(self, "REFERRAL_OTHER", 100) + val allowSignouts = new NullableBooleanDatabaseField(self, "ALLOW_SIGNOUTS") + val sendAlert = new NullableBooleanDatabaseField(self, "SEND_ALERT") + val temp = new StringDatabaseField(self, "TEMP", 1) + val personType = new NullableDoubleDatabaseField(self, "PERSON_TYPE") + val emerg1PhonePrimaryType = new NullableStringDatabaseField(self, "EMERG1_PHONE_PRIMARY_TYPE", 50) + val emerg1PhoneAlternateType = new NullableStringDatabaseField(self, "EMERG1_PHONE_ALTERNATE_TYPE", 50) + val emerg2PhonePrimaryType = new NullableStringDatabaseField(self, "EMERG2_PHONE_PRIMARY_TYPE", 50) + val emerg2PhoneAlternateType = new NullableStringDatabaseField(self, "EMERG2_PHONE_ALTERNATE_TYPE", 50) + val badPhone = new NullableBooleanDatabaseField(self, "BAD_PHONE") + val badEmail = new NullableBooleanDatabaseField(self, "BAD_EMAIL") + val military = new NullableStringDatabaseField(self, "MILITARY", 50) + val reducedLunch = new NullableBooleanDatabaseField(self, "REDUCED_LUNCH") + val pwHash = new NullableStringDatabaseField(self, "PW_HASH", 100) + val incomeLevel = new NullableDoubleDatabaseField(self, "INCOME_LEVEL") + val newReturning = new NullableBooleanDatabaseField(self, "NEW_RETURNING") + val swimProof = new NullableDoubleDatabaseField(self, "SWIM_PROOF") + val oldFundraisingGreeting = new NullableStringDatabaseField(self, "OLD_FUNDRAISING_GREETING", 300) + val oldPhoneWork = new NullableStringDatabaseField(self, "OLD_PHONE_WORK", 50) + val languageOther = new NullableStringDatabaseField(self, "LANGUAGE_OTHER", 200) + } + + def primaryKey: IntDatabaseField = fields.personId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsToDelete.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsToDelete.scala new file mode 100644 index 00000000..86fe1b0b --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/PersonsToDelete.scala @@ -0,0 +1,33 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class PersonsToDelete extends StorableClass(PersonsToDelete) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, PersonsToDelete.fields.rowId) + val personId = new IntFieldValue(self, PersonsToDelete.fields.personId) + val mergedInto = new DoubleFieldValue(self, PersonsToDelete.fields.mergedInto) + } +} + +object PersonsToDelete extends StorableObject[PersonsToDelete] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "PERSONS_TO_DELETE" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + @NullableInDatabase + val personId = new IntDatabaseField(self, "PERSON_ID") + @NullableInDatabase + val mergedInto = new DoubleDatabaseField(self, "MERGED_INTO") + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Preference.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Preference.scala new file mode 100644 index 00000000..a45b2284 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Preference.scala @@ -0,0 +1,47 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class Preference extends StorableClass(Preference) { + override object values extends ValuesObject { + val prefId = new IntFieldValue(self, Preference.fields.prefId) + val dataType = new DoubleFieldValue(self, Preference.fields.dataType) + val createdOn = new DateTimeFieldValue(self, Preference.fields.createdOn) + val createdBy = new StringFieldValue(self, Preference.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, Preference.fields.updatedOn) + val updatedBy = new StringFieldValue(self, Preference.fields.updatedBy) + val prefAlias = new StringFieldValue(self, Preference.fields.prefAlias) + val prefDescription = new StringFieldValue(self, Preference.fields.prefDescription) + } +} + +object Preference extends StorableObject[Preference] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "PREFERENCES" + + object fields extends FieldsObject { + val prefId = new IntDatabaseField(self, "PREF_ID") + @NullableInDatabase + val dataType = new DoubleDatabaseField(self, "DATA_TYPE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val prefAlias = new StringDatabaseField(self, "PREF_ALIAS", 50) + @NullableInDatabase + val prefDescription = new StringDatabaseField(self, "PREF_DESCRIPTION", 1000) + } + + def primaryKey: IntDatabaseField = fields.prefId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ProgramType.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ProgramType.scala index 0e18a134..c0dda0a0 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ProgramType.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ProgramType.scala @@ -1,33 +1,48 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{IntFieldValue, StringFieldValue} -import com.coleji.neptune.Storable.Fields.{IntDatabaseField, StringDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class ProgramType extends StorableClass(ProgramType) { - object values extends ValuesObject { + override object values extends ValuesObject { val programId = new IntFieldValue(self, ProgramType.fields.programId) val programName = new StringFieldValue(self, ProgramType.fields.programName) + val displayOrder = new DoubleFieldValue(self, ProgramType.fields.displayOrder) + val active = new NullableBooleanFieldValue(self, ProgramType.fields.active) + val createdOn = new DateTimeFieldValue(self, ProgramType.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, ProgramType.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, ProgramType.fields.updatedOn) + val updatedBy = new StringFieldValue(self, ProgramType.fields.updatedBy) + val colorDisplay = new StringFieldValue(self, ProgramType.fields.colorDisplay) } } object ProgramType extends StorableObject[ProgramType] { - val entityName: String = "PROGRAM_TYPES" - override val useRuntimeFieldnamesForJson: Boolean = true + override val entityName: String = "PROGRAM_TYPES" + object fields extends FieldsObject { val programId = new IntDatabaseField(self, "PROGRAM_ID") val programName = new StringDatabaseField(self, "PROGRAM_NAME", 100) + @NullableInDatabase + val displayOrder = new DoubleDatabaseField(self, "DISPLAY_ORDER") + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase + val colorDisplay = new StringDatabaseField(self, "COLOR_DISPLAY", 4000) } def primaryKey: IntDatabaseField = fields.programId - - object specialIDs { - val PROGRAM_TYPE_ID_AP: Int = 1 - val PROGRAM_TYPE_ID_JP: Int = 2 - val PROGRAM_TYPE_ID_UAP: Int = 3 - val PROGRAM_TYPE_ID_HS: Int = 4 - } - } \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Promotion.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Promotion.scala new file mode 100644 index 00000000..d96e029d --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Promotion.scala @@ -0,0 +1,49 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class Promotion extends StorableClass(Promotion) { + override object values extends ValuesObject { + val promoId = new IntFieldValue(self, Promotion.fields.promoId) + val promoType = new NullableStringFieldValue(self, Promotion.fields.promoType) + val promoAmount = new NullableDoubleFieldValue(self, Promotion.fields.promoAmount) + val redemptionCode = new NullableStringFieldValue(self, Promotion.fields.redemptionCode) + val startDate = new NullableDateTimeFieldValue(self, Promotion.fields.startDate) + val endDate = new NullableDateTimeFieldValue(self, Promotion.fields.endDate) + val createdOn = new DateTimeFieldValue(self, Promotion.fields.createdOn) + val createdBy = new StringFieldValue(self, Promotion.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, Promotion.fields.updatedOn) + val updatedBy = new StringFieldValue(self, Promotion.fields.updatedBy) + } +} + +object Promotion extends StorableObject[Promotion] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "PROMOTIONS" + + object fields extends FieldsObject { + val promoId = new IntDatabaseField(self, "PROMO_ID") + val promoType = new NullableStringDatabaseField(self, "PROMO_TYPE", 1) + val promoAmount = new NullableDoubleDatabaseField(self, "PROMO_AMOUNT") + val redemptionCode = new NullableStringDatabaseField(self, "REDEMPTION_CODE", 100) + val startDate = new NullableDateTimeDatabaseField(self, "START_DATE") + val endDate = new NullableDateTimeDatabaseField(self, "END_DATE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.promoId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/RaCz.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/RaCz.scala new file mode 100644 index 00000000..8b88d9d3 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/RaCz.scala @@ -0,0 +1,47 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class RaCz extends StorableClass(RaCz) { + override object values extends ValuesObject { + val eventId = new IntFieldValue(self, RaCz.fields.eventId) + val signoutId = new IntFieldValue(self, RaCz.fields.signoutId) + val eventDatetime = new DateTimeFieldValue(self, RaCz.fields.eventDatetime) + val createdOn = new DateTimeFieldValue(self, RaCz.fields.createdOn) + val createdBy = new StringFieldValue(self, RaCz.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, RaCz.fields.updatedOn) + val updatedBy = new StringFieldValue(self, RaCz.fields.updatedBy) + val raCz = new StringFieldValue(self, RaCz.fields.raCz) + } +} + +object RaCz extends StorableObject[RaCz] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "RA_CZ" + + object fields extends FieldsObject { + val eventId = new IntDatabaseField(self, "EVENT_ID") + val signoutId = new IntDatabaseField(self, "SIGNOUT_ID") + @NullableInDatabase + val eventDatetime = new DateTimeDatabaseField(self, "EVENT_DATETIME") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase + val raCz = new StringDatabaseField(self, "RA_CZ", 1) + } + + def primaryKey: IntDatabaseField = fields.eventId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Rating.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Rating.scala index f03d7241..99215ebc 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Rating.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Rating.scala @@ -1,63 +1,63 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{IntFieldValue, NullableIntFieldValue, StringFieldValue} -import com.coleji.neptune.Storable.Fields.{IntDatabaseField, NullableIntDatabaseField, StringDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable -import org.sailcbi.APIServer.Entities.{MagicIds, NullableInDatabase} +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class Rating extends StorableClass(Rating) { override object references extends ReferencesObject { - val boats = new Initializable[IndexedSeq[BoatRating]] - val programs = new Initializable[IndexedSeq[RatingProgram]] + val boats = new InitializableSeq[BoatRating, IndexedSeq[BoatRating]] + val programs = new InitializableSeq[RatingProgram, IndexedSeq[RatingProgram]] } - object values extends ValuesObject { + override object values extends ValuesObject { val ratingId = new IntFieldValue(self, Rating.fields.ratingId) val ratingName = new StringFieldValue(self, Rating.fields.ratingName) + val createdOn = new DateTimeFieldValue(self, Rating.fields.createdOn) + val createdBy = new StringFieldValue(self, Rating.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, Rating.fields.updatedOn) + val updatedBy = new StringFieldValue(self, Rating.fields.updatedBy) + val displayOrder = new DoubleFieldValue(self, Rating.fields.displayOrder) + val active = new NullableBooleanFieldValue(self, Rating.fields.active) val overriddenBy = new NullableIntFieldValue(self, Rating.fields.overriddenBy) + val testMinCrew = new NullableDoubleFieldValue(self, Rating.fields.testMinCrew) + val testMaxCrew = new NullableDoubleFieldValue(self, Rating.fields.testMaxCrew) + val testable = new NullableBooleanFieldValue(self, Rating.fields.testable) + val ratingCategory = new StringFieldValue(self, Rating.fields.ratingCategory) } } object Rating extends StorableObject[Rating] { - val entityName: String = "RATINGS" override val useRuntimeFieldnamesForJson: Boolean = true + override val entityName: String = "RATINGS" + object fields extends FieldsObject { val ratingId = new IntDatabaseField(self, "RATING_ID") @NullableInDatabase val ratingName = new StringDatabaseField(self, "RATING_NAME", 100) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase + val displayOrder = new DoubleDatabaseField(self, "DISPLAY_ORDER") + val active = new NullableBooleanDatabaseField(self, "ACTIVE") val overriddenBy = new NullableIntDatabaseField(self, "OVERRIDDEN_BY") + val testMinCrew = new NullableDoubleDatabaseField(self, "TEST_MIN_CREW") + val testMaxCrew = new NullableDoubleDatabaseField(self, "TEST_MAX_CREW") + val testable = new NullableBooleanDatabaseField(self, "TESTABLE") + @NullableInDatabase + val ratingCategory = new StringDatabaseField(self, "RATING_CATEGORY", 1) } def primaryKey: IntDatabaseField = fields.ratingId - - object specialIDs { - val RATING_ID_KAYAK: Int = 4 - val RATING_ID_SUP: Int = 28 - val RATING_ID_RIGGING: Int = 61 - val RATING_ID_VERBAL: Int = 62 - val RATING_ID_MERC_GREEN: Int = 261 - } - - // TODO: move to logic - def getAllHigherRatingsThanRating(ratings: List[Rating], targetRatingId: Int): List[Rating] = { - val targetRating: Rating = ratings.filter(_.values.ratingId.get == targetRatingId).head - targetRating.values.overriddenBy.get match { - case Some(i: Int) => targetRating :: getAllHigherRatingsThanRating(ratings, i) - case None => targetRating :: Nil - } - } - - def ratingIsUsableWithMembership(ratingId: Int, membershipTypeId: Int): Boolean = membershipTypeId match { - case MagicIds.MEMBERSHIP_TYPES.WICKED_BASIC_30_DAY => ratingId match { - case Rating.specialIDs.RATING_ID_KAYAK => true - case Rating.specialIDs.RATING_ID_SUP => true - case Rating.specialIDs.RATING_ID_RIGGING => true - case Rating.specialIDs.RATING_ID_VERBAL => true - case Rating.specialIDs.RATING_ID_MERC_GREEN => true - case _ => false - } - case _ => true - } } \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/RatingChange.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/RatingChange.scala index b5266d4b..a857a045 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/RatingChange.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/RatingChange.scala @@ -3,9 +3,13 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class RatingChange extends StorableClass(RatingChange) { - object values extends ValuesObject { + override object values extends ValuesObject { val changeId = new IntFieldValue(self, RatingChange.fields.changeId) val personId = new IntFieldValue(self, RatingChange.fields.personId) val ratingId = new IntFieldValue(self, RatingChange.fields.ratingId) @@ -14,23 +18,33 @@ class RatingChange extends StorableClass(RatingChange) { val changedBy = new NullableStringFieldValue(self, RatingChange.fields.changedBy) val changedDate = new DateTimeFieldValue(self, RatingChange.fields.changedDate) val comments = new NullableStringFieldValue(self, RatingChange.fields.comments) + val createdOn = new DateTimeFieldValue(self, RatingChange.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, RatingChange.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, RatingChange.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, RatingChange.fields.updatedBy) } } object RatingChange extends StorableObject[RatingChange] { override val useRuntimeFieldnamesForJson: Boolean = true - val entityName: String = "RATING_CHANGES" + override val entityName: String = "RATING_CHANGES" object fields extends FieldsObject { val changeId = new IntDatabaseField(self, "CHANGE_ID") val personId = new IntDatabaseField(self, "PERSON_ID") val ratingId = new IntDatabaseField(self, "RATING_ID") val programId = new IntDatabaseField(self, "PROGRAM_ID") + @NullableInDatabase val action = new StringDatabaseField(self, "ACTION", 1) val changedBy = new NullableStringDatabaseField(self, "CHANGED_BY", 50) val changedDate = new DateTimeDatabaseField(self, "CHANGED_DATE") val comments = new NullableStringDatabaseField(self, "COMMENTS", 4000) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) } def primaryKey: IntDatabaseField = fields.changeId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/RatingProgram.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/RatingProgram.scala index d79cdd80..21126db2 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/RatingProgram.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/RatingProgram.scala @@ -3,24 +3,42 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class RatingProgram extends StorableClass(RatingProgram) { - object values extends ValuesObject { + override object values extends ValuesObject { val assignId = new IntFieldValue(self, RatingProgram.fields.assignId) val ratingId = new IntFieldValue(self, RatingProgram.fields.ratingId) val programId = new IntFieldValue(self, RatingProgram.fields.programId) + val createdOn = new DateTimeFieldValue(self, RatingProgram.fields.createdOn) + val createdBy = new StringFieldValue(self, RatingProgram.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, RatingProgram.fields.updatedOn) + val updatedBy = new StringFieldValue(self, RatingProgram.fields.updatedBy) } } object RatingProgram extends StorableObject[RatingProgram] { override val useRuntimeFieldnamesForJson: Boolean = true - val entityName: String = "RATINGS_PROGRAMS" + override val entityName: String = "RATINGS_PROGRAMS" object fields extends FieldsObject { val assignId = new IntDatabaseField(self, "ASSIGN_ID") + @NullableInDatabase val ratingId = new IntDatabaseField(self, "RATING_ID") + @NullableInDatabase val programId = new IntDatabaseField(self, "PROGRAM_ID") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) } def primaryKey: IntDatabaseField = fields.assignId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ResetPwReq.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ResetPwReq.scala new file mode 100644 index 00000000..98803de2 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ResetPwReq.scala @@ -0,0 +1,46 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class ResetPwReq extends StorableClass(ResetPwReq) { + override object values extends ValuesObject { + val reqId = new IntFieldValue(self, ResetPwReq.fields.reqId) + val personUser = new StringFieldValue(self, ResetPwReq.fields.personUser) + val reqHash = new StringFieldValue(self, ResetPwReq.fields.reqHash) + val used = new NullableStringFieldValue(self, ResetPwReq.fields.used) + val createdOn = new DateTimeFieldValue(self, ResetPwReq.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, ResetPwReq.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, ResetPwReq.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, ResetPwReq.fields.updatedBy) + val email = new StringFieldValue(self, ResetPwReq.fields.email) + } +} + +object ResetPwReq extends StorableObject[ResetPwReq] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "RESET_PW_REQS" + + object fields extends FieldsObject { + val reqId = new IntDatabaseField(self, "REQ_ID") + val personUser = new StringDatabaseField(self, "PERSON_USER", 1) + val reqHash = new StringDatabaseField(self, "REQ_HASH", 50) + val used = new NullableStringDatabaseField(self, "USED", 1) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase + val email = new StringDatabaseField(self, "EMAIL", 200) + } + + def primaryKey: IntDatabaseField = fields.reqId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Restriction.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Restriction.scala new file mode 100644 index 00000000..dfe61e8b --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Restriction.scala @@ -0,0 +1,42 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class Restriction extends StorableClass(Restriction) { + override object values extends ValuesObject { + val restrictionId = new IntFieldValue(self, Restriction.fields.restrictionId) + val restrictionText = new StringFieldValue(self, Restriction.fields.restrictionText) + val createdOn = new DateTimeFieldValue(self, Restriction.fields.createdOn) + val createdBy = new StringFieldValue(self, Restriction.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, Restriction.fields.updatedOn) + val updatedBy = new StringFieldValue(self, Restriction.fields.updatedBy) + } +} + +object Restriction extends StorableObject[Restriction] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "RESTRICTIONS" + + object fields extends FieldsObject { + val restrictionId = new IntDatabaseField(self, "RESTRICTION_ID") + @NullableInDatabase + val restrictionText = new StringDatabaseField(self, "RESTRICTION_TEXT", 1000) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.restrictionId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ScheduledDowntime.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ScheduledDowntime.scala new file mode 100644 index 00000000..e52614ef --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ScheduledDowntime.scala @@ -0,0 +1,31 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class ScheduledDowntime extends StorableClass(ScheduledDowntime) { + override object values extends ValuesObject { + val scheduleId = new IntFieldValue(self, ScheduledDowntime.fields.scheduleId) + val startDatetime = new NullableDateTimeFieldValue(self, ScheduledDowntime.fields.startDatetime) + val endDatetime = new NullableDateTimeFieldValue(self, ScheduledDowntime.fields.endDatetime) + } +} + +object ScheduledDowntime extends StorableObject[ScheduledDowntime] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "SCHEDULED_DOWNTIME" + + object fields extends FieldsObject { + val scheduleId = new IntDatabaseField(self, "SCHEDULE_ID") + val startDatetime = new NullableDateTimeDatabaseField(self, "START_DATETIME") + val endDatetime = new NullableDateTimeDatabaseField(self, "END_DATETIME") + } + + def primaryKey: IntDatabaseField = fields.scheduleId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SendgridSuppressionActivity.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SendgridSuppressionActivity.scala new file mode 100644 index 00000000..f56967eb --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SendgridSuppressionActivity.scala @@ -0,0 +1,46 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class SendgridSuppressionActivity extends StorableClass(SendgridSuppressionActivity) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, SendgridSuppressionActivity.fields.rowId) + val occurredDatetime = new DateTimeFieldValue(self, SendgridSuppressionActivity.fields.occurredDatetime) + val email = new StringFieldValue(self, SendgridSuppressionActivity.fields.email) + val reason = new StringFieldValue(self, SendgridSuppressionActivity.fields.reason) + val status = new StringFieldValue(self, SendgridSuppressionActivity.fields.status) + val ip = new NullableStringFieldValue(self, SendgridSuppressionActivity.fields.ip) + val `type` = new StringFieldValue(self, SendgridSuppressionActivity.fields.`type`) + val createdOn = new NullableDateTimeFieldValue(self, SendgridSuppressionActivity.fields.createdOn) + } +} + +object SendgridSuppressionActivity extends StorableObject[SendgridSuppressionActivity] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "SENDGRID_SUPPRESSION_ACTIVITY" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + @NullableInDatabase + val occurredDatetime = new DateTimeDatabaseField(self, "OCCURRED_DATETIME") + @NullableInDatabase + val email = new StringDatabaseField(self, "EMAIL", 500) + @NullableInDatabase + val reason = new StringDatabaseField(self, "REASON", 4000) + @NullableInDatabase + val status = new StringDatabaseField(self, "STATUS", 50) + val ip = new NullableStringDatabaseField(self, "IP", 30) + @NullableInDatabase + val `type` = new StringDatabaseField(self, "TYPE", 15) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SessionBlacklist.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SessionBlacklist.scala new file mode 100644 index 00000000..0eb5ed55 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SessionBlacklist.scala @@ -0,0 +1,41 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class SessionBlacklist extends StorableClass(SessionBlacklist) { + override object values extends ValuesObject { + val blacklistId = new IntFieldValue(self, SessionBlacklist.fields.blacklistId) + val sessionId = new StringFieldValue(self, SessionBlacklist.fields.sessionId) + val blacklistDatetime = new DateTimeFieldValue(self, SessionBlacklist.fields.blacklistDatetime) + val createdOn = new NullableDateTimeFieldValue(self, SessionBlacklist.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, SessionBlacklist.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, SessionBlacklist.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, SessionBlacklist.fields.updatedBy) + } +} + +object SessionBlacklist extends StorableObject[SessionBlacklist] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "SESSION_BLACKLIST" + + object fields extends FieldsObject { + val blacklistId = new IntDatabaseField(self, "BLACKLIST_ID") + @NullableInDatabase + val sessionId = new StringDatabaseField(self, "SESSION_ID", 50) + @NullableInDatabase + val blacklistDatetime = new DateTimeDatabaseField(self, "BLACKLIST_DATETIME") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.blacklistId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SessionKey.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SessionKey.scala new file mode 100644 index 00000000..4d166a4d --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SessionKey.scala @@ -0,0 +1,48 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class SessionKey extends StorableClass(SessionKey) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, SessionKey.fields.rowId) + val apexSession = new StringFieldValue(self, SessionKey.fields.apexSession) + val remoteKey = new StringFieldValue(self, SessionKey.fields.remoteKey) + val username = new StringFieldValue(self, SessionKey.fields.username) + val createdOn = new DateTimeFieldValue(self, SessionKey.fields.createdOn) + val createdBy = new StringFieldValue(self, SessionKey.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, SessionKey.fields.updatedOn) + val updatedBy = new StringFieldValue(self, SessionKey.fields.updatedBy) + } +} + +object SessionKey extends StorableObject[SessionKey] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "SESSION_KEYS" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + @NullableInDatabase + val apexSession = new StringDatabaseField(self, "APEX_SESSION", 100) + @NullableInDatabase + val remoteKey = new StringDatabaseField(self, "REMOTE_KEY", 100) + @NullableInDatabase + val username = new StringDatabaseField(self, "USERNAME", 50) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartApplGc.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartApplGc.scala new file mode 100644 index 00000000..db45095d --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartApplGc.scala @@ -0,0 +1,41 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class ShoppingCartApplGc extends StorableClass(ShoppingCartApplGc) { + override object values extends ValuesObject { + val certId = new IntFieldValue(self, ShoppingCartApplGc.fields.certId) + val orderId = new IntFieldValue(self, ShoppingCartApplGc.fields.orderId) + val amount = new NullableDoubleFieldValue(self, ShoppingCartApplGc.fields.amount) + val createdOn = new NullableDateTimeFieldValue(self, ShoppingCartApplGc.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, ShoppingCartApplGc.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, ShoppingCartApplGc.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, ShoppingCartApplGc.fields.updatedBy) + val remainingValue = new NullableDoubleFieldValue(self, ShoppingCartApplGc.fields.remainingValue) + } +} + +object ShoppingCartApplGc extends StorableObject[ShoppingCartApplGc] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "SHOPPING_CART_APPL_GC" + + object fields extends FieldsObject { + val certId = new IntDatabaseField(self, "CERT_ID") + val orderId = new IntDatabaseField(self, "ORDER_ID") + val amount = new NullableDoubleDatabaseField(self, "AMOUNT") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val remainingValue = new NullableDoubleDatabaseField(self, "REMAINING_VALUE") + } + + def primaryKey: IntDatabaseField = fields.certId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartDonation.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartDonation.scala new file mode 100644 index 00000000..69ac87aa --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartDonation.scala @@ -0,0 +1,49 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class ShoppingCartDonation extends StorableClass(ShoppingCartDonation) { + override object values extends ValuesObject { + val itemId = new IntFieldValue(self, ShoppingCartDonation.fields.itemId) + val amount = new DoubleFieldValue(self, ShoppingCartDonation.fields.amount) + val createdOn = new DateTimeFieldValue(self, ShoppingCartDonation.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, ShoppingCartDonation.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, ShoppingCartDonation.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, ShoppingCartDonation.fields.updatedBy) + val orderId = new IntFieldValue(self, ShoppingCartDonation.fields.orderId) + val fundId = new IntFieldValue(self, ShoppingCartDonation.fields.fundId) + val initiativeId = new IntFieldValue(self, ShoppingCartDonation.fields.initiativeId) + val inMemoryOf = new NullableStringFieldValue(self, ShoppingCartDonation.fields.inMemoryOf) + val isAnon = new NullableBooleanFieldValue(self, ShoppingCartDonation.fields.isAnon) + } +} + +object ShoppingCartDonation extends StorableObject[ShoppingCartDonation] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "SHOPPING_CART_DONATIONS" + + object fields extends FieldsObject { + val itemId = new IntDatabaseField(self, "ITEM_ID") + val amount = new DoubleDatabaseField(self, "AMOUNT") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val orderId = new IntDatabaseField(self, "ORDER_ID") + val fundId = new IntDatabaseField(self, "FUND_ID") + val initiativeId = new IntDatabaseField(self, "INITIATIVE_ID") + val inMemoryOf = new NullableStringDatabaseField(self, "IN_MEMORY_OF", 500) + val isAnon = new NullableBooleanDatabaseField(self, "IS_ANON") + } + + def primaryKey: IntDatabaseField = fields.itemId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartGc.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartGc.scala new file mode 100644 index 00000000..d370cdf4 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartGc.scala @@ -0,0 +1,75 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class ShoppingCartGc extends StorableClass(ShoppingCartGc) { + override object values extends ValuesObject { + val itemId = new IntFieldValue(self, ShoppingCartGc.fields.itemId) + val membershipTypeId = new NullableIntFieldValue(self, ShoppingCartGc.fields.membershipTypeId) + val orderId = new NullableIntFieldValue(self, ShoppingCartGc.fields.orderId) + val recipientEmail = new NullableStringFieldValue(self, ShoppingCartGc.fields.recipientEmail) + val certId = new NullableIntFieldValue(self, ShoppingCartGc.fields.certId) + val readyToBuy = new NullableStringFieldValue(self, ShoppingCartGc.fields.readyToBuy) + val createdOn = new DateTimeFieldValue(self, ShoppingCartGc.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, ShoppingCartGc.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, ShoppingCartGc.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, ShoppingCartGc.fields.updatedBy) + val recipientNameFirst = new NullableStringFieldValue(self, ShoppingCartGc.fields.recipientNameFirst) + val recipientNameLast = new NullableStringFieldValue(self, ShoppingCartGc.fields.recipientNameLast) + val recipientAddr1 = new NullableStringFieldValue(self, ShoppingCartGc.fields.recipientAddr1) + val recipientAddr2 = new NullableStringFieldValue(self, ShoppingCartGc.fields.recipientAddr2) + val recipientCity = new NullableStringFieldValue(self, ShoppingCartGc.fields.recipientCity) + val recipientState = new NullableStringFieldValue(self, ShoppingCartGc.fields.recipientState) + val recipientZip = new NullableStringFieldValue(self, ShoppingCartGc.fields.recipientZip) + val deliveryMethod = new StringFieldValue(self, ShoppingCartGc.fields.deliveryMethod) + val message = new NullableStringFieldValue(self, ShoppingCartGc.fields.message) + val whoseAddr = new NullableStringFieldValue(self, ShoppingCartGc.fields.whoseAddr) + val purchasePrice = new NullableDoubleFieldValue(self, ShoppingCartGc.fields.purchasePrice) + val value = new NullableDoubleFieldValue(self, ShoppingCartGc.fields.value) + val whoseEmail = new NullableStringFieldValue(self, ShoppingCartGc.fields.whoseEmail) + val discountInstanceId = new NullableIntFieldValue(self, ShoppingCartGc.fields.discountInstanceId) + } +} + +object ShoppingCartGc extends StorableObject[ShoppingCartGc] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "SHOPPING_CART_GCS" + + object fields extends FieldsObject { + val itemId = new IntDatabaseField(self, "ITEM_ID") + val membershipTypeId = new NullableIntDatabaseField(self, "MEMBERSHIP_TYPE_ID") + val orderId = new NullableIntDatabaseField(self, "ORDER_ID") + val recipientEmail = new NullableStringDatabaseField(self, "RECIPIENT_EMAIL", 500) + val certId = new NullableIntDatabaseField(self, "CERT_ID") + val readyToBuy = new NullableStringDatabaseField(self, "READY_TO_BUY", 1) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val recipientNameFirst = new NullableStringDatabaseField(self, "RECIPIENT_NAME_FIRST", 200) + val recipientNameLast = new NullableStringDatabaseField(self, "RECIPIENT_NAME_LAST", 200) + val recipientAddr1 = new NullableStringDatabaseField(self, "RECIPIENT_ADDR_1", 500) + val recipientAddr2 = new NullableStringDatabaseField(self, "RECIPIENT_ADDR_2", 500) + val recipientCity = new NullableStringDatabaseField(self, "RECIPIENT_CITY", 100) + val recipientState = new NullableStringDatabaseField(self, "RECIPIENT_STATE", 5) + val recipientZip = new NullableStringDatabaseField(self, "RECIPIENT_ZIP", 20) + val deliveryMethod = new StringDatabaseField(self, "DELIVERY_METHOD", 1) + val message = new NullableStringDatabaseField(self, "MESSAGE", -1) + val whoseAddr = new NullableStringDatabaseField(self, "WHOSE_ADDR", 1) + val purchasePrice = new NullableDoubleDatabaseField(self, "PURCHASE_PRICE") + val value = new NullableDoubleDatabaseField(self, "VALUE") + val whoseEmail = new NullableStringDatabaseField(self, "WHOSE_EMAIL", 1) + val discountInstanceId = new NullableIntDatabaseField(self, "DISCOUNT_INSTANCE_ID") + } + + def primaryKey: IntDatabaseField = fields.itemId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartGuestPriv.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartGuestPriv.scala new file mode 100644 index 00000000..00133336 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartGuestPriv.scala @@ -0,0 +1,45 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class ShoppingCartGuestPriv extends StorableClass(ShoppingCartGuestPriv) { + override object values extends ValuesObject { + val itemId = new IntFieldValue(self, ShoppingCartGuestPriv.fields.itemId) + val orderId = new NullableIntFieldValue(self, ShoppingCartGuestPriv.fields.orderId) + val price = new NullableDoubleFieldValue(self, ShoppingCartGuestPriv.fields.price) + val createdOn = new DateTimeFieldValue(self, ShoppingCartGuestPriv.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, ShoppingCartGuestPriv.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, ShoppingCartGuestPriv.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, ShoppingCartGuestPriv.fields.updatedBy) + val scMembershipId = new NullableIntFieldValue(self, ShoppingCartGuestPriv.fields.scMembershipId) + val realMembershipId = new NullableIntFieldValue(self, ShoppingCartGuestPriv.fields.realMembershipId) + } +} + +object ShoppingCartGuestPriv extends StorableObject[ShoppingCartGuestPriv] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "SHOPPING_CART_GUEST_PRIVS" + + object fields extends FieldsObject { + val itemId = new IntDatabaseField(self, "ITEM_ID") + val orderId = new NullableIntDatabaseField(self, "ORDER_ID") + val price = new NullableDoubleDatabaseField(self, "PRICE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val scMembershipId = new NullableIntDatabaseField(self, "SC_MEMBERSHIP_ID") + val realMembershipId = new NullableIntDatabaseField(self, "REAL_MEMBERSHIP_ID") + } + + def primaryKey: IntDatabaseField = fields.itemId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartJpc.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartJpc.scala new file mode 100644 index 00000000..edeadf3f --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartJpc.scala @@ -0,0 +1,53 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class ShoppingCartJpc extends StorableClass(ShoppingCartJpc) { + override object values extends ValuesObject { + val itemId = new IntFieldValue(self, ShoppingCartJpc.fields.itemId) + val personId = new NullableIntFieldValue(self, ShoppingCartJpc.fields.personId) + val orderId = new NullableIntFieldValue(self, ShoppingCartJpc.fields.orderId) + val instanceId = new NullableIntFieldValue(self, ShoppingCartJpc.fields.instanceId) + val readyToBuy = new NullableStringFieldValue(self, ShoppingCartJpc.fields.readyToBuy) + val createdOn = new DateTimeFieldValue(self, ShoppingCartJpc.fields.createdOn) + val createdBy = new StringFieldValue(self, ShoppingCartJpc.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, ShoppingCartJpc.fields.updatedOn) + val updatedBy = new StringFieldValue(self, ShoppingCartJpc.fields.updatedBy) + val price = new NullableDoubleFieldValue(self, ShoppingCartJpc.fields.price) + val discountInstanceId = new NullableIntFieldValue(self, ShoppingCartJpc.fields.discountInstanceId) + val discountAmt = new NullableDoubleFieldValue(self, ShoppingCartJpc.fields.discountAmt) + } +} + +object ShoppingCartJpc extends StorableObject[ShoppingCartJpc] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "SHOPPING_CART_JPC" + + object fields extends FieldsObject { + val itemId = new IntDatabaseField(self, "ITEM_ID") + val personId = new NullableIntDatabaseField(self, "PERSON_ID") + val orderId = new NullableIntDatabaseField(self, "ORDER_ID") + val instanceId = new NullableIntDatabaseField(self, "INSTANCE_ID") + val readyToBuy = new NullableStringDatabaseField(self, "READY_TO_BUY", 1) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val price = new NullableDoubleDatabaseField(self, "PRICE") + val discountInstanceId = new NullableIntDatabaseField(self, "DISCOUNT_INSTANCE_ID") + val discountAmt = new NullableDoubleDatabaseField(self, "DISCOUNT_AMT") + } + + def primaryKey: IntDatabaseField = fields.itemId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartMembership.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartMembership.scala new file mode 100644 index 00000000..159fc6b3 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartMembership.scala @@ -0,0 +1,59 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class ShoppingCartMembership extends StorableClass(ShoppingCartMembership) { + override object values extends ValuesObject { + val itemId = new IntFieldValue(self, ShoppingCartMembership.fields.itemId) + val membershipTypeId = new NullableIntFieldValue(self, ShoppingCartMembership.fields.membershipTypeId) + val price = new DoubleFieldValue(self, ShoppingCartMembership.fields.price) + val createdOn = new DateTimeFieldValue(self, ShoppingCartMembership.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, ShoppingCartMembership.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, ShoppingCartMembership.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, ShoppingCartMembership.fields.updatedBy) + val personId = new IntFieldValue(self, ShoppingCartMembership.fields.personId) + val readyToBuy = new StringFieldValue(self, ShoppingCartMembership.fields.readyToBuy) + val orderId = new IntFieldValue(self, ShoppingCartMembership.fields.orderId) + val specNeedsApproved = new NullableBooleanFieldValue(self, ShoppingCartMembership.fields.specNeedsApproved) + val discountAmt = new NullableDoubleFieldValue(self, ShoppingCartMembership.fields.discountAmt) + val discountId = new NullableIntFieldValue(self, ShoppingCartMembership.fields.discountId) + val discountInstanceId = new NullableIntFieldValue(self, ShoppingCartMembership.fields.discountInstanceId) + val hasJpClassReservations = new NullableBooleanFieldValue(self, ShoppingCartMembership.fields.hasJpClassReservations) + val requestedDiscountInstanceId = new NullableIntFieldValue(self, ShoppingCartMembership.fields.requestedDiscountInstanceId) + } +} + +object ShoppingCartMembership extends StorableObject[ShoppingCartMembership] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "SHOPPING_CART_MEMBERSHIPS" + + object fields extends FieldsObject { + val itemId = new IntDatabaseField(self, "ITEM_ID") + val membershipTypeId = new NullableIntDatabaseField(self, "MEMBERSHIP_TYPE_ID") + val price = new DoubleDatabaseField(self, "PRICE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val personId = new IntDatabaseField(self, "PERSON_ID") + val readyToBuy = new StringDatabaseField(self, "READY_TO_BUY", 1) + val orderId = new IntDatabaseField(self, "ORDER_ID") + val specNeedsApproved = new NullableBooleanDatabaseField(self, "SPEC_NEEDS_APPROVED") + val discountAmt = new NullableDoubleDatabaseField(self, "DISCOUNT_AMT") + val discountId = new NullableIntDatabaseField(self, "DISCOUNT_ID") + val discountInstanceId = new NullableIntDatabaseField(self, "DISCOUNT_INSTANCE_ID") + val hasJpClassReservations = new NullableBooleanDatabaseField(self, "HAS_JP_CLASS_RESERVATIONS") + val requestedDiscountInstanceId = new NullableIntDatabaseField(self, "REQUESTED_DISCOUNT_INSTANCE_ID") + } + + def primaryKey: IntDatabaseField = fields.itemId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartWaiver.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartWaiver.scala new file mode 100644 index 00000000..591218f0 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/ShoppingCartWaiver.scala @@ -0,0 +1,43 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class ShoppingCartWaiver extends StorableClass(ShoppingCartWaiver) { + override object values extends ValuesObject { + val itemId = new IntFieldValue(self, ShoppingCartWaiver.fields.itemId) + val orderId = new IntFieldValue(self, ShoppingCartWaiver.fields.orderId) + val personId = new NullableIntFieldValue(self, ShoppingCartWaiver.fields.personId) + val createdOn = new DateTimeFieldValue(self, ShoppingCartWaiver.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, ShoppingCartWaiver.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, ShoppingCartWaiver.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, ShoppingCartWaiver.fields.updatedBy) + val price = new DoubleFieldValue(self, ShoppingCartWaiver.fields.price) + } +} + +object ShoppingCartWaiver extends StorableObject[ShoppingCartWaiver] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "SHOPPING_CART_WAIVERS" + + object fields extends FieldsObject { + val itemId = new IntDatabaseField(self, "ITEM_ID") + val orderId = new IntDatabaseField(self, "ORDER_ID") + val personId = new NullableIntDatabaseField(self, "PERSON_ID") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val price = new DoubleDatabaseField(self, "PRICE") + } + + def primaryKey: IntDatabaseField = fields.itemId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Signout.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Signout.scala index 4a48090f..b6b8d2da 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Signout.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Signout.scala @@ -3,16 +3,19 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class Signout extends StorableClass(Signout) { override object references extends ReferencesObject { val skipper = new Initializable[Person] - val crew = new Initializable[IndexedSeq[SignoutCrew]] - val tests = new Initializable[IndexedSeq[SignoutTest]] + val crew = new InitializableSeq[SignoutCrew, IndexedSeq[SignoutCrew]] + val tests = new InitializableSeq[SignoutTest, IndexedSeq[SignoutTest]] } - object values extends ValuesObject { + override object values extends ValuesObject { val signoutId = new IntFieldValue(self, Signout.fields.signoutId) val programId = new IntFieldValue(self, Signout.fields.programId) val boatId = new IntFieldValue(self, Signout.fields.boatId) @@ -23,25 +26,31 @@ class Signout extends StorableClass(Signout) { val testRatingId = new NullableIntFieldValue(self, Signout.fields.testRatingId) val testResult = new NullableStringFieldValue(self, Signout.fields.testResult) val signoutType = new StringFieldValue(self, Signout.fields.signoutType) + val createdOn = new NullableDateTimeFieldValue(self, Signout.fields.createdOn) + val createdBy = new StringFieldValue(self, Signout.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, Signout.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, Signout.fields.updatedBy) val didCapsize = new NullableBooleanFieldValue(self, Signout.fields.didCapsize) val isQueued = new BooleanFieldValue(self, Signout.fields.isQueued) val queueOrder = new NullableDoubleFieldValue(self, Signout.fields.queueOrder) val personId = new NullableIntFieldValue(self, Signout.fields.personId) val comments = new NullableStringFieldValue(self, Signout.fields.comments) + val oldCrewCount = new NullableDoubleFieldValue(self, Signout.fields.oldCrewCount) + val oldYouthCount = new NullableDoubleFieldValue(self, Signout.fields.oldYouthCount) + val oldStudentCount = new NullableDoubleFieldValue(self, Signout.fields.oldStudentCount) + val oldRunAground = new NullableBooleanFieldValue(self, Signout.fields.oldRunAground) + val oldFirstName = new NullableStringFieldValue(self, Signout.fields.oldFirstName) + val oldLastName = new NullableStringFieldValue(self, Signout.fields.oldLastName) val jpAttendanceId = new NullableIntFieldValue(self, Signout.fields.jpAttendanceId) val apAttendanceId = new NullableIntFieldValue(self, Signout.fields.apAttendanceId) val hullNumber = new NullableStringFieldValue(self, Signout.fields.hullNumber) - val createdOn = new NullableDateTimeFieldValue(self, Signout.fields.createdOn) - val createdBy = new NullableStringFieldValue(self, Signout.fields.createdBy) - val updatedOn = new NullableDateTimeFieldValue(self, Signout.fields.updatedOn) - val updatedBy = new NullableStringFieldValue(self, Signout.fields.updatedBy) } } object Signout extends StorableObject[Signout] { override val useRuntimeFieldnamesForJson: Boolean = true - val entityName: String = "SIGNOUTS" + override val entityName: String = "SIGNOUTS" object fields extends FieldsObject { val signoutId = new IntDatabaseField(self, "SIGNOUT_ID") @@ -54,18 +63,26 @@ object Signout extends StorableObject[Signout] { val testRatingId = new NullableIntDatabaseField(self, "TEST_RATING_ID") val testResult = new NullableStringDatabaseField(self, "TEST_RESULT", 10) val signoutType = new StringDatabaseField(self, "SIGNOUT_TYPE", 1) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) val didCapsize = new NullableBooleanDatabaseField(self, "DID_CAPSIZE") - val isQueued = new BooleanDatabaseField(self, "IS_QUEUED") + val isQueued = new BooleanDatabaseField(self, "IS_QUEUED", false) val queueOrder = new NullableDoubleDatabaseField(self, "QUEUE_ORDER") val personId = new NullableIntDatabaseField(self, "PERSON_ID") val comments = new NullableStringDatabaseField(self, "COMMENTS", 4000) + val oldCrewCount = new NullableDoubleDatabaseField(self, "OLD_CREW_COUNT") + val oldYouthCount = new NullableDoubleDatabaseField(self, "OLD_YOUTH_COUNT") + val oldStudentCount = new NullableDoubleDatabaseField(self, "OLD_STUDENT_COUNT") + val oldRunAground = new NullableBooleanDatabaseField(self, "OLD_RUN_AGROUND") + val oldFirstName = new NullableStringDatabaseField(self, "OLD_FIRST_NAME", 500) + val oldLastName = new NullableStringDatabaseField(self, "OLD_LAST_NAME", 500) val jpAttendanceId = new NullableIntDatabaseField(self, "JP_ATTENDANCE_ID") val apAttendanceId = new NullableIntDatabaseField(self, "AP_ATTENDANCE_ID") val hullNumber = new NullableStringDatabaseField(self, "HULL_NUMBER", 15) - val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") - val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) - val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") - val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) } def primaryKey: IntDatabaseField = fields.signoutId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SignoutCrew.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SignoutCrew.scala index c7021796..934ee7a6 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SignoutCrew.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SignoutCrew.scala @@ -3,20 +3,29 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions import com.coleji.neptune.Storable.FieldValues._ import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class SignoutCrew extends StorableClass(SignoutCrew) { override object references extends ReferencesObject { val person = new Initializable[Person] } - object values extends ValuesObject { + override object values extends ValuesObject { val crewId = new IntFieldValue(self, SignoutCrew.fields.crewId) val cardNum = new NullableStringFieldValue(self, SignoutCrew.fields.cardNum) val signoutId = new IntFieldValue(self, SignoutCrew.fields.signoutId) + val createdOn = new NullableDateTimeFieldValue(self, SignoutCrew.fields.createdOn) + val createdBy = new StringFieldValue(self, SignoutCrew.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, SignoutCrew.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, SignoutCrew.fields.updatedBy) val personId = new NullableIntFieldValue(self, SignoutCrew.fields.personId) val startActive = new NullableDateTimeFieldValue(self, SignoutCrew.fields.startActive) val endActive = new NullableDateTimeFieldValue(self, SignoutCrew.fields.endActive) + val oldFirstName = new NullableStringFieldValue(self, SignoutCrew.fields.oldFirstName) + val oldLastName = new NullableStringFieldValue(self, SignoutCrew.fields.oldLastName) val jpAttendanceId = new NullableIntFieldValue(self, SignoutCrew.fields.jpAttendanceId) val apAttendanceId = new NullableIntFieldValue(self, SignoutCrew.fields.apAttendanceId) } @@ -24,15 +33,23 @@ class SignoutCrew extends StorableClass(SignoutCrew) { object SignoutCrew extends StorableObject[SignoutCrew] { override val useRuntimeFieldnamesForJson: Boolean = true - val entityName: String = "SIGNOUT_CREW" + + override val entityName: String = "SIGNOUT_CREW" object fields extends FieldsObject { val crewId = new IntDatabaseField(self, "CREW_ID") val cardNum = new NullableStringDatabaseField(self, "CARD_NUM", 50) val signoutId = new IntDatabaseField(self, "SIGNOUT_ID") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) val personId = new NullableIntDatabaseField(self, "PERSON_ID") val startActive = new NullableDateTimeDatabaseField(self, "START_ACTIVE") val endActive = new NullableDateTimeDatabaseField(self, "END_ACTIVE") + val oldFirstName = new NullableStringDatabaseField(self, "OLD_FIRST_NAME", 100) + val oldLastName = new NullableStringDatabaseField(self, "OLD_LAST_NAME", 100) val jpAttendanceId = new NullableIntDatabaseField(self, "JP_ATTENDANCE_ID") val apAttendanceId = new NullableIntDatabaseField(self, "AP_ATTENDANCE_ID") } diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SignoutTest.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SignoutTest.scala index 5dc6186b..8bfff84c 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SignoutTest.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SignoutTest.scala @@ -1,9 +1,12 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{IntFieldValue, NullableStringFieldValue} -import com.coleji.neptune.Storable.Fields.{IntDatabaseField, NullableStringDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class SignoutTest extends StorableClass(SignoutTest) { override object references extends ReferencesObject { @@ -11,20 +14,24 @@ class SignoutTest extends StorableClass(SignoutTest) { val person = new Initializable[Person] } - object values extends ValuesObject { + override object values extends ValuesObject { val testId = new IntFieldValue(self, SignoutTest.fields.testId) val signoutId = new IntFieldValue(self, SignoutTest.fields.signoutId) val personId = new IntFieldValue(self, SignoutTest.fields.personId) val ratingId = new IntFieldValue(self, SignoutTest.fields.ratingId) val testResult = new NullableStringFieldValue(self, SignoutTest.fields.testResult) val instructorString = new NullableStringFieldValue(self, SignoutTest.fields.instructorString) + val createdOn = new DateTimeFieldValue(self, SignoutTest.fields.createdOn) + val createdBy = new StringFieldValue(self, SignoutTest.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, SignoutTest.fields.updatedOn) + val updatedBy = new StringFieldValue(self, SignoutTest.fields.updatedBy) } } object SignoutTest extends StorableObject[SignoutTest] { override val useRuntimeFieldnamesForJson: Boolean = true - val entityName: String = "SIGNOUTS_TESTS" + override val entityName: String = "SIGNOUTS_TESTS" object fields extends FieldsObject { val testId = new IntDatabaseField(self, "TEST_ID") @@ -33,6 +40,14 @@ object SignoutTest extends StorableObject[SignoutTest] { val ratingId = new IntDatabaseField(self, "RATING_ID") val testResult = new NullableStringDatabaseField(self, "TEST_RESULT", 1) val instructorString = new NullableStringDatabaseField(self, "INSTRUCTOR_STRING", 100) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 100) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 100) } def primaryKey: IntDatabaseField = fields.testId diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SignoutsDebug.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SignoutsDebug.scala new file mode 100644 index 00000000..0736768f --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SignoutsDebug.scala @@ -0,0 +1,89 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class SignoutsDebug extends StorableClass(SignoutsDebug) { + override object values extends ValuesObject { + val signoutId = new NullableIntFieldValue(self, SignoutsDebug.fields.signoutId) + val programId = new IntFieldValue(self, SignoutsDebug.fields.programId) + val boatId = new IntFieldValue(self, SignoutsDebug.fields.boatId) + val cardNum = new NullableStringFieldValue(self, SignoutsDebug.fields.cardNum) + val sailNumber = new NullableStringFieldValue(self, SignoutsDebug.fields.sailNumber) + val signoutDatetime = new NullableDateTimeFieldValue(self, SignoutsDebug.fields.signoutDatetime) + val signinDatetime = new NullableDateTimeFieldValue(self, SignoutsDebug.fields.signinDatetime) + val testRatingId = new NullableIntFieldValue(self, SignoutsDebug.fields.testRatingId) + val testResult = new NullableStringFieldValue(self, SignoutsDebug.fields.testResult) + val signoutType = new StringFieldValue(self, SignoutsDebug.fields.signoutType) + val createdOn = new DateTimeFieldValue(self, SignoutsDebug.fields.createdOn) + val createdBy = new StringFieldValue(self, SignoutsDebug.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, SignoutsDebug.fields.updatedOn) + val updatedBy = new StringFieldValue(self, SignoutsDebug.fields.updatedBy) + val didCapsize = new NullableBooleanFieldValue(self, SignoutsDebug.fields.didCapsize) + val isQueued = new BooleanFieldValue(self, SignoutsDebug.fields.isQueued) + val queueOrder = new NullableDoubleFieldValue(self, SignoutsDebug.fields.queueOrder) + val personId = new NullableIntFieldValue(self, SignoutsDebug.fields.personId) + val comments = new NullableStringFieldValue(self, SignoutsDebug.fields.comments) + val oldCrewCount = new NullableDoubleFieldValue(self, SignoutsDebug.fields.oldCrewCount) + val oldYouthCount = new NullableDoubleFieldValue(self, SignoutsDebug.fields.oldYouthCount) + val oldStudentCount = new NullableDoubleFieldValue(self, SignoutsDebug.fields.oldStudentCount) + val oldRunAground = new NullableBooleanFieldValue(self, SignoutsDebug.fields.oldRunAground) + val oldFirstName = new NullableStringFieldValue(self, SignoutsDebug.fields.oldFirstName) + val oldLastName = new NullableStringFieldValue(self, SignoutsDebug.fields.oldLastName) + val jpAttendanceId = new NullableIntFieldValue(self, SignoutsDebug.fields.jpAttendanceId) + val apAttendanceId = new NullableIntFieldValue(self, SignoutsDebug.fields.apAttendanceId) + val snapshotType = new NullableStringFieldValue(self, SignoutsDebug.fields.snapshotType) + val snapshotDatetime = new NullableDateTimeFieldValue(self, SignoutsDebug.fields.snapshotDatetime) + val snapshotId = new IntFieldValue(self, SignoutsDebug.fields.snapshotId) + } +} + +object SignoutsDebug extends StorableObject[SignoutsDebug] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "SIGNOUTS_DEBUG" + + object fields extends FieldsObject { + val signoutId = new NullableIntDatabaseField(self, "SIGNOUT_ID") + val programId = new IntDatabaseField(self, "PROGRAM_ID") + val boatId = new IntDatabaseField(self, "BOAT_ID") + val cardNum = new NullableStringDatabaseField(self, "CARD_NUM", 50) + val sailNumber = new NullableStringDatabaseField(self, "SAIL_NUMBER", 15) + val signoutDatetime = new NullableDateTimeDatabaseField(self, "SIGNOUT_DATETIME") + val signinDatetime = new NullableDateTimeDatabaseField(self, "SIGNIN_DATETIME") + val testRatingId = new NullableIntDatabaseField(self, "TEST_RATING_ID") + val testResult = new NullableStringDatabaseField(self, "TEST_RESULT", 10) + val signoutType = new StringDatabaseField(self, "SIGNOUT_TYPE", 1) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val didCapsize = new NullableBooleanDatabaseField(self, "DID_CAPSIZE") + val isQueued = new BooleanDatabaseField(self, "IS_QUEUED", false) + val queueOrder = new NullableDoubleDatabaseField(self, "QUEUE_ORDER") + val personId = new NullableIntDatabaseField(self, "PERSON_ID") + val comments = new NullableStringDatabaseField(self, "COMMENTS", 4000) + val oldCrewCount = new NullableDoubleDatabaseField(self, "OLD_CREW_COUNT") + val oldYouthCount = new NullableDoubleDatabaseField(self, "OLD_YOUTH_COUNT") + val oldStudentCount = new NullableDoubleDatabaseField(self, "OLD_STUDENT_COUNT") + val oldRunAground = new NullableBooleanDatabaseField(self, "OLD_RUN_AGROUND") + val oldFirstName = new NullableStringDatabaseField(self, "OLD_FIRST_NAME", 500) + val oldLastName = new NullableStringDatabaseField(self, "OLD_LAST_NAME", 500) + val jpAttendanceId = new NullableIntDatabaseField(self, "JP_ATTENDANCE_ID") + val apAttendanceId = new NullableIntDatabaseField(self, "AP_ATTENDANCE_ID") + val snapshotType = new NullableStringDatabaseField(self, "SNAPSHOT_TYPE", 1) + val snapshotDatetime = new NullableDateTimeDatabaseField(self, "SNAPSHOT_DATETIME") + val snapshotId = new IntDatabaseField(self, "SNAPSHOT_ID") + } + + def primaryKey: IntDatabaseField = fields.snapshotId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SpecialNeed.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SpecialNeed.scala new file mode 100644 index 00000000..2d401499 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SpecialNeed.scala @@ -0,0 +1,57 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class SpecialNeed extends StorableClass(SpecialNeed) { + override object values extends ValuesObject { + val specId = new IntFieldValue(self, SpecialNeed.fields.specId) + val personId = new NullableIntFieldValue(self, SpecialNeed.fields.personId) + val membershipTypeId = new NullableIntFieldValue(self, SpecialNeed.fields.membershipTypeId) + val status = new NullableStringFieldValue(self, SpecialNeed.fields.status) + val overridePrice = new NullableDoubleFieldValue(self, SpecialNeed.fields.overridePrice) + val authOn = new NullableDateTimeFieldValue(self, SpecialNeed.fields.authOn) + val authBy = new NullableStringFieldValue(self, SpecialNeed.fields.authBy) + val createdOn = new DateTimeFieldValue(self, SpecialNeed.fields.createdOn) + val createdBy = new StringFieldValue(self, SpecialNeed.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, SpecialNeed.fields.updatedOn) + val updatedBy = new StringFieldValue(self, SpecialNeed.fields.updatedBy) + val description = new NullableStringFieldValue(self, SpecialNeed.fields.description) + val contactMethod = new NullableStringFieldValue(self, SpecialNeed.fields.contactMethod) + val phone = new NullableStringFieldValue(self, SpecialNeed.fields.phone) + } +} + +object SpecialNeed extends StorableObject[SpecialNeed] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "SPECIAL_NEEDS" + + object fields extends FieldsObject { + val specId = new IntDatabaseField(self, "SPEC_ID") + val personId = new NullableIntDatabaseField(self, "PERSON_ID") + val membershipTypeId = new NullableIntDatabaseField(self, "MEMBERSHIP_TYPE_ID") + val status = new NullableStringDatabaseField(self, "STATUS", 1) + val overridePrice = new NullableDoubleDatabaseField(self, "OVERRIDE_PRICE") + val authOn = new NullableDateTimeDatabaseField(self, "AUTH_ON") + val authBy = new NullableStringDatabaseField(self, "AUTH_BY", 50) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val description = new NullableStringDatabaseField(self, "DESCRIPTION", -1) + val contactMethod = new NullableStringDatabaseField(self, "CONTACT_METHOD", 50) + val phone = new NullableStringDatabaseField(self, "PHONE", 20) + } + + def primaryKey: IntDatabaseField = fields.specId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/State.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/State.scala new file mode 100644 index 00000000..be5f19d1 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/State.scala @@ -0,0 +1,33 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class State extends StorableClass(State) { + override object values extends ValuesObject { + val stateId = new IntFieldValue(self, State.fields.stateId) + val abbrev = new StringFieldValue(self, State.fields.abbrev) + val stateName = new StringFieldValue(self, State.fields.stateName) + } +} + +object State extends StorableObject[State] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "STATES" + + object fields extends FieldsObject { + val stateId = new IntDatabaseField(self, "STATE_ID") + @NullableInDatabase + val abbrev = new StringDatabaseField(self, "ABBREV", 5) + @NullableInDatabase + val stateName = new StringDatabaseField(self, "STATE_NAME", 70) + } + + def primaryKey: IntDatabaseField = fields.stateId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/StripeChargeAttLog.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/StripeChargeAttLog.scala new file mode 100644 index 00000000..b9e53e3e --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/StripeChargeAttLog.scala @@ -0,0 +1,55 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class StripeChargeAttLog extends StorableClass(StripeChargeAttLog) { + override object values extends ValuesObject { + val attemptId = new IntFieldValue(self, StripeChargeAttLog.fields.attemptId) + val attemptDatetime = new NullableDateTimeFieldValue(self, StripeChargeAttLog.fields.attemptDatetime) + val tokenId = new NullableIntFieldValue(self, StripeChargeAttLog.fields.tokenId) + val cartTotal = new NullableDoubleFieldValue(self, StripeChargeAttLog.fields.cartTotal) + val result = new NullableStringFieldValue(self, StripeChargeAttLog.fields.result) + val createdOn = new NullableDateTimeFieldValue(self, StripeChargeAttLog.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, StripeChargeAttLog.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, StripeChargeAttLog.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, StripeChargeAttLog.fields.updatedBy) + val errorType = new NullableStringFieldValue(self, StripeChargeAttLog.fields.errorType) + val errorMsg = new NullableStringFieldValue(self, StripeChargeAttLog.fields.errorMsg) + val chargeNumber = new NullableStringFieldValue(self, StripeChargeAttLog.fields.chargeNumber) + val chargeTotal = new NullableDoubleFieldValue(self, StripeChargeAttLog.fields.chargeTotal) + val orderId = new NullableIntFieldValue(self, StripeChargeAttLog.fields.orderId) + val paymentIntentRowId = new NullableIntFieldValue(self, StripeChargeAttLog.fields.paymentIntentRowId) + } +} + +object StripeChargeAttLog extends StorableObject[StripeChargeAttLog] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "STRIPE_CHARGE_ATT_LOG" + + object fields extends FieldsObject { + val attemptId = new IntDatabaseField(self, "ATTEMPT_ID") + val attemptDatetime = new NullableDateTimeDatabaseField(self, "ATTEMPT_DATETIME") + val tokenId = new NullableIntDatabaseField(self, "TOKEN_ID") + val cartTotal = new NullableDoubleDatabaseField(self, "CART_TOTAL") + val result = new NullableStringDatabaseField(self, "RESULT", 1) + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val errorType = new NullableStringDatabaseField(self, "ERROR_TYPE", 100) + val errorMsg = new NullableStringDatabaseField(self, "ERROR_MSG", 4000) + val chargeNumber = new NullableStringDatabaseField(self, "CHARGE_NUMBER", 100) + val chargeTotal = new NullableDoubleDatabaseField(self, "CHARGE_TOTAL") + val orderId = new NullableIntDatabaseField(self, "ORDER_ID") + val paymentIntentRowId = new NullableIntDatabaseField(self, "PAYMENT_INTENT_ROW_ID") + } + + def primaryKey: IntDatabaseField = fields.attemptId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/StripeToken.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/StripeToken.scala new file mode 100644 index 00000000..911173cc --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/StripeToken.scala @@ -0,0 +1,45 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class StripeToken extends StorableClass(StripeToken) { + override object values extends ValuesObject { + val tokenId = new IntFieldValue(self, StripeToken.fields.tokenId) + val token = new StringFieldValue(self, StripeToken.fields.token) + val orderId = new NullableIntFieldValue(self, StripeToken.fields.orderId) + val createdDatetime = new DateTimeFieldValue(self, StripeToken.fields.createdDatetime) + val cardLastDigits = new NullableStringFieldValue(self, StripeToken.fields.cardLastDigits) + val cardExpMonth = new NullableDoubleFieldValue(self, StripeToken.fields.cardExpMonth) + val cardExpYear = new NullableDoubleFieldValue(self, StripeToken.fields.cardExpYear) + val cardZip = new NullableStringFieldValue(self, StripeToken.fields.cardZip) + val active = new BooleanFieldValue(self, StripeToken.fields.active) + } +} + +object StripeToken extends StorableObject[StripeToken] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "STRIPE_TOKENS" + + object fields extends FieldsObject { + val tokenId = new IntDatabaseField(self, "TOKEN_ID") + @NullableInDatabase + val token = new StringDatabaseField(self, "TOKEN", 50) + val orderId = new NullableIntDatabaseField(self, "ORDER_ID") + @NullableInDatabase + val createdDatetime = new DateTimeDatabaseField(self, "CREATED_DATETIME") + val cardLastDigits = new NullableStringDatabaseField(self, "CARD_LAST_DIGITS", 10) + val cardExpMonth = new NullableDoubleDatabaseField(self, "CARD_EXP_MONTH") + val cardExpYear = new NullableDoubleDatabaseField(self, "CARD_EXP_YEAR") + val cardZip = new NullableStringDatabaseField(self, "CARD_ZIP", 20) + val active = new BooleanDatabaseField(self, "ACTIVE", false) + } + + def primaryKey: IntDatabaseField = fields.tokenId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Sunset.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Sunset.scala new file mode 100644 index 00000000..37ab5bbe --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Sunset.scala @@ -0,0 +1,30 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class Sunset extends StorableClass(Sunset) { + override object values extends ValuesObject { + val id = new IntFieldValue(self, Sunset.fields.id) + val sunsetDatetime = new DateTimeFieldValue(self, Sunset.fields.sunsetDatetime) + } +} + +object Sunset extends StorableObject[Sunset] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "SUNSETS" + + object fields extends FieldsObject { + val id = new IntDatabaseField(self, "ID") + @NullableInDatabase + val sunsetDatetime = new DateTimeDatabaseField(self, "SUNSET_DATETIME") + } + + def primaryKey: IntDatabaseField = fields.id +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SunsetTime.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SunsetTime.scala new file mode 100644 index 00000000..69212345 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SunsetTime.scala @@ -0,0 +1,49 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class SunsetTime extends StorableClass(SunsetTime) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, SunsetTime.fields.rowId) + val forDate = new DateTimeFieldValue(self, SunsetTime.fields.forDate) + val twilightStart = new DateTimeFieldValue(self, SunsetTime.fields.twilightStart) + val sunrise = new DateTimeFieldValue(self, SunsetTime.fields.sunrise) + val sunset = new DateTimeFieldValue(self, SunsetTime.fields.sunset) + val twilightEnd = new DateTimeFieldValue(self, SunsetTime.fields.twilightEnd) + val dayLengthSeconds = new DoubleFieldValue(self, SunsetTime.fields.dayLengthSeconds) + val sonarNoon = new DateTimeFieldValue(self, SunsetTime.fields.sonarNoon) + val nauticalTwilightStart = new DateTimeFieldValue(self, SunsetTime.fields.nauticalTwilightStart) + val nauticalTwilightEnd = new DateTimeFieldValue(self, SunsetTime.fields.nauticalTwilightEnd) + val astronomicalTwilightStart = new DateTimeFieldValue(self, SunsetTime.fields.astronomicalTwilightStart) + val astronomicalTwilightEnd = new DateTimeFieldValue(self, SunsetTime.fields.astronomicalTwilightEnd) + } +} + +object SunsetTime extends StorableObject[SunsetTime] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "SUNSET_TIMES" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + val forDate = new DateTimeDatabaseField(self, "FOR_DATE") + val twilightStart = new DateTimeDatabaseField(self, "TWILIGHT_START") + val sunrise = new DateTimeDatabaseField(self, "SUNRISE") + val sunset = new DateTimeDatabaseField(self, "SUNSET") + val twilightEnd = new DateTimeDatabaseField(self, "TWILIGHT_END") + val dayLengthSeconds = new DoubleDatabaseField(self, "DAY_LENGTH_SECONDS") + val sonarNoon = new DateTimeDatabaseField(self, "SONAR_NOON") + val nauticalTwilightStart = new DateTimeDatabaseField(self, "NAUTICAL_TWILIGHT_START") + val nauticalTwilightEnd = new DateTimeDatabaseField(self, "NAUTICAL_TWILIGHT_END") + val astronomicalTwilightStart = new DateTimeDatabaseField(self, "ASTRONOMICAL_TWILIGHT_START") + val astronomicalTwilightEnd = new DateTimeDatabaseField(self, "ASTRONOMICAL_TWILIGHT_END") + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SwimProofMethod.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SwimProofMethod.scala new file mode 100644 index 00000000..098ab4c0 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SwimProofMethod.scala @@ -0,0 +1,47 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class SwimProofMethod extends StorableClass(SwimProofMethod) { + override object values extends ValuesObject { + val methodId = new IntFieldValue(self, SwimProofMethod.fields.methodId) + val methodName = new StringFieldValue(self, SwimProofMethod.fields.methodName) + val active = new BooleanFieldValue(self, SwimProofMethod.fields.active) + val displayOrder = new DoubleFieldValue(self, SwimProofMethod.fields.displayOrder) + val createdOn = new DateTimeFieldValue(self, SwimProofMethod.fields.createdOn) + val createdBy = new StringFieldValue(self, SwimProofMethod.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, SwimProofMethod.fields.updatedOn) + val updatedBy = new StringFieldValue(self, SwimProofMethod.fields.updatedBy) + } +} + +object SwimProofMethod extends StorableObject[SwimProofMethod] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "SWIM_PROOF_METHODS" + + object fields extends FieldsObject { + val methodId = new IntDatabaseField(self, "METHOD_ID") + val methodName = new StringDatabaseField(self, "METHOD_NAME", 4000) + @NullableInDatabase + val active = new BooleanDatabaseField(self, "ACTIVE", false) + @NullableInDatabase + val displayOrder = new DoubleDatabaseField(self, "DISPLAY_ORDER") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.methodId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SymonSchedule.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SymonSchedule.scala new file mode 100644 index 00000000..6c8621cf --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/SymonSchedule.scala @@ -0,0 +1,51 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class SymonSchedule extends StorableClass(SymonSchedule) { + override object values extends ValuesObject { + val scheduleId = new IntFieldValue(self, SymonSchedule.fields.scheduleId) + val hostName = new StringFieldValue(self, SymonSchedule.fields.hostName) + val programName = new StringFieldValue(self, SymonSchedule.fields.programName) + val argString = new NullableStringFieldValue(self, SymonSchedule.fields.argString) + val freqDays = new DoubleFieldValue(self, SymonSchedule.fields.freqDays) + val createdOn = new NullableDateTimeFieldValue(self, SymonSchedule.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, SymonSchedule.fields.createdBy) + val updatedOn = new NullableDateTimeFieldValue(self, SymonSchedule.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, SymonSchedule.fields.updatedBy) + val symonVersion = new StringFieldValue(self, SymonSchedule.fields.symonVersion) + val disabled = new NullableBooleanFieldValue(self, SymonSchedule.fields.disabled) + } +} + +object SymonSchedule extends StorableObject[SymonSchedule] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "SYMON_SCHEDULE" + + object fields extends FieldsObject { + val scheduleId = new IntDatabaseField(self, "SCHEDULE_ID") + @NullableInDatabase + val hostName = new StringDatabaseField(self, "HOST_NAME", 50) + @NullableInDatabase + val programName = new StringDatabaseField(self, "PROGRAM_NAME", 50) + val argString = new NullableStringDatabaseField(self, "ARG_STRING", 250) + @NullableInDatabase + val freqDays = new DoubleDatabaseField(self, "FREQ_DAYS") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + val updatedOn = new NullableDateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + @NullableInDatabase + val symonVersion = new StringDatabaseField(self, "SYMON_VERSION", 5) + val disabled = new NullableBooleanDatabaseField(self, "DISABLED") + } + + def primaryKey: IntDatabaseField = fields.scheduleId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/TableInfo.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/TableInfo.scala new file mode 100644 index 00000000..abc7de55 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/TableInfo.scala @@ -0,0 +1,40 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class TableInfo extends StorableClass(TableInfo) { + override object values extends ValuesObject { + val tableId = new IntFieldValue(self, TableInfo.fields.tableId) + val tableName = new StringFieldValue(self, TableInfo.fields.tableName) + val biTriggerName = new NullableStringFieldValue(self, TableInfo.fields.biTriggerName) + val sequenceName = new NullableStringFieldValue(self, TableInfo.fields.sequenceName) + val pkColumn = new NullableStringFieldValue(self, TableInfo.fields.pkColumn) + val isLookup = new NullableBooleanFieldValue(self, TableInfo.fields.isLookup) + val hasPersonId = new NullableBooleanFieldValue(self, TableInfo.fields.hasPersonId) + } +} + +object TableInfo extends StorableObject[TableInfo] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "TABLE_INFO" + + object fields extends FieldsObject { + val tableId = new IntDatabaseField(self, "TABLE_ID") + @NullableInDatabase + val tableName = new StringDatabaseField(self, "TABLE_NAME", 100) + val biTriggerName = new NullableStringDatabaseField(self, "BI_TRIGGER_NAME", 100) + val sequenceName = new NullableStringDatabaseField(self, "SEQUENCE_NAME", 100) + val pkColumn = new NullableStringDatabaseField(self, "PK_COLUMN", 100) + val isLookup = new NullableBooleanDatabaseField(self, "IS_LOOKUP") + val hasPersonId = new NullableBooleanDatabaseField(self, "HAS_PERSON_ID") + } + + def primaryKey: IntDatabaseField = fields.tableId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Tag.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Tag.scala index 01e9db8f..8598e610 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Tag.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/Tag.scala @@ -1,30 +1,45 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{IntFieldValue, StringFieldValue} -import com.coleji.neptune.Storable.Fields.{IntDatabaseField, StringDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class Tag extends StorableClass(Tag) { - object values extends ValuesObject { + override object values extends ValuesObject { val tagId = new IntFieldValue(self, Tag.fields.tagId) val tagName = new StringFieldValue(self, Tag.fields.tagName) + val active = new NullableBooleanFieldValue(self, Tag.fields.active) + val displayOrder = new NullableDoubleFieldValue(self, Tag.fields.displayOrder) + val createdOn = new DateTimeFieldValue(self, Tag.fields.createdOn) + val createdBy = new StringFieldValue(self, Tag.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, Tag.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, Tag.fields.updatedBy) } } object Tag extends StorableObject[Tag] { - val entityName: String = "TAGS" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "TAGS" object fields extends FieldsObject { val tagId = new IntDatabaseField(self, "TAG_ID") @NullableInDatabase val tagName = new StringDatabaseField(self, "TAG_NAME", 100) + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + val displayOrder = new NullableDoubleDatabaseField(self, "DISPLAY_ORDER") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) } def primaryKey: IntDatabaseField = fields.tagId - - object specialIDs { - val TAG_ID_CORPORATION: Int = 5 - } - } \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/TempMakeIndice.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/TempMakeIndice.scala new file mode 100644 index 00000000..549b9703 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/TempMakeIndice.scala @@ -0,0 +1,31 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class TempMakeIndice extends StorableClass(TempMakeIndice) { + override object values extends ValuesObject { + val id = new IntFieldValue(self, TempMakeIndice.fields.id) + val tableName = new NullableStringFieldValue(self, TempMakeIndice.fields.tableName) + val fkColumn = new NullableStringFieldValue(self, TempMakeIndice.fields.fkColumn) + } +} + +object TempMakeIndice extends StorableObject[TempMakeIndice] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "TEMP_MAKE_INDICES" + + object fields extends FieldsObject { + val id = new IntDatabaseField(self, "ID") + val tableName = new NullableStringDatabaseField(self, "TABLE_NAME", 30) + val fkColumn = new NullableStringDatabaseField(self, "FK_COLUMN", 30) + } + + def primaryKey: IntDatabaseField = fields.id +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/TextFile.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/TextFile.scala new file mode 100644 index 00000000..313b6934 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/TextFile.scala @@ -0,0 +1,45 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class TextFile extends StorableClass(TextFile) { + override object values extends ValuesObject { + val fileId = new IntFieldValue(self, TextFile.fields.fileId) + val fileName = new NullableStringFieldValue(self, TextFile.fields.fileName) + val mimeType = new NullableStringFieldValue(self, TextFile.fields.mimeType) + val clobContent = new NullableStringFieldValue(self, TextFile.fields.clobContent) + val createdOn = new DateTimeFieldValue(self, TextFile.fields.createdOn) + val createdBy = new StringFieldValue(self, TextFile.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, TextFile.fields.updatedOn) + val updatedBy = new StringFieldValue(self, TextFile.fields.updatedBy) + } +} + +object TextFile extends StorableObject[TextFile] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "TEXT_FILES" + + object fields extends FieldsObject { + val fileId = new IntDatabaseField(self, "FILE_ID") + val fileName = new NullableStringDatabaseField(self, "FILE_NAME", 100) + val mimeType = new NullableStringDatabaseField(self, "MIME_TYPE", 100) + val clobContent = new NullableStringDatabaseField(self, "CLOB_CONTENT", -1) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.fileId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UapComment.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UapComment.scala new file mode 100644 index 00000000..fcefcdab --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UapComment.scala @@ -0,0 +1,42 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class UapComment extends StorableClass(UapComment) { + override object values extends ValuesObject { + val personId = new IntFieldValue(self, UapComment.fields.personId) + val uapComment = new StringFieldValue(self, UapComment.fields.uapComment) + val createdOn = new DateTimeFieldValue(self, UapComment.fields.createdOn) + val createdBy = new StringFieldValue(self, UapComment.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, UapComment.fields.updatedOn) + val updatedBy = new StringFieldValue(self, UapComment.fields.updatedBy) + } +} + +object UapComment extends StorableObject[UapComment] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "UAP_COMMENTS" + + object fields extends FieldsObject { + val personId = new IntDatabaseField(self, "PERSON_ID") + @NullableInDatabase + val uapComment = new StringDatabaseField(self, "UAP_COMMENT", -1) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.personId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UapGroup.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UapGroup.scala new file mode 100644 index 00000000..f265b875 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UapGroup.scala @@ -0,0 +1,43 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class UapGroup extends StorableClass(UapGroup) { + override object values extends ValuesObject { + val uapGroupId = new IntFieldValue(self, UapGroup.fields.uapGroupId) + val groupName = new NullableStringFieldValue(self, UapGroup.fields.groupName) + val createdOn = new DateTimeFieldValue(self, UapGroup.fields.createdOn) + val createdBy = new StringFieldValue(self, UapGroup.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, UapGroup.fields.updatedOn) + val updatedBy = new StringFieldValue(self, UapGroup.fields.updatedBy) + val active = new NullableBooleanFieldValue(self, UapGroup.fields.active) + } +} + +object UapGroup extends StorableObject[UapGroup] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "UAP_GROUPS" + + object fields extends FieldsObject { + val uapGroupId = new IntDatabaseField(self, "UAP_GROUP_ID") + val groupName = new NullableStringDatabaseField(self, "GROUP_NAME", 50) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val active = new NullableBooleanDatabaseField(self, "ACTIVE") + } + + def primaryKey: IntDatabaseField = fields.uapGroupId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UapGroupPrice.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UapGroupPrice.scala new file mode 100644 index 00000000..017db097 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UapGroupPrice.scala @@ -0,0 +1,45 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class UapGroupPrice extends StorableClass(UapGroupPrice) { + override object values extends ValuesObject { + val priceId = new IntFieldValue(self, UapGroupPrice.fields.priceId) + val uapGroupId = new NullableIntFieldValue(self, UapGroupPrice.fields.uapGroupId) + val unitPrice = new NullableDoubleFieldValue(self, UapGroupPrice.fields.unitPrice) + val createdOn = new DateTimeFieldValue(self, UapGroupPrice.fields.createdOn) + val createdBy = new StringFieldValue(self, UapGroupPrice.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, UapGroupPrice.fields.updatedOn) + val updatedBy = new StringFieldValue(self, UapGroupPrice.fields.updatedBy) + val effectiveDatetime = new NullableDateTimeFieldValue(self, UapGroupPrice.fields.effectiveDatetime) + } +} + +object UapGroupPrice extends StorableObject[UapGroupPrice] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "UAP_GROUP_PRICES" + + object fields extends FieldsObject { + val priceId = new IntDatabaseField(self, "PRICE_ID") + val uapGroupId = new NullableIntDatabaseField(self, "UAP_GROUP_ID") + val unitPrice = new NullableDoubleDatabaseField(self, "UNIT_PRICE") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val effectiveDatetime = new NullableDateTimeDatabaseField(self, "EFFECTIVE_DATETIME") + } + + def primaryKey: IntDatabaseField = fields.priceId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/User.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/User.scala index 6e39571d..908fe3d8 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/User.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/User.scala @@ -1,52 +1,78 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.{BooleanFieldValue, IntFieldValue, NullableStringFieldValue, StringFieldValue} -import com.coleji.neptune.Storable.Fields.{BooleanDatabaseField, IntDatabaseField, NullableStringDatabaseField, StringDatabaseField} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ import com.coleji.neptune.Storable._ -import com.coleji.neptune.Util.Initializable +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class User extends StorableClass(User) { override object references extends ReferencesObject { - val extraRoles = new Initializable[List[UserRole]] + val extraRoles = new InitializableSeq[UserRole, List[UserRole]] } - object values extends ValuesObject { + override object values extends ValuesObject { val userId = new IntFieldValue(self, User.fields.userId) val userName = new StringFieldValue(self, User.fields.userName) - val nameFirst = new NullableStringFieldValue(self, User.fields.nameFirst) - val nameLast = new NullableStringFieldValue(self, User.fields.nameLast) + val pwHash = new StringFieldValue(self, User.fields.pwHash) val email = new StringFieldValue(self, User.fields.email) + val createdOn = new DateTimeFieldValue(self, User.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, User.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, User.fields.updatedOn) + val updatedBy = new NullableStringFieldValue(self, User.fields.updatedBy) + val locked = new NullableBooleanFieldValue(self, User.fields.locked) + val pwChangeReqd = new NullableBooleanFieldValue(self, User.fields.pwChangeReqd) + val badAttempts = new NullableDoubleFieldValue(self, User.fields.badAttempts) + val nameFirst = new StringFieldValue(self, User.fields.nameFirst) + val nameLast = new StringFieldValue(self, User.fields.nameLast) + val sagePwCipher = new NullableStringFieldValue(self, User.fields.sagePwCipher) + val sageToAdd = new NullableStringFieldValue(self, User.fields.sageToAdd) val active = new BooleanFieldValue(self, User.fields.active) - val hideFromClose = new BooleanFieldValue(self, User.fields.hideFromClose) - val pwHash = new NullableStringFieldValue(self, User.fields.pwHash) - val locked = new BooleanFieldValue(self, User.fields.locked) - val pwChangeRequired = new BooleanFieldValue(self, User.fields.pwChangeRequired) + val hideFromClose = new NullableBooleanFieldValue(self, User.fields.hideFromClose) val pwHashScheme = new NullableStringFieldValue(self, User.fields.pwHashScheme) + val authNonce = new NullableStringFieldValue(self, User.fields.authNonce) + val userType = new NullableStringFieldValue(self, User.fields.userType) val accessProfileId = new IntFieldValue(self, User.fields.accessProfileId) + val noAppAccess = new NullableStringFieldValue(self, User.fields.noAppAccess) } - - override def toString: String = this.valuesList.filter(_.persistenceFieldName != "PW_HASH").toString() } object User extends StorableObject[User] { - override val entityName: String = "USERS" - override val useRuntimeFieldnamesForJson: Boolean = true + override val entityName: String = "USERS" + object fields extends FieldsObject { val userId = new IntDatabaseField(self, "USER_ID") val userName = new StringDatabaseField(self, "USER_NAME", 50) - val nameFirst = new NullableStringDatabaseField(self, "NAME_FIRST", 100) - val nameLast = new NullableStringDatabaseField(self, "NAME_LAST", 100) + @NullableInDatabase + val pwHash = new StringDatabaseField(self, "PW_HASH", 500) val email = new StringDatabaseField(self, "EMAIL", 100) - val active = new BooleanDatabaseField(self, "ACTIVE") - val hideFromClose = new BooleanDatabaseField(self, "HIDE_FROM_CLOSE", nullImpliesFalse = true) - val pwHash = new NullableStringDatabaseField(self, "PW_HASH", 100) - val locked = new BooleanDatabaseField(self, "LOCKED", nullImpliesFalse = true) - val pwChangeRequired = new BooleanDatabaseField(self, "PW_CHANGE_REQD", nullImpliesFalse = true) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + val updatedBy = new NullableStringDatabaseField(self, "UPDATED_BY", 500) + val locked = new NullableBooleanDatabaseField(self, "LOCKED") + val pwChangeReqd = new NullableBooleanDatabaseField(self, "PW_CHANGE_REQD") + val badAttempts = new NullableDoubleDatabaseField(self, "BAD_ATTEMPTS") + @NullableInDatabase + val nameFirst = new StringDatabaseField(self, "NAME_FIRST", 100) + @NullableInDatabase + val nameLast = new StringDatabaseField(self, "NAME_LAST", 100) + val sagePwCipher = new NullableStringDatabaseField(self, "SAGE_PW_CIPHER", 4000) + val sageToAdd = new NullableStringDatabaseField(self, "SAGE_TO_ADD", 4000) + val active = new BooleanDatabaseField(self, "ACTIVE", false) + val hideFromClose = new NullableBooleanDatabaseField(self, "HIDE_FROM_CLOSE") val pwHashScheme = new NullableStringDatabaseField(self, "PW_HASH_SCHEME", 20) + val authNonce = new NullableStringDatabaseField(self, "AUTH_NONCE", 20) + val userType = new NullableStringDatabaseField(self, "USER_TYPE", 1) val accessProfileId = new IntDatabaseField(self, "ACCESS_PROFILE_ID") + val noAppAccess = new NullableStringDatabaseField(self, "NO_APP_ACCESS", 1) } - override def primaryKey: IntDatabaseField = fields.userId + def primaryKey: IntDatabaseField = fields.userId } \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UserRole.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UserRole.scala index 530d3d1d..a1be1f1e 100644 --- a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UserRole.scala +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UserRole.scala @@ -1,11 +1,15 @@ package org.sailcbi.APIServer.Entities.EntityDefinitions -import com.coleji.neptune.Storable.FieldValues.IntFieldValue -import com.coleji.neptune.Storable.Fields.IntDatabaseField -import com.coleji.neptune.Storable.{FieldsObject, StorableClass, StorableObject, ValuesObject} +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ class UserRole extends StorableClass(UserRole) { - object values extends ValuesObject { + override object values extends ValuesObject { val assignId = new IntFieldValue(self, UserRole.fields.assignId) val userId = new IntFieldValue(self, UserRole.fields.userId) val roleId = new IntFieldValue(self, UserRole.fields.roleId) @@ -13,13 +17,17 @@ class UserRole extends StorableClass(UserRole) { } object UserRole extends StorableObject[UserRole] { - val entityName: String = "USERS_ROLES" + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "USERS_ROLES" object fields extends FieldsObject { val assignId = new IntDatabaseField(self, "ASSIGN_ID") + @NullableInDatabase val userId = new IntDatabaseField(self, "USER_ID") + @NullableInDatabase val roleId = new IntDatabaseField(self, "ROLE_ID") } def primaryKey: IntDatabaseField = fields.assignId -} +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UsersIp.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UsersIp.scala new file mode 100644 index 00000000..b33197b5 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UsersIp.scala @@ -0,0 +1,35 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class UsersIp extends StorableClass(UsersIp) { + override object values extends ValuesObject { + val userId = new IntFieldValue(self, UsersIp.fields.userId) + val ipAddress = new StringFieldValue(self, UsersIp.fields.ipAddress) + val firstDatetime = new NullableDateTimeFieldValue(self, UsersIp.fields.firstDatetime) + val lastDatetime = new NullableDateTimeFieldValue(self, UsersIp.fields.lastDatetime) + val useCount = new NullableDoubleFieldValue(self, UsersIp.fields.useCount) + } +} + +object UsersIp extends StorableObject[UsersIp] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "USERS_IPS" + + object fields extends FieldsObject { + val userId = new IntDatabaseField(self, "USER_ID") + val ipAddress = new StringDatabaseField(self, "IP_ADDRESS", 50) + val firstDatetime = new NullableDateTimeDatabaseField(self, "FIRST_DATETIME") + val lastDatetime = new NullableDateTimeDatabaseField(self, "LAST_DATETIME") + val useCount = new NullableDoubleDatabaseField(self, "USE_COUNT") + } + + def primaryKey: IntDatabaseField = fields.userId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UsersPreference.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UsersPreference.scala new file mode 100644 index 00000000..25321865 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/UsersPreference.scala @@ -0,0 +1,47 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class UsersPreference extends StorableClass(UsersPreference) { + override object values extends ValuesObject { + val rowId = new IntFieldValue(self, UsersPreference.fields.rowId) + val userId = new IntFieldValue(self, UsersPreference.fields.userId) + val prefId = new IntFieldValue(self, UsersPreference.fields.prefId) + val createdOn = new DateTimeFieldValue(self, UsersPreference.fields.createdOn) + val createdBy = new StringFieldValue(self, UsersPreference.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, UsersPreference.fields.updatedOn) + val updatedBy = new StringFieldValue(self, UsersPreference.fields.updatedBy) + val valueFakeboolean = new NullableBooleanFieldValue(self, UsersPreference.fields.valueFakeboolean) + } +} + +object UsersPreference extends StorableObject[UsersPreference] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "USERS_PREFERENCES" + + object fields extends FieldsObject { + val rowId = new IntDatabaseField(self, "ROW_ID") + @NullableInDatabase + val userId = new IntDatabaseField(self, "USER_ID") + @NullableInDatabase + val prefId = new IntDatabaseField(self, "PREF_ID") + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val valueFakeboolean = new NullableBooleanDatabaseField(self, "VALUE_FAKEBOOLEAN") + } + + def primaryKey: IntDatabaseField = fields.rowId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/VerifyEmailReq.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/VerifyEmailReq.scala new file mode 100644 index 00000000..78e33bac --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/VerifyEmailReq.scala @@ -0,0 +1,37 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class VerifyEmailReq extends StorableClass(VerifyEmailReq) { + override object values extends ValuesObject { + val reqId = new IntFieldValue(self, VerifyEmailReq.fields.reqId) + val email = new StringFieldValue(self, VerifyEmailReq.fields.email) + val token = new StringFieldValue(self, VerifyEmailReq.fields.token) + val reqDatetime = new DateTimeFieldValue(self, VerifyEmailReq.fields.reqDatetime) + val personId = new IntFieldValue(self, VerifyEmailReq.fields.personId) + val isValid = new NullableBooleanFieldValue(self, VerifyEmailReq.fields.isValid) + } +} + +object VerifyEmailReq extends StorableObject[VerifyEmailReq] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "VERIFY_EMAIL_REQS" + + object fields extends FieldsObject { + val reqId = new IntDatabaseField(self, "REQ_ID") + val email = new StringDatabaseField(self, "EMAIL", 1000) + val token = new StringDatabaseField(self, "TOKEN", 50) + val reqDatetime = new DateTimeDatabaseField(self, "REQ_DATETIME") + val personId = new IntDatabaseField(self, "PERSON_ID") + val isValid = new NullableBooleanDatabaseField(self, "IS_VALID") + } + + def primaryKey: IntDatabaseField = fields.reqId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/WikiEntrie.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/WikiEntrie.scala new file mode 100644 index 00000000..18e5b251 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/WikiEntrie.scala @@ -0,0 +1,47 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class WikiEntrie extends StorableClass(WikiEntrie) { + override object values extends ValuesObject { + val entryId = new IntFieldValue(self, WikiEntrie.fields.entryId) + val app = new DoubleFieldValue(self, WikiEntrie.fields.app) + val page = new DoubleFieldValue(self, WikiEntrie.fields.page) + val content = new NullableStringFieldValue(self, WikiEntrie.fields.content) + val createdOn = new DateTimeFieldValue(self, WikiEntrie.fields.createdOn) + val createdBy = new StringFieldValue(self, WikiEntrie.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, WikiEntrie.fields.updatedOn) + val updatedBy = new StringFieldValue(self, WikiEntrie.fields.updatedBy) + } +} + +object WikiEntrie extends StorableObject[WikiEntrie] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "WIKI_ENTRIES" + + object fields extends FieldsObject { + val entryId = new IntDatabaseField(self, "ENTRY_ID") + @NullableInDatabase + val app = new DoubleDatabaseField(self, "APP") + @NullableInDatabase + val page = new DoubleDatabaseField(self, "PAGE") + val content = new NullableStringDatabaseField(self, "CONTENT", -1) + @NullableInDatabase + val createdOn = new DateTimeDatabaseField(self, "CREATED_ON") + @NullableInDatabase + val createdBy = new StringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + } + + def primaryKey: IntDatabaseField = fields.entryId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/YearlyDate.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/YearlyDate.scala new file mode 100644 index 00000000..0b20fbb3 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/YearlyDate.scala @@ -0,0 +1,48 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class YearlyDate extends StorableClass(YearlyDate) { + override object values extends ValuesObject { + val dateId = new IntFieldValue(self, YearlyDate.fields.dateId) + val year = new DoubleFieldValue(self, YearlyDate.fields.year) + val itemId = new IntFieldValue(self, YearlyDate.fields.itemId) + val startDate = new DateTimeFieldValue(self, YearlyDate.fields.startDate) + val createdOn = new NullableDateTimeFieldValue(self, YearlyDate.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, YearlyDate.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, YearlyDate.fields.updatedOn) + val updatedBy = new StringFieldValue(self, YearlyDate.fields.updatedBy) + val endDate = new NullableDateTimeFieldValue(self, YearlyDate.fields.endDate) + } +} + +object YearlyDate extends StorableObject[YearlyDate] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "YEARLY_DATES" + + object fields extends FieldsObject { + val dateId = new IntDatabaseField(self, "DATE_ID") + @NullableInDatabase + val year = new DoubleDatabaseField(self, "YEAR") + @NullableInDatabase + val itemId = new IntDatabaseField(self, "ITEM_ID") + @NullableInDatabase + val startDate = new DateTimeDatabaseField(self, "START_DATE") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val endDate = new NullableDateTimeDatabaseField(self, "END_DATE") + } + + def primaryKey: IntDatabaseField = fields.dateId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/EntityDefinitions/YearlyDateItem.scala b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/YearlyDateItem.scala new file mode 100644 index 00000000..f21c6736 --- /dev/null +++ b/app/org/sailcbi/APIServer/Entities/EntityDefinitions/YearlyDateItem.scala @@ -0,0 +1,47 @@ +package org.sailcbi.APIServer.Entities.EntityDefinitions + +import com.coleji.neptune.Storable.FieldValues._ +import com.coleji.neptune.Storable.Fields._ +import com.coleji.neptune.Storable._ +import com.coleji.neptune.Util._ +import org.sailcbi.APIServer.Entities.NullableInDatabase +import org.sailcbi.APIServer.Entities.entitycalculations._ +import play.api.libs.json._ + +class YearlyDateItem extends StorableClass(YearlyDateItem) { + override object values extends ValuesObject { + val itemId = new IntFieldValue(self, YearlyDateItem.fields.itemId) + val itemAlias = new StringFieldValue(self, YearlyDateItem.fields.itemAlias) + val itemDescription = new StringFieldValue(self, YearlyDateItem.fields.itemDescription) + val alertIfUnset = new NullableBooleanFieldValue(self, YearlyDateItem.fields.alertIfUnset) + val createdOn = new NullableDateTimeFieldValue(self, YearlyDateItem.fields.createdOn) + val createdBy = new NullableStringFieldValue(self, YearlyDateItem.fields.createdBy) + val updatedOn = new DateTimeFieldValue(self, YearlyDateItem.fields.updatedOn) + val updatedBy = new StringFieldValue(self, YearlyDateItem.fields.updatedBy) + val valIfUndef = new NullableBooleanFieldValue(self, YearlyDateItem.fields.valIfUndef) + } +} + +object YearlyDateItem extends StorableObject[YearlyDateItem] { + override val useRuntimeFieldnamesForJson: Boolean = true + + override val entityName: String = "YEARLY_DATE_ITEMS" + + object fields extends FieldsObject { + val itemId = new IntDatabaseField(self, "ITEM_ID") + @NullableInDatabase + val itemAlias = new StringDatabaseField(self, "ITEM_ALIAS", 50) + @NullableInDatabase + val itemDescription = new StringDatabaseField(self, "ITEM_DESCRIPTION", 500) + val alertIfUnset = new NullableBooleanDatabaseField(self, "ALERT_IF_UNSET") + val createdOn = new NullableDateTimeDatabaseField(self, "CREATED_ON") + val createdBy = new NullableStringDatabaseField(self, "CREATED_BY", 500) + @NullableInDatabase + val updatedOn = new DateTimeDatabaseField(self, "UPDATED_ON") + @NullableInDatabase + val updatedBy = new StringDatabaseField(self, "UPDATED_BY", 500) + val valIfUndef = new NullableBooleanDatabaseField(self, "VAL_IF_UNDEF") + } + + def primaryKey: IntDatabaseField = fields.itemId +} \ No newline at end of file diff --git a/app/org/sailcbi/APIServer/Entities/MagicIds.scala b/app/org/sailcbi/APIServer/Entities/MagicIds.scala index 1804976b..5438654b 100644 --- a/app/org/sailcbi/APIServer/Entities/MagicIds.scala +++ b/app/org/sailcbi/APIServer/Entities/MagicIds.scala @@ -77,4 +77,7 @@ object MagicIds { val RIGGING = "G" val RENTAL = "N" } + object TAG_IDS { + val CORPORATION = 5 + } } diff --git a/app/org/sailcbi/APIServer/Entities/cacheable/AccessState/AccessState.scala b/app/org/sailcbi/APIServer/Entities/cacheable/AccessState/AccessState.scala index 7f5f105d..1d362135 100644 --- a/app/org/sailcbi/APIServer/Entities/cacheable/AccessState/AccessState.scala +++ b/app/org/sailcbi/APIServer/Entities/cacheable/AccessState/AccessState.scala @@ -19,7 +19,7 @@ object AccessState extends CacheableFactory[Null, String]{ AccessProfileRelationship.fields.subordinateProfileId )) - val users = rc.assertUnlocked.getObjectsByFilters(User, List(User.fields.active.alias.equals(true)), Set( + val users = rc.assertUnlocked.getObjectsByFilters(User, List(User.fields.active.alias.equalsConstant(true)), Set( User.fields.userId, User.fields.userName, User.fields.accessProfileId diff --git a/app/org/sailcbi/APIServer/Entities/cacheable/SignoutsToday.scala b/app/org/sailcbi/APIServer/Entities/cacheable/SignoutsToday.scala index 9fc8580b..25dc6c75 100644 --- a/app/org/sailcbi/APIServer/Entities/cacheable/SignoutsToday.scala +++ b/app/org/sailcbi/APIServer/Entities/cacheable/SignoutsToday.scala @@ -184,7 +184,7 @@ object SignoutsToday extends CacheableFactory[Null, IndexedSeq[Signout]]{ ).reverse.take(MAX_RECORDS_TO_RETURN) if (signouts.size > MAX_RECORDS_TO_RETURN) { - Sentry.capture("Today's signouts had " + signouts.size + " results, sending an abridged list to client") + Sentry.captureMessage("Today's signouts had " + signouts.size + " results, sending an abridged list to client") } val ret = signoutsToReturn diff --git a/app/org/sailcbi/APIServer/Entities/dto/PutDockReportApClassDto.scala b/app/org/sailcbi/APIServer/Entities/dto/PutDockReportApClassDto.scala index fd28a339..400eaee0 100644 --- a/app/org/sailcbi/APIServer/Entities/dto/PutDockReportApClassDto.scala +++ b/app/org/sailcbi/APIServer/Entities/dto/PutDockReportApClassDto.scala @@ -20,7 +20,7 @@ case class PutDockReportApClassDto ( override def mutateStorableForUpdate(s: DockReportApClass): DockReportApClass = { s.update(_.dockReportId, DOCK_REPORT_ID.get) - s.update(_.apInstanceId, AP_INSTANCE_ID) + s.update(_.apInstanceId, AP_INSTANCE_ID.get) s.update(_.className, CLASS_NAME) s.update(_.classDatetime, CLASS_DATETIME) s.update(_.location, LOCATION) @@ -42,7 +42,7 @@ object PutDockReportApClassDto { def apply(c: DockReportApClass): PutDockReportApClassDto = new PutDockReportApClassDto( DOCK_REPORT_AP_CLASS_ID=Some(c.values.dockReportApClassId.get), DOCK_REPORT_ID=Some(c.values.dockReportId.get), - AP_INSTANCE_ID=c.values.apInstanceId.get, + AP_INSTANCE_ID=Some(c.values.apInstanceId.get), CLASS_NAME=c.values.className.get, CLASS_DATETIME=c.values.classDatetime.get, LOCATION=c.values.location.get, diff --git a/app/org/sailcbi/APIServer/Entities/dto/PutDockReportDto.scala b/app/org/sailcbi/APIServer/Entities/dto/PutDockReportDto.scala index 502b1b64..08e0fa40 100644 --- a/app/org/sailcbi/APIServer/Entities/dto/PutDockReportDto.scala +++ b/app/org/sailcbi/APIServer/Entities/dto/PutDockReportDto.scala @@ -5,6 +5,7 @@ import com.coleji.neptune.Core.UnlockedRequestCache import com.coleji.neptune.Storable.DTOClass import com.coleji.neptune.Util.GenerateSetDelta import org.sailcbi.APIServer.Entities.EntityDefinitions._ +import org.sailcbi.APIServer.Logic.DockhouseLogic.DockReportLogic import play.api.libs.json.{JsValue, Json} import java.time.{LocalDate, LocalDateTime} @@ -38,9 +39,9 @@ case class PutDockReportDto ( override def mutateStorableForInsert(s: DockReport): DockReport = mutateStorableForUpdate(s) - override def recurse(rc: UnlockedRequestCache, s: DockReport): ValidationResult = { + override def recurse(rc: UnlockedRequestCache, dockReport: DockReport): ValidationResult = { // Get existing subobjects - val (weatherExisting, dockstaffExisting, uapApptsExisting, hullCountsExisting, apClassesExisting) = s.getSubobjects(rc) + val (weatherExisting, dockstaffExisting, uapApptsExisting, hullCountsExisting, apClassesExisting) = DockReportLogic.getSubobjects(dockReport, rc) val (weatherExistingDto, dockstaffExistingDto, uapApptsExistingDto, hullCountsExistingDto, apClassesExistingDto) = ( weatherExisting.map(PutDockReportWeatherDto.apply), dockstaffExisting.map(PutDockReportStaffDto.apply), @@ -122,7 +123,7 @@ object PutDockReportDto { ) def applyWithSubObjects(rc: UnlockedRequestCache)(dr: DockReport): PutDockReportDto = { - val (weather, dockstaff, uapAppts, hullCounts, apClasses) = dr.getSubobjects(rc) + val (weather, dockstaff, uapAppts, hullCounts, apClasses) = DockReportLogic.getSubobjects(dr, rc) new PutDockReportDto( DOCK_REPORT_ID=Some(dr.values.dockReportId.get), REPORT_DATE=dr.values.reportDate.get, diff --git a/app/org/sailcbi/APIServer/Entities/dto/PutDockReportUapApptDto.scala b/app/org/sailcbi/APIServer/Entities/dto/PutDockReportUapApptDto.scala index 1efe3341..c9703945 100644 --- a/app/org/sailcbi/APIServer/Entities/dto/PutDockReportUapApptDto.scala +++ b/app/org/sailcbi/APIServer/Entities/dto/PutDockReportUapApptDto.scala @@ -20,9 +20,9 @@ case class PutDockReportUapApptDto ( override def mutateStorableForUpdate(s: DockReportUapAppt): DockReportUapAppt = { s.update(_.dockReportId, DOCK_REPORT_ID.get) - s.update(_.apptDatetime, APPT_DATETIME) - s.update(_.apptType, APPT_TYPE) - s.update(_.participantName, PARTICIPANT_NAME) + s.update(_.apptDatetime, APPT_DATETIME.get) + s.update(_.apptType, APPT_TYPE.get) + s.update(_.participantName, Some(PARTICIPANT_NAME)) s.update(_.boatTypeId, BOAT_TYPE_ID) s.update(_.instructorName, INSTRUCTOR_NAME) s.update(_.hoyer, HOYER) @@ -40,9 +40,9 @@ object PutDockReportUapApptDto { def apply(u: DockReportUapAppt): PutDockReportUapApptDto = new PutDockReportUapApptDto( DOCK_REPORT_APPT_ID=Some(u.values.dockReportApptId.get), DOCK_REPORT_ID=Some(u.values.dockReportId.get), - APPT_DATETIME=u.values.apptDatetime.get, - APPT_TYPE=u.values.apptType.get, - PARTICIPANT_NAME=u.values.participantName.get, + APPT_DATETIME=Some(u.values.apptDatetime.get), + APPT_TYPE=Some(u.values.apptType.get), + PARTICIPANT_NAME=u.values.participantName.get.get, BOAT_TYPE_ID=u.values.boatTypeId.get, INSTRUCTOR_NAME=u.values.instructorName.get, HOYER=u.values.hoyer.get diff --git a/app/org/sailcbi/APIServer/Entities/dto/PutEventDTO.scala b/app/org/sailcbi/APIServer/Entities/dto/PutEventDTO.scala index 5916d8e4..20261a47 100644 --- a/app/org/sailcbi/APIServer/Entities/dto/PutEventDTO.scala +++ b/app/org/sailcbi/APIServer/Entities/dto/PutEventDTO.scala @@ -15,7 +15,7 @@ case class PutEventDTO ( override def mutateStorableForUpdate(s: Event): Event = { s.update(_.eventName, EVENT_NAME) - s.update(_.eventDateTime, EVENT_DATE) + s.update(_.eventDate, EVENT_DATE) s } diff --git a/app/org/sailcbi/APIServer/Entities/dto/PutGuestPrivDTO.scala b/app/org/sailcbi/APIServer/Entities/dto/PutGuestPrivDTO.scala index c114849b..6295bb1a 100644 --- a/app/org/sailcbi/APIServer/Entities/dto/PutGuestPrivDTO.scala +++ b/app/org/sailcbi/APIServer/Entities/dto/PutGuestPrivDTO.scala @@ -11,7 +11,7 @@ case class PutGuestPrivDTO ( override def getId: Option[Int] = MEMBERSHIP_ID override def mutateStorableForUpdate(s: GuestPriv): GuestPriv = { - s.update(_.price, PRICE) + s.update(_.price, PRICE.get) s } diff --git a/app/org/sailcbi/APIServer/IO/CachedData.scala b/app/org/sailcbi/APIServer/IO/CachedData.scala index d3315fea..a470c78a 100644 --- a/app/org/sailcbi/APIServer/IO/CachedData.scala +++ b/app/org/sailcbi/APIServer/IO/CachedData.scala @@ -68,7 +68,7 @@ class CachedData(rc: UnlockedRequestCache) { MembershipType.fields.programId, MembershipType.fields.price, )).map(m => { - m.references.program.findOneInCollection(programTypes) + m.references.program.findOneInCollection(programTypes, _.values.programId.get == m.values.programId.get) m }) } @@ -80,7 +80,7 @@ class CachedData(rc: UnlockedRequestCache) { MembershipTypeExp.fields.startDate, MembershipTypeExp.fields.expirationDate, )).map(me => { - me.references.membershipType.findOneInCollection(membershipTypes) + me.references.membershipType.findOneInCollection(membershipTypes, _.values.membershipTypeId.get == me.values.membershipTypeId.get) me }) } diff --git a/app/org/sailcbi/APIServer/IO/JP/AllJPClassInstances.scala b/app/org/sailcbi/APIServer/IO/JP/AllJPClassInstances.scala index 96b25969..59a9e3e7 100644 --- a/app/org/sailcbi/APIServer/IO/JP/AllJPClassInstances.scala +++ b/app/org/sailcbi/APIServer/IO/JP/AllJPClassInstances.scala @@ -17,11 +17,11 @@ object AllJPClassInstances { .from(types) .innerJoin(instances, JpClassType.fields.typeId.alias equalsField JpClassInstance.fields.typeId.alias) .innerJoin(sessions, JpClassInstance.fields.instanceId.alias equalsField JpClassSession.fields.instanceId.alias) - .where(JpClassSession.fields.sessionDateTime.alias.isYearConstant(PA.currentSeason())) + .where(JpClassSession.fields.sessionDatetime.alias.isYearConstant(PA.currentSeason())) .select( types.wrappedFields(f => List(f.typeId, f.typeName, f.displayOrder, f.sessionLength)) ++ instances.wrappedFields(f => List(f.instanceId, f.typeId, f.instructorId, f.locationId, f.adminHold)) ++ - sessions.wrappedFields(f => List(f.sessionId, f.instanceId, f.sessionDateTime, f.lengthOverride)) + sessions.wrappedFields(f => List(f.sessionId, f.instanceId, f.sessionDatetime, f.lengthOverride)) ) val allSessions = rc.executeQueryBuilder(sessionsQB).map(qbrr => { @@ -35,12 +35,12 @@ object AllJPClassInstances { val groupedSessions = allSessions.groupBy(_.references.jpClassInstance.get) groupedSessions.map(Function.tupled((instance, sessions) => { - val sorted = sessions.sortWith((a, b) => a.values.sessionDateTime.get.isBefore(b.values.sessionDateTime.get)) - val min = sorted.head.values.sessionDateTime.get - val max = sorted.last.values.sessionDateTime.get + val sorted = sessions.sortWith((a, b) => a.values.sessionDatetime.get.isBefore(b.values.sessionDatetime.get)) + val min = sorted.head.values.sessionDatetime.get + val max = sorted.last.values.sessionDatetime.get val sessionLength = sorted.head.values.lengthOverride.get match { case Some(d) => d - case None => instance.references.jpClassType.get.values.sessionlength.get + case None => instance.references.jpClassType.get.values.sessionLength.get } (instance, min, max, sessionLength) })).toList diff --git a/app/org/sailcbi/APIServer/IO/Portal/PortalLogic.scala b/app/org/sailcbi/APIServer/IO/Portal/PortalLogic.scala index c937fa03..3be7a7ac 100644 --- a/app/org/sailcbi/APIServer/IO/Portal/PortalLogic.scala +++ b/app/org/sailcbi/APIServer/IO/Portal/PortalLogic.scala @@ -1224,7 +1224,7 @@ object PortalLogic { // ); override def registerOutParameters: Map[String, Int] = Map.empty - override def getOutResults(cs: CallableStatement): Unit = Unit + override def getOutResults(cs: CallableStatement): Unit = () override def setInParametersInt: Map[String, Int] = Map( "p_order_id" -> orderId @@ -1816,7 +1816,7 @@ object PortalLogic { override def registerOutParameters: Map[String, Int] = Map.empty - override def getOutResults(cs: CallableStatement): Unit = Unit + override def getOutResults(cs: CallableStatement): Unit = () } rc.executeProcedure(proc) ValidationOk @@ -1897,7 +1897,7 @@ object PortalLogic { override def registerOutParameters: Map[String, Int] = Map.empty - override def getOutResults(cs: CallableStatement): Unit = Unit + override def getOutResults(cs: CallableStatement): Unit = () } rc.executeProcedure(proc) } @@ -2302,7 +2302,7 @@ object PortalLogic { override def registerOutParameters: Map[String, Int] = Map.empty - override def getOutResults(cs: CallableStatement): Unit = Unit + override def getOutResults(cs: CallableStatement): Unit = () } rc.executeProcedure(ppc) @@ -3195,7 +3195,7 @@ object PortalLogic { ) override def registerOutParameters: Map[String, Int] = Map.empty - override def getOutResults(cs: CallableStatement): Unit = Unit + override def getOutResults(cs: CallableStatement): Unit = () override def getQuery: String = "merge_records(?, ?)" } @@ -3303,7 +3303,7 @@ object PortalLogic { override def registerOutParameters: Map[String, Int] = Map.empty - override def getOutResults(cs: CallableStatement): Unit = Unit + override def getOutResults(cs: CallableStatement): Unit = () override def getQuery: String = "email_pkg.ap_guest_ticket(?, ?, ?)" } diff --git a/app/org/sailcbi/APIServer/IO/StripeIOController.scala b/app/org/sailcbi/APIServer/IO/StripeIOController.scala index e23ab5b6..086ad140 100644 --- a/app/org/sailcbi/APIServer/IO/StripeIOController.scala +++ b/app/org/sailcbi/APIServer/IO/StripeIOController.scala @@ -76,7 +76,7 @@ class StripeIOController(rc: RequestCache, apiIO: StripeAPIIOMechanism, dbIO: St apiIO.getOrPostStripeSingleton( "payment_intents/" + intentId, - _ => Unit, + _ => (), POST, Some(Map( "amount" -> totalInCents.toString, diff --git a/app/org/sailcbi/APIServer/Logic/DockhouseLogic/DockReportLogic.scala b/app/org/sailcbi/APIServer/Logic/DockhouseLogic/DockReportLogic.scala new file mode 100644 index 00000000..d1889c55 --- /dev/null +++ b/app/org/sailcbi/APIServer/Logic/DockhouseLogic/DockReportLogic.scala @@ -0,0 +1,70 @@ +package org.sailcbi.APIServer.Logic.DockhouseLogic + +import com.coleji.neptune.Core.UnlockedRequestCache +import org.sailcbi.APIServer.Entities.EntityDefinitions._ + +object DockReportLogic { + def getSubobjects(dockReport: DockReport, rc: UnlockedRequestCache): (List[DockReportWeather], List[DockReportStaff], List[DockReportUapAppt], List[DockReportHullCount], List[DockReportApClass]) ={ + val weather = rc.getObjectsByFilters(DockReportWeather, List(DockReportWeather.fields.dockReportId.alias.equalsConstant(dockReport.values.dockReportId.get)), Set( + DockReportWeather.fields.weatherId, + DockReportWeather.fields.dockReportId, + DockReportWeather.fields.weatherDatetime, + DockReportWeather.fields.temp, + DockReportWeather.fields.weatherSummary, + DockReportWeather.fields.windDir, + DockReportWeather.fields.windSpeedKtsSteady, + DockReportWeather.fields.windSpeedKtsGust, + DockReportWeather.fields.restrictions, + )) + val dockstaff = rc.getObjectsByFilters(DockReportStaff, List(DockReportStaff.fields.dockReportId.alias.equalsConstant(dockReport.values.dockReportId.get)), Set( + DockReportStaff.fields.dockReportStaffId, + DockReportStaff.fields.dockReportId, + DockReportStaff.fields.dockmasterOnDuty, + DockReportStaff.fields.staffName, + DockReportStaff.fields.timeIn, + DockReportStaff.fields.timeOut, + )) + val uapAppts = rc.getObjectsByFilters(DockReportUapAppt, List(DockReportUapAppt.fields.dockReportId.alias.equalsConstant(dockReport.values.dockReportId.get)), Set( + DockReportUapAppt.fields.dockReportApptId, + DockReportUapAppt.fields.dockReportId, + DockReportUapAppt.fields.apptDatetime, + DockReportUapAppt.fields.apptType, + DockReportUapAppt.fields.participantName, + DockReportUapAppt.fields.boatTypeId, + DockReportUapAppt.fields.instructorName, + DockReportUapAppt.fields.hoyer, + )) + val hullCounts = rc.getObjectsByFilters(DockReportHullCount, List(DockReportHullCount.fields.dockReportId.alias.equalsConstant(dockReport.values.dockReportId.get)), Set( + DockReportHullCount.fields.dockReportHullCtId, + DockReportHullCount.fields.dockReportId, + DockReportHullCount.fields.hullType, + DockReportHullCount.fields.inService, + DockReportHullCount.fields.staffTally, + )) + val apClasses = rc.getObjectsByFilters(DockReportApClass, List(DockReportApClass.fields.dockReportId.alias.equalsConstant(dockReport.values.dockReportId.get)), Set( + DockReportApClass.fields.dockReportApClassId, + DockReportApClass.fields.dockReportId, + DockReportApClass.fields.apInstanceId, + DockReportApClass.fields.className, + DockReportApClass.fields.classDatetime, + DockReportApClass.fields.location, + DockReportApClass.fields.instructor, + DockReportApClass.fields.attend, + )) + (weather, dockstaff, uapAppts, hullCounts, apClasses) + } + + def deleteSubobjects(dockReport: DockReport, rc: UnlockedRequestCache): Unit = { + val (weather, dockstaff, uapAppts, hullCounts, apClasses) = getSubobjects(dockReport, rc) + val weatherIds = weather.map(_.values.weatherId.get) + val dockstaffIds = dockstaff.map(_.values.dockReportStaffId.get) + val uapApptIds = uapAppts.map(_.values.dockReportApptId.get) + val hullCountIds = hullCounts.map(_.values.dockReportHullCtId.get) + val apClassIds = apClasses.map(_.values.dockReportApClassId.get) + rc.deleteObjectsById(DockReportWeather, weatherIds) + rc.deleteObjectsById(DockReportStaff, dockstaffIds) + rc.deleteObjectsById(DockReportUapAppt, uapApptIds) + rc.deleteObjectsById(DockReportHullCount, hullCountIds) + rc.deleteObjectsById(DockReportApClass, apClassIds) + } +} diff --git a/app/org/sailcbi/APIServer/Logic/JpClassLogic.scala b/app/org/sailcbi/APIServer/Logic/JpClassLogic.scala new file mode 100644 index 00000000..18f450d1 --- /dev/null +++ b/app/org/sailcbi/APIServer/Logic/JpClassLogic.scala @@ -0,0 +1,13 @@ +package org.sailcbi.APIServer.Logic + +import com.coleji.neptune.Core.UnlockedRequestCache +import org.sailcbi.APIServer.Entities.EntityDefinitions.JpClassSession +import org.sailcbi.APIServer.IO.CachedData + +object JpClassLogic { + // TODO: not loving this + def setWeekAlias(session: JpClassSession, rc: UnlockedRequestCache) = { + val cache = new CachedData(rc) + cache.getJpWeekAlias(session.values.sessionDatetime.get.toLocalDate) + } +} diff --git a/app/org/sailcbi/APIServer/Logic/MembershipLogic.scala b/app/org/sailcbi/APIServer/Logic/MembershipLogic.scala index 1ddc1b1f..33139f91 100644 --- a/app/org/sailcbi/APIServer/Logic/MembershipLogic.scala +++ b/app/org/sailcbi/APIServer/Logic/MembershipLogic.scala @@ -1,6 +1,7 @@ package org.sailcbi.APIServer.Logic import com.coleji.neptune.Util.Currency +import org.sailcbi.APIServer.Entities.EntityDefinitions.PersonMembership import org.sailcbi.APIServer.Entities.MagicIds import java.time.format.DateTimeFormatter @@ -55,4 +56,12 @@ object MembershipLogic { case _ => purchaseDate } } + + def isActive(pm: PersonMembership, now: LocalDate): Boolean = { + val start = pm.values.startDate.get + val exp = pm.values.expirationDate.get + + (start.isEmpty || !start.get.isAfter(now)) && + (exp.isEmpty || !exp.get.isBefore(now)) + } } diff --git a/app/org/sailcbi/APIServer/Logic/RatingLogic.scala b/app/org/sailcbi/APIServer/Logic/RatingLogic.scala index 5af53a80..85dc6cf7 100644 --- a/app/org/sailcbi/APIServer/Logic/RatingLogic.scala +++ b/app/org/sailcbi/APIServer/Logic/RatingLogic.scala @@ -85,4 +85,12 @@ object RatingLogic { } } } + + def getAllHigherRatingsThanRating(ratings: List[Rating], targetRatingId: Int): List[Rating] = { + val targetRating: Rating = ratings.filter(_.values.ratingId.get == targetRatingId).head + targetRating.values.overriddenBy.get match { + case Some(i: Int) => targetRating :: getAllHigherRatingsThanRating(ratings, i) + case None => targetRating :: Nil + } + } } diff --git a/app/org/sailcbi/APIServer/Reporting/ReportFactories/ReportFactoryJpClassInstance.scala b/app/org/sailcbi/APIServer/Reporting/ReportFactories/ReportFactoryJpClassInstance.scala index dff2347a..dd84ee3f 100644 --- a/app/org/sailcbi/APIServer/Reporting/ReportFactories/ReportFactoryJpClassInstance.scala +++ b/app/org/sailcbi/APIServer/Reporting/ReportFactories/ReportFactoryJpClassInstance.scala @@ -43,7 +43,7 @@ class ReportFactoryJpClassInstance extends ReportFactory[JpClassInstance] { (i: JpClassInstance) => jpClassSessions .filter(_.values.instanceId.get == i.getID) - .map(_.values.sessionDateTime.get) + .map(_.values.sessionDatetime.get) .min .format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), "First Session Datetime", diff --git a/app/org/sailcbi/APIServer/Reporting/ReportFactories/ReportFactoryJpClassSignup.scala b/app/org/sailcbi/APIServer/Reporting/ReportFactories/ReportFactoryJpClassSignup.scala index 8303b8f3..e7567fe6 100644 --- a/app/org/sailcbi/APIServer/Reporting/ReportFactories/ReportFactoryJpClassSignup.scala +++ b/app/org/sailcbi/APIServer/Reporting/ReportFactories/ReportFactoryJpClassSignup.scala @@ -3,6 +3,7 @@ package org.sailcbi.APIServer.Reporting.ReportFactories import com.coleji.neptune.Export.{ReportFactory, ReportingField, ReportingFilterFactory} import com.coleji.neptune.Storable.StorableObject import org.sailcbi.APIServer.Entities.EntityDefinitions._ +import org.sailcbi.APIServer.Logic.JpClassLogic import org.sailcbi.APIServer.Reporting.ReportingFilterFactories.JpClassSignup.JpClassSignupFilterFactoryYear import java.time.format.DateTimeFormatter @@ -36,7 +37,7 @@ class ReportFactoryJpClassSignup extends ReportFactory[JpClassSignup] { signups.foreach(s => { val instance = jpClassInstances.find(_.values.instanceId.get == s.values.instanceId.get) s.references.jpClassInstance.set(instance.get) - instance.get.calculatedValues.sessions.findAllInCollection(jpClassSessions) + instance.get.references.jpClassSessions.findAllInCollection(jpClassSessions.toIndexedSeq, _.values.instanceId.get == instance.get.values.instanceId.get) }) } @@ -56,18 +57,18 @@ class ReportFactoryJpClassSignup extends ReportFactory[JpClassSignup] { "Type Name", isDefault = true )), - ("WeekAlias", ReportingField.getReportingFieldFromCalculatedValue[JpClassSignup, JpClassSession]( - (session: JpClassSession) => session.calculatedValues.jpWeekAlias.getWithInput(rc).getOrElse(""), - (signup: JpClassSignup) => signup.references.jpClassInstance.get.calculatedValues.firstSession, - "Week", - isDefault = true - )), - ("FirstSessionDatetime", ReportingField.getReportingFieldFromCalculatedValue[JpClassSignup, JpClassSession]( - (session: JpClassSession) => session.values.sessionDateTime.get.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), - (signup: JpClassSignup) => signup.references.jpClassInstance.get.calculatedValues.firstSession, - "First Session Datetime", - isDefault = true - )), +// ("WeekAlias", ReportingField.getReportingFieldFromCalculatedValue[JpClassSignup, JpClassSession]( +// (session: JpClassSession) => session.calculations.weekAlias.set(JpClassLogic.setWeekAlias(session, rc)).getOrElse(""), +// (signup: JpClassSignup) => signup.references.jpClassInstance.get.calculatedValues.firstSession, +// "Week", +// isDefault = true +// )), +// ("FirstSessionDatetime", ReportingField.getReportingFieldFromCalculatedValue[JpClassSignup, JpClassSession]( +// (session: JpClassSession) => session.values.sessionDatetime.get.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), +// (signup: JpClassSignup) => signup.references.jpClassInstance.get.calculatedValues.firstSession, +// "First Session Datetime", +// isDefault = true +// )), ("SignupType", ReportingField.getReportingFieldFromDatabaseField(JpClassSignup.fields.signupType, "Signup Type", isDefault = true)), ("SignupDatetime", ReportingField.getReportingFieldFromDatabaseField(JpClassSignup.fields.signupDatetime, "Signup Datetime", isDefault = true)) ) diff --git a/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Donation/DonationFilterFactoryDateRange.scala b/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Donation/DonationFilterFactoryDateRange.scala index 8374f3e5..d5d2f2e9 100644 --- a/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Donation/DonationFilterFactoryDateRange.scala +++ b/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Donation/DonationFilterFactoryDateRange.scala @@ -9,13 +9,13 @@ import java.time.LocalDate import java.time.format.DateTimeFormatter class DonationFilterFactoryDateRange extends ReportingFilterFactory[Donation] { - val displayName: String = "Within Date Range" - val argDefinitions = List( + override val displayName: String = "Within Date Range" + override val argDefinitions = List( (ARG_DATE, DateLogic.now.toLocalDate.format(DateTimeFormatter.ofPattern("MM/dd/yyyy"))), (ARG_DATE, DateLogic.now.toLocalDate.format(DateTimeFormatter.ofPattern("MM/dd/yyyy"))) ) - def getFilter(rc: UnlockedRequestCache, arg: String): ReportingFilter[Donation] = new ReportingFilterFunction(rc, (rc: UnlockedRequestCache) => { + override def getFilter(rc: UnlockedRequestCache, arg: String): ReportingFilter[Donation] = new ReportingFilterFunction(rc, (rc: UnlockedRequestCache) => { val split = arg.split(",") val start: LocalDate = LocalDate.parse(split(0), DateTimeFormatter.ofPattern("MM/dd/yyyy")) val end: LocalDate = LocalDate.parse(split(1), DateTimeFormatter.ofPattern("MM/dd/yyyy")) diff --git a/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/JpClassInstance/JpClassInstanceFilterFactoryYear.scala b/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/JpClassInstance/JpClassInstanceFilterFactoryYear.scala index 05c9e7e1..7feedb6f 100644 --- a/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/JpClassInstance/JpClassInstanceFilterFactoryYear.scala +++ b/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/JpClassInstance/JpClassInstanceFilterFactoryYear.scala @@ -16,7 +16,7 @@ class JpClassInstanceFilterFactoryYear extends ReportingFilterFactory[JpClassIns implicit val rc: UnlockedRequestCache = _rc val ss: List[JpClassSession] = rc.getObjectsByFilters( JpClassSession, - List(JpClassSession.fields.sessionDateTime.alias.isYearConstant(year)), + List(JpClassSession.fields.sessionDatetime.alias.isYearConstant(year)), Set(JpClassSession.primaryKey), 1000 ) diff --git a/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/JpClassSignup/JpClassSignupFilterFactoryYear.scala b/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/JpClassSignup/JpClassSignupFilterFactoryYear.scala index 503357c8..c8c4656c 100644 --- a/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/JpClassSignup/JpClassSignupFilterFactoryYear.scala +++ b/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/JpClassSignup/JpClassSignupFilterFactoryYear.scala @@ -16,7 +16,7 @@ class JpClassSignupFilterFactoryYear extends ReportingFilterFactory[JpClassSignu implicit val rc: UnlockedRequestCache = _rc val sessions = rc.getObjectsByFilters( JpClassSession, - List(JpClassSession.fields.sessionDateTime.alias.isYearConstant(year)), + List(JpClassSession.fields.sessionDatetime.alias.isYearConstant(year)), Set(JpClassSession.primaryKey), 100 ) diff --git a/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Person/PersonFilterFactoryJpParentSeason.scala b/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Person/PersonFilterFactoryJpParentSeason.scala index c5ba95fd..e70e99d5 100644 --- a/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Person/PersonFilterFactoryJpParentSeason.scala +++ b/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Person/PersonFilterFactoryJpParentSeason.scala @@ -32,7 +32,7 @@ class PersonFilterFactoryJpParentSeason extends ReportingFilterFactory[Person] w val parentIds = rc.getObjectsByFilters( PersonRelationship, List( - PersonRelationship.fields.typeId.alias.equalsConstant(PersonRelationship.specialIDs.TYPE_ID_PARENT_CHILD_ACCT_LINKED), + PersonRelationship.fields.typeId.alias.equalsConstant(MagicIds.PERSON_RELATIONSHIP_TYPE_PARENT_WITH_ACCT_LINK), PersonRelationship.fields.b.alias.inList(juniorsThatYear) ), Set(PersonRelationship.primaryKey) diff --git a/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Person/PersonFilterFactoryMemProgramYear.scala b/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Person/PersonFilterFactoryMemProgramYear.scala index 090e3293..0aa5b0ec 100644 --- a/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Person/PersonFilterFactoryMemProgramYear.scala +++ b/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Person/PersonFilterFactoryMemProgramYear.scala @@ -3,6 +3,7 @@ package org.sailcbi.APIServer.Reporting.ReportingFilterFactories.Person import com.coleji.neptune.Core.UnlockedRequestCache import com.coleji.neptune.Export._ import org.sailcbi.APIServer.Entities.EntityDefinitions._ +import org.sailcbi.APIServer.Entities.MagicIds import org.sailcbi.APIServer.Logic.DateLogic // First arg is program @@ -10,7 +11,7 @@ import org.sailcbi.APIServer.Logic.DateLogic class PersonFilterFactoryMemProgramYear extends ReportingFilterFactory[Person] with ReportingFilterFactoryDropdown { val displayName: String = "Had mem in prog X, year Y" val argDefinitions = List( - (ARG_DROPDOWN, ProgramType.specialIDs.PROGRAM_TYPE_ID_AP.toString), + (ARG_DROPDOWN, MagicIds.PROGRAM_TYPES.ADULT_PROGRAM_ID.toString), (ARG_INT, DateLogic.currentSeason().toString) ) diff --git a/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Person/PersonFilterFactoryRating.scala b/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Person/PersonFilterFactoryRating.scala index 4b87ecb3..b5f731e2 100644 --- a/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Person/PersonFilterFactoryRating.scala +++ b/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Person/PersonFilterFactoryRating.scala @@ -4,11 +4,13 @@ package org.sailcbi.APIServer.Reporting.ReportingFilterFactories.Person import com.coleji.neptune.Core.UnlockedRequestCache import com.coleji.neptune.Export._ import org.sailcbi.APIServer.Entities.EntityDefinitions._ +import org.sailcbi.APIServer.Entities.MagicIds +import org.sailcbi.APIServer.Logic.RatingLogic class PersonFilterFactoryRating extends ReportingFilterFactory[Person] with ReportingFilterFactoryDropdown { val displayName: String = "Has Rating" val argDefinitions = List( - (ARG_DROPDOWN, Rating.specialIDs.RATING_ID_MERC_GREEN.toString), + (ARG_DROPDOWN, MagicIds.RATING_IDS.MERCURY_GREEN.toString), ) def getFilter(rc: UnlockedRequestCache, arg: String): ReportingFilter[Person] = new ReportingFilterFunction(rc, (_rc: UnlockedRequestCache) => { @@ -24,7 +26,7 @@ class PersonFilterFactoryRating extends ReportingFilterFactory[Person] with Repo Rating.fields.overriddenBy, )) - val ratingsToHave: List[Int] = Rating.getAllHigherRatingsThanRating(allRatings, ratingId).map(_.values.ratingId.get) + val ratingsToHave: List[Int] = RatingLogic.getAllHigherRatingsThanRating(allRatings, ratingId).map(_.values.ratingId.get) val personIDs: List[Int] = rc.getObjectsByFilters( PersonRating, diff --git a/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Person/PersonFilterFactoryTag.scala b/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Person/PersonFilterFactoryTag.scala index 8567a7a2..f1ae261c 100644 --- a/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Person/PersonFilterFactoryTag.scala +++ b/app/org/sailcbi/APIServer/Reporting/ReportingFilterFactories/Person/PersonFilterFactoryTag.scala @@ -3,11 +3,12 @@ package org.sailcbi.APIServer.Reporting.ReportingFilterFactories.Person import com.coleji.neptune.Core.UnlockedRequestCache import com.coleji.neptune.Export._ import org.sailcbi.APIServer.Entities.EntityDefinitions._ +import org.sailcbi.APIServer.Entities.MagicIds class PersonFilterFactoryTag extends ReportingFilterFactory[Person] with ReportingFilterFactoryDropdown { val displayName: String = "Has Tag" - val argDefinitions = List( - (ARG_DROPDOWN, Tag.specialIDs.TAG_ID_CORPORATION.toString), + override val argDefinitions = List( + (ARG_DROPDOWN, MagicIds.TAG_IDS.CORPORATION.toString), ) def getFilter(rc: UnlockedRequestCache, arg: String): ReportingFilter[Person] = new ReportingFilterFunction(rc, (_rc: UnlockedRequestCache) => { diff --git a/app/org/sailcbi/APIServer/Reports/ApClassRoster/ApClassRoster.scala b/app/org/sailcbi/APIServer/Reports/ApClassRoster/ApClassRoster.scala index 2553455e..37f608b4 100644 --- a/app/org/sailcbi/APIServer/Reports/ApClassRoster/ApClassRoster.scala +++ b/app/org/sailcbi/APIServer/Reports/ApClassRoster/ApClassRoster.scala @@ -4,15 +4,15 @@ import com.coleji.neptune.PDFBox.Abstract.AbstractTable import com.coleji.neptune.PDFBox.PDFReport import org.apache.pdfbox.pdmodel.PDDocument import org.apache.pdfbox.pdmodel.common.PDRectangle -import org.apache.pdfbox.pdmodel.font.{PDFont, PDType1Font} +import org.apache.pdfbox.pdmodel.font.{PDFont, PDType1Font, Standard14Fonts} import org.sailcbi.APIServer.Reports.ApClassRoster.Model.{ApClassRosterModel, ApRosterData, ApSignupNotesData, ApSpecialNeedsData} import org.sailcbi.APIServer.Reports.ApClassRoster.View.{ApClassRosterView, ApRosterTitle, ApSignupNotesView, ApSpecialNeedsView} import java.awt.Color class ApClassRoster(data: ApClassRosterModel) extends PDFReport(data) { - val defaultFont: PDFont = PDType1Font.HELVETICA - val defaultBoldFont: PDFont = PDType1Font.HELVETICA_BOLD + val defaultFont: PDFont = new PDType1Font(Standard14Fonts.FontName.HELVETICA) + val defaultBoldFont: PDFont = new PDType1Font(Standard14Fonts.FontName.HELVETICA_BOLD) val defaultFontSize: Float = 13f val defaultColor: Color = Color.BLACK diff --git a/app/org/sailcbi/APIServer/Reports/DailyCloseReport/DailyCloseReport.scala b/app/org/sailcbi/APIServer/Reports/DailyCloseReport/DailyCloseReport.scala index 1693a862..90cfde9c 100644 --- a/app/org/sailcbi/APIServer/Reports/DailyCloseReport/DailyCloseReport.scala +++ b/app/org/sailcbi/APIServer/Reports/DailyCloseReport/DailyCloseReport.scala @@ -4,7 +4,7 @@ import com.coleji.neptune.PDFBox.{ContentStreamDecorator, PDFReport} import com.coleji.neptune.Util.Currency import org.apache.pdfbox.pdmodel.PDDocument import org.apache.pdfbox.pdmodel.common.PDRectangle -import org.apache.pdfbox.pdmodel.font.{PDFont, PDType1Font} +import org.apache.pdfbox.pdmodel.font.{PDFont, PDType1Font, Standard14Fonts} import org.sailcbi.APIServer.Reports.DailyCloseReport.Model.DailyCloseReportModel import org.sailcbi.APIServer.Reports.DailyCloseReport.View.ChecksARPage.ChecksARPage import org.sailcbi.APIServer.Reports.DailyCloseReport.View.FirstPage.FirstPage @@ -14,8 +14,8 @@ import org.sailcbi.APIServer.Reports.DailyCloseReport.View.ReceiptsPage.Receipts import java.awt.Color class DailyCloseReport(data: DailyCloseReportModel) extends PDFReport(data) { - val defaultFont: PDFont = PDType1Font.HELVETICA - val defaultBoldFont: PDFont = PDType1Font.HELVETICA_BOLD + val defaultFont: PDFont = new PDType1Font(Standard14Fonts.FontName.HELVETICA) + val defaultBoldFont: PDFont =new PDType1Font(Standard14Fonts.FontName.HELVETICA_BOLD) val defaultFontSize: Float = 13f val defaultColor: Color = Color.BLACK diff --git a/app/org/sailcbi/APIServer/Reports/JpClassRoster/JpClassRoster.scala b/app/org/sailcbi/APIServer/Reports/JpClassRoster/JpClassRoster.scala index 6bdb87e7..b8437aa1 100644 --- a/app/org/sailcbi/APIServer/Reports/JpClassRoster/JpClassRoster.scala +++ b/app/org/sailcbi/APIServer/Reports/JpClassRoster/JpClassRoster.scala @@ -4,15 +4,15 @@ import com.coleji.neptune.PDFBox.Abstract.AbstractTable import com.coleji.neptune.PDFBox.PDFReport import org.apache.pdfbox.pdmodel.PDDocument import org.apache.pdfbox.pdmodel.common.PDRectangle -import org.apache.pdfbox.pdmodel.font.{PDFont, PDType1Font} +import org.apache.pdfbox.pdmodel.font.{PDFont, PDType1Font, Standard14Fonts} import org.sailcbi.APIServer.Reports.JpClassRoster.Model.{JpClassRosterModel, JpRosterData, JpSignupNotesData, JpSpecialNeedsData} import org.sailcbi.APIServer.Reports.JpClassRoster.View.{JpClassRosterView, JpRosterTitle, JpSignupNotesView, JpSpecialNeedsView} import java.awt.Color class JpClassRoster(data: JpClassRosterModel) extends PDFReport(data) { - val defaultFont: PDFont = PDType1Font.HELVETICA - val defaultBoldFont: PDFont = PDType1Font.HELVETICA_BOLD + val defaultFont: PDFont = new PDType1Font(Standard14Fonts.FontName.HELVETICA) + val defaultBoldFont: PDFont = new PDType1Font(Standard14Fonts.FontName.HELVETICA_BOLD) val defaultFontSize: Float = 10f val defaultColor: Color = Color.BLACK diff --git a/app/org/sailcbi/APIServer/Reports/JpSpecialNeedsReport/JpSpecialNeedsReport.scala b/app/org/sailcbi/APIServer/Reports/JpSpecialNeedsReport/JpSpecialNeedsReport.scala index 704c03dc..df3eb809 100644 --- a/app/org/sailcbi/APIServer/Reports/JpSpecialNeedsReport/JpSpecialNeedsReport.scala +++ b/app/org/sailcbi/APIServer/Reports/JpSpecialNeedsReport/JpSpecialNeedsReport.scala @@ -3,15 +3,15 @@ package org.sailcbi.APIServer.Reports.JpSpecialNeedsReport import com.coleji.neptune.PDFBox.Abstract.AbstractTable import com.coleji.neptune.PDFBox.PDFReport import org.apache.pdfbox.pdmodel.PDDocument -import org.apache.pdfbox.pdmodel.font.{PDFont, PDType1Font} +import org.apache.pdfbox.pdmodel.font.{PDFont, PDType1Font, Standard14Fonts} import org.sailcbi.APIServer.Reports.JpSpecialNeedsReport.Model.{JpSpecialNeedsData, JpSpecialNeedsReportModel} import org.sailcbi.APIServer.Reports.JpSpecialNeedsReport.View.JpSpecialNeedsView import java.awt.Color class JpSpecialNeedsReport(data: JpSpecialNeedsReportModel) extends PDFReport(data) { - val defaultFont: PDFont = PDType1Font.HELVETICA - val defaultBoldFont: PDFont = PDType1Font.HELVETICA_BOLD + val defaultFont: PDFont = new PDType1Font(Standard14Fonts.FontName.HELVETICA) + val defaultBoldFont: PDFont = new PDType1Font(Standard14Fonts.FontName.HELVETICA_BOLD) val defaultFontSize: Float = 11f val defaultColor: Color = Color.BLACK diff --git a/app/org/sailcbi/APIServer/UserTypes/ApexRequestCache.scala b/app/org/sailcbi/APIServer/UserTypes/ApexRequestCache.scala index e56ab9c0..f7d4288d 100644 --- a/app/org/sailcbi/APIServer/UserTypes/ApexRequestCache.scala +++ b/app/org/sailcbi/APIServer/UserTypes/ApexRequestCache.scala @@ -4,10 +4,10 @@ import com.coleji.neptune.Core._ import com.coleji.neptune.IO.PreparedQueries.PreparedQueryForSelect import com.coleji.neptune.Storable.ResultSetWrapper import com.coleji.neptune.Util.PropertiesWrapper -import com.redis.RedisClientPool import org.sailcbi.APIServer.Server.CBIBootLoaderLive +import redis.clients.jedis.JedisPool -class ApexRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool) +class ApexRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool) extends LockedRequestCacheWithStripeController(userName, serverParams, dbGateway, redisPool) { override def companion: RequestCacheObject[ApexRequestCache] = ApexRequestCache } @@ -17,10 +17,10 @@ object ApexRequestCache extends RequestCacheObject[ApexRequestCache] { override val requireCORSPass: Boolean = false - override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool): ApexRequestCache = + override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool): ApexRequestCache = new ApexRequestCache(userName, serverParams, dbGateway, redisPool) - def create(serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool): ApexRequestCache = create(uniqueUserName, serverParams, dbGateway, redisPool) + def create(serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool): ApexRequestCache = create(uniqueUserName, serverParams, dbGateway, redisPool) override def getAuthenticatedUsernameInRequest( request: ParsedRequest, diff --git a/app/org/sailcbi/APIServer/UserTypes/BouncerRequestCache.scala b/app/org/sailcbi/APIServer/UserTypes/BouncerRequestCache.scala index 249fa5e3..2ecb788a 100644 --- a/app/org/sailcbi/APIServer/UserTypes/BouncerRequestCache.scala +++ b/app/org/sailcbi/APIServer/UserTypes/BouncerRequestCache.scala @@ -2,10 +2,10 @@ package org.sailcbi.APIServer.UserTypes import com.coleji.neptune.Core._ import com.coleji.neptune.Util.PropertiesWrapper -import com.redis.RedisClientPool import org.sailcbi.APIServer.Entities.EntityDefinitions.User +import redis.clients.jedis.JedisPool -class BouncerRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool) +class BouncerRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool) extends LockedRequestCache(userName, serverParams, dbGateway, redisPool) { override def companion: RequestCacheObject[BouncerRequestCache] = BouncerRequestCache @@ -37,10 +37,10 @@ object BouncerRequestCache extends RequestCacheObject[BouncerRequestCache] { }).flatten } - override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool): BouncerRequestCache = + override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool): BouncerRequestCache = new BouncerRequestCache(userName, serverParams, dbGateway, redisPool) - def create(serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool): BouncerRequestCache = create(uniqueUserName, serverParams, dbGateway, redisPool) + def create(serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool): BouncerRequestCache = create(uniqueUserName, serverParams, dbGateway, redisPool) override def getAuthenticatedUsernameInRequest( request: ParsedRequest, diff --git a/app/org/sailcbi/APIServer/UserTypes/KioskRequestCache.scala b/app/org/sailcbi/APIServer/UserTypes/KioskRequestCache.scala index afb01d87..35c655d9 100644 --- a/app/org/sailcbi/APIServer/UserTypes/KioskRequestCache.scala +++ b/app/org/sailcbi/APIServer/UserTypes/KioskRequestCache.scala @@ -2,10 +2,10 @@ package org.sailcbi.APIServer.UserTypes import com.coleji.neptune.Core._ import com.coleji.neptune.Util.PropertiesWrapper -import com.redis.RedisClientPool import org.sailcbi.APIServer.Server.CBIBootLoaderLive +import redis.clients.jedis.JedisPool -class KioskRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool) +class KioskRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool) extends LockedRequestCache(userName, serverParams, dbGateway, redisPool) { override def companion: RequestCacheObject[KioskRequestCache] = KioskRequestCache } @@ -15,10 +15,10 @@ object KioskRequestCache extends RequestCacheObject[KioskRequestCache] { override val requireCORSPass: Boolean = false - override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool): KioskRequestCache = + override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool): KioskRequestCache = new KioskRequestCache(userName, serverParams, dbGateway, redisPool) - def create(serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool): KioskRequestCache = create(uniqueUserName, serverParams, dbGateway, redisPool) + def create(serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool): KioskRequestCache = create(uniqueUserName, serverParams, dbGateway, redisPool) override def getAuthenticatedUsernameInRequest( request: ParsedRequest, diff --git a/app/org/sailcbi/APIServer/UserTypes/LockedRequestCacheWithStripeController.scala b/app/org/sailcbi/APIServer/UserTypes/LockedRequestCacheWithStripeController.scala index 4c43d0f3..c867ba76 100644 --- a/app/org/sailcbi/APIServer/UserTypes/LockedRequestCacheWithStripeController.scala +++ b/app/org/sailcbi/APIServer/UserTypes/LockedRequestCacheWithStripeController.scala @@ -3,16 +3,16 @@ package org.sailcbi.APIServer.UserTypes import com.coleji.neptune.Core.{DatabaseGateway, LockedRequestCache} import com.coleji.neptune.IO.HTTP.FromWSClient import com.coleji.neptune.Util.PropertiesWrapper -import com.redis.RedisClientPool import org.sailcbi.APIServer.IO.StripeAPIIO.{StripeAPIIOLiveService, StripeAPIIOMechanism} import org.sailcbi.APIServer.IO.StripeDatabaseIO.StripeDatabaseIOMechanism import org.sailcbi.APIServer.IO.StripeIOController import org.sailcbi.APIServer.Server.CBIBootLoaderLive import play.api.libs.ws.WSClient +import redis.clients.jedis.JedisPool import scala.concurrent.ExecutionContext -abstract class LockedRequestCacheWithStripeController(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool) +abstract class LockedRequestCacheWithStripeController(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool) extends LockedRequestCache(userName, serverParams, dbGateway, redisPool) { private def getStripeAPIIOMechanism(ws: WSClient)(implicit exec: ExecutionContext): StripeAPIIOMechanism = new StripeAPIIOLiveService( "https://api.stripe.com/v1/", diff --git a/app/org/sailcbi/APIServer/UserTypes/MemberRequestCache.scala b/app/org/sailcbi/APIServer/UserTypes/MemberRequestCache.scala index 73f5d9da..01c66ae2 100644 --- a/app/org/sailcbi/APIServer/UserTypes/MemberRequestCache.scala +++ b/app/org/sailcbi/APIServer/UserTypes/MemberRequestCache.scala @@ -5,14 +5,14 @@ import com.coleji.neptune.Exception.MuteEmailException import com.coleji.neptune.IO.PreparedQueries.PreparedQueryForSelect import com.coleji.neptune.Storable.ResultSetWrapper import com.coleji.neptune.Util.PropertiesWrapper -import com.redis.RedisClientPool import org.sailcbi.APIServer.Entities.MagicIds import play.api.mvc.Result +import redis.clients.jedis.JedisPool import scala.concurrent.{ExecutionContext, Future} -class MemberRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool) +class MemberRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool) extends LockedRequestCacheWithStripeController(userName, serverParams, dbGateway, redisPool) { override def companion: RequestCacheObject[MemberRequestCache] = MemberRequestCache @@ -50,7 +50,7 @@ extends LockedRequestCacheWithStripeController(userName, serverParams, dbGateway } object MemberRequestCache extends RequestCacheObject[MemberRequestCache] { - override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool): MemberRequestCache = + override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool): MemberRequestCache = new MemberRequestCache(userName, serverParams, dbGateway, redisPool) override def getAuthenticatedUsernameInRequest( diff --git a/app/org/sailcbi/APIServer/UserTypes/ProtoPersonRequestCache.scala b/app/org/sailcbi/APIServer/UserTypes/ProtoPersonRequestCache.scala index b9ee42dc..1b126f26 100644 --- a/app/org/sailcbi/APIServer/UserTypes/ProtoPersonRequestCache.scala +++ b/app/org/sailcbi/APIServer/UserTypes/ProtoPersonRequestCache.scala @@ -4,10 +4,10 @@ import com.coleji.neptune.Core._ import com.coleji.neptune.IO.PreparedQueries.PreparedQueryForSelect import com.coleji.neptune.Storable.ResultSetWrapper import com.coleji.neptune.Util.PropertiesWrapper -import com.redis.RedisClientPool import org.sailcbi.APIServer.Entities.MagicIds +import redis.clients.jedis.JedisPool -class ProtoPersonRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool) +class ProtoPersonRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool) extends LockedRequestCacheWithStripeController(userName, serverParams, dbGateway, redisPool) { override def companion: RequestCacheObject[ProtoPersonRequestCache] = ProtoPersonRequestCache @@ -48,7 +48,7 @@ object ProtoPersonRequestCache extends RequestCacheObject[ProtoPersonRequestCach override val requireCORSPass: Boolean = false - override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool): ProtoPersonRequestCache = + override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool): ProtoPersonRequestCache = new ProtoPersonRequestCache(userName, serverParams, dbGateway, redisPool) override def getAuthenticatedUsernameInRequest( diff --git a/app/org/sailcbi/APIServer/UserTypes/PublicRequestCache.scala b/app/org/sailcbi/APIServer/UserTypes/PublicRequestCache.scala index 21bbab08..83197033 100644 --- a/app/org/sailcbi/APIServer/UserTypes/PublicRequestCache.scala +++ b/app/org/sailcbi/APIServer/UserTypes/PublicRequestCache.scala @@ -2,9 +2,9 @@ package org.sailcbi.APIServer.UserTypes import com.coleji.neptune.Core._ import com.coleji.neptune.Util.PropertiesWrapper -import com.redis.RedisClientPool +import redis.clients.jedis.JedisPool -class PublicRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool) +class PublicRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool) extends LockedRequestCacheWithStripeController(userName, serverParams, dbGateway, redisPool) { override def companion: RequestCacheObject[PublicRequestCache] = PublicRequestCache } @@ -14,10 +14,10 @@ object PublicRequestCache extends RequestCacheObject[PublicRequestCache] { override val requireCORSPass: Boolean = false - override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool): PublicRequestCache = + override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool): PublicRequestCache = new PublicRequestCache(userName, serverParams, dbGateway, redisPool) - def create(serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool): PublicRequestCache = create(uniqueUserName, serverParams, dbGateway, redisPool) + def create(serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool): PublicRequestCache = create(uniqueUserName, serverParams, dbGateway, redisPool) override def getAuthenticatedUsernameInRequest( request: ParsedRequest, diff --git a/app/org/sailcbi/APIServer/UserTypes/StaffRequestCache.scala b/app/org/sailcbi/APIServer/UserTypes/StaffRequestCache.scala index b5b1bce4..eba9e746 100644 --- a/app/org/sailcbi/APIServer/UserTypes/StaffRequestCache.scala +++ b/app/org/sailcbi/APIServer/UserTypes/StaffRequestCache.scala @@ -5,10 +5,10 @@ import com.coleji.neptune.Core.access.Permission import com.coleji.neptune.IO.PreparedQueries.PreparedQueryForSelect import com.coleji.neptune.Storable.ResultSetWrapper import com.coleji.neptune.Util.PropertiesWrapper -import com.redis.RedisClientPool import org.sailcbi.APIServer.Entities.access.CbiUserPermissionsAuthority +import redis.clients.jedis.JedisPool -class StaffRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool) +class StaffRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool) extends UnlockedRequestCache(userName, serverParams, dbGateway, redisPool) { override def companion: RequestCacheObject[StaffRequestCache] = StaffRequestCache @@ -20,7 +20,7 @@ extends UnlockedRequestCache(userName, serverParams, dbGateway, redisPool) { } object StaffRequestCache extends RequestCacheObject[StaffRequestCache] { - override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool): StaffRequestCache = + override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool): StaffRequestCache = new StaffRequestCache(userName, serverParams, dbGateway, redisPool) override def getAuthenticatedUsernameInRequest( diff --git a/app/org/sailcbi/APIServer/UserTypes/SymonRequestCache.scala b/app/org/sailcbi/APIServer/UserTypes/SymonRequestCache.scala index b2b5c42b..2f7d2649 100644 --- a/app/org/sailcbi/APIServer/UserTypes/SymonRequestCache.scala +++ b/app/org/sailcbi/APIServer/UserTypes/SymonRequestCache.scala @@ -3,15 +3,15 @@ package org.sailcbi.APIServer.UserTypes import com.coleji.neptune.Core._ import com.coleji.neptune.Util.DateUtil.HOME_TIME_ZONE import com.coleji.neptune.Util.PropertiesWrapper -import com.redis.RedisClientPool import org.sailcbi.APIServer.Server.CBIBootLoaderLive +import redis.clients.jedis.JedisPool import java.math.BigInteger import java.security.MessageDigest import java.time.ZonedDateTime import java.time.format.DateTimeFormatter -class SymonRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool) +class SymonRequestCache(override val userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool) extends LockedRequestCache(userName, serverParams, dbGateway, redisPool) { override def companion: RequestCacheObject[SymonRequestCache] = SymonRequestCache } @@ -21,10 +21,11 @@ object SymonRequestCache extends RequestCacheObject[SymonRequestCache] { override val requireCORSPass: Boolean = false - override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool): SymonRequestCache = + override def create(userName: String, serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool + ): SymonRequestCache = new SymonRequestCache(userName, serverParams, dbGateway, redisPool) - def create(serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: RedisClientPool): SymonRequestCache = create(uniqueUserName, serverParams, dbGateway, redisPool) + def create(serverParams: PropertiesWrapper, dbGateway: DatabaseGateway, redisPool: JedisPool): SymonRequestCache = create(uniqueUserName, serverParams, dbGateway, redisPool) private def validateSymonHash( diff --git a/build.sbt b/build.sbt index adf92199..d607eba3 100644 --- a/build.sbt +++ b/build.sbt @@ -4,7 +4,7 @@ version := "0.1.0" lazy val root = (project in file(".")).enablePlugins(PlayScala, DebianPlugin) -scalaVersion := "2.12.11" +scalaVersion := "2.13.12" // rel 11 sep 2023 maintainer in Linux := "Jonathan Cole " @@ -20,23 +20,41 @@ libraryDependencies += filters libraryDependencies += guice //libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "2.0.0" % Test -libraryDependencies += "org.scalactic" %% "scalactic" % "3.0.4" -libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.4" % "test" +// https://mvnrepository.com/artifact/org.scalactic/scalactic +libraryDependencies += "org.scalactic" %% "scalactic" % "3.2.17" // rel 7 sep 2023 -libraryDependencies += "org.scalaj" %% "scalaj-http" % "2.3.0" +// https://mvnrepository.com/artifact/org.scalatest/scalatest +libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.17" % Test // rel 7 sep 2023 -libraryDependencies +="net.debasishg" %% "redisclient" % "3.4" -libraryDependencies +="com.zaxxer" % "HikariCP" % "3.3.1" +// https://mvnrepository.com/artifact/org.scalatestplus/junit-4-13 +libraryDependencies += "org.scalatestplus" %% "junit-4-13" % "3.2.17.0" % Test // rel 7 sep 2023 -libraryDependencies += "io.sentry" % "sentry" % "1.7.27" +// https://mvnrepository.com/artifact/org.scalaj/scalaj-http +libraryDependencies += "org.scalaj" %% "scalaj-http" % "2.4.2" // rel 15 jun 2019 +// https://mvnrepository.com/artifact/redis.clients/jedis +libraryDependencies += "redis.clients" % "jedis" % "5.1.0" // rel 21 nov 2023 + +// https://mvnrepository.com/artifact/com.zaxxer/HikariCP +libraryDependencies += "com.zaxxer" % "HikariCP" % "5.1.0" // rel 4 nov 2023 + +// https://mvnrepository.com/artifact/io.sentry/sentry +libraryDependencies += "io.sentry" % "sentry" % "6.34.0" // rel 20 nov 2023 + +// https://mvnrepository.com/artifact/net.sf.barcode4j/barcode4j libraryDependencies += "net.sf.barcode4j" % "barcode4j" % "2.1" // https://mvnrepository.com/artifact/mysql/mysql-connector-java -libraryDependencies += "mysql" % "mysql-connector-java" % "8.0.30" +libraryDependencies += "mysql" % "mysql-connector-java" % "8.0.30" // rel 25 jul 2022 // https://mvnrepository.com/artifact/org.apache.commons/commons-csv -libraryDependencies += "org.apache.commons" % "commons-csv" % "1.10.0" +libraryDependencies += "org.apache.commons" % "commons-csv" % "1.10.0" // rel 02 feb 2023 + +// https://mvnrepository.com/artifact/org.apache.pdfbox/fontbox +libraryDependencies += "org.apache.pdfbox" % "fontbox" % "3.0.0" // rel 18 aug 2023 + +// https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox +libraryDependencies += "org.apache.pdfbox" % "pdfbox" % "3.0.0" // rel 18 aug 2023 /* diff --git a/cp-schema.sh b/cp-schema.sh index a47beef5..74b3c1f1 100755 --- a/cp-schema.sh +++ b/cp-schema.sh @@ -1,2 +1,5 @@ rm ./app/org/sailcbi/APIServer/Api/Endpoints/Dto/* -r cp ../cbidb-schema/out/api/scala/* ./app/org/sailcbi/APIServer/Api/Endpoints/Dto/ -r + +rm ./app/org/sailcbi/APIServer/Entities/EntityDefinitions/* -r +cp ../cbidb-schema/out/entities/* ./app/org/sailcbi/APIServer/Entities/EntityDefinitions/ -r diff --git a/lib/fontbox-2.0.9.jar b/lib/fontbox-2.0.9.jar deleted file mode 100644 index dd348b1d..00000000 Binary files a/lib/fontbox-2.0.9.jar and /dev/null differ diff --git a/lib/mchange-commons-java-0.2.11.jar b/lib/mchange-commons-java-0.2.11.jar deleted file mode 100644 index 88f1d47d..00000000 Binary files a/lib/mchange-commons-java-0.2.11.jar and /dev/null differ diff --git a/lib/pdfbox-2.0.9-sources.jar b/lib/pdfbox-2.0.9-sources.jar deleted file mode 100644 index 99cb35ec..00000000 Binary files a/lib/pdfbox-2.0.9-sources.jar and /dev/null differ diff --git a/lib/pdfbox-2.0.9.jar b/lib/pdfbox-2.0.9.jar deleted file mode 100644 index 6912ee8e..00000000 Binary files a/lib/pdfbox-2.0.9.jar and /dev/null differ diff --git a/project/build.properties b/project/build.properties index 984c836f..ad9a8d4d 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1,4 +1,5 @@ #Activator-generated Properties #Tue Oct 04 16:50:56 CDT 2016 template.uuid=82948ff9-9860-41c3-b22c-da63623499e5 -sbt.version=1.3.10 +# rel 22 oct 2023 +sbt.version=1.9.7 diff --git a/project/plugins.sbt b/project/plugins.sbt index 01e0225b..1d11adc8 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ // The Play plugin -addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.2") +addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.9.0") // rel 25 oct 2023 // web plugins diff --git a/test/org/sailcbi/APIServer/CbiUtil/CurrencyFormatTest.scala b/test/org/sailcbi/APIServer/CbiUtil/CurrencyFormatTest.scala index 42dce234..a91bdb68 100644 --- a/test/org/sailcbi/APIServer/CbiUtil/CurrencyFormatTest.scala +++ b/test/org/sailcbi/APIServer/CbiUtil/CurrencyFormatTest.scala @@ -2,11 +2,11 @@ package org.sailcbi.APIServer.CbiUtil import com.coleji.neptune.Util.CurrencyFormat import org.junit.runner.RunWith -import org.scalatest.FunSuite -import org.scalatest.junit.JUnitRunner +import org.scalatest.funsuite.AnyFunSuite +import org.scalatestplus.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) -class CurrencyFormatTest extends FunSuite { +class CurrencyFormatTest extends AnyFunSuite { test("DoubleCents") { assert(CurrencyFormat.withCents(123.45) == "$123.45") } diff --git a/test/org/sailcbi/APIServer/CbiUtil/CurrencyTest.scala b/test/org/sailcbi/APIServer/CbiUtil/CurrencyTest.scala index c07094a0..90e53941 100644 --- a/test/org/sailcbi/APIServer/CbiUtil/CurrencyTest.scala +++ b/test/org/sailcbi/APIServer/CbiUtil/CurrencyTest.scala @@ -2,11 +2,11 @@ package org.sailcbi.APIServer.CbiUtil import com.coleji.neptune.Util.Currency import org.junit.runner.RunWith -import org.scalatest.FunSuite -import org.scalatest.junit.JUnitRunner +import org.scalatest.funsuite.AnyFunSuite +import org.scalatestplus.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) -class CurrencyTest extends FunSuite { +class CurrencyTest extends AnyFunSuite { // Formats test("DollarsDouble") { assert(Currency.dollars(123.45).format() == "$123.45") diff --git a/test/org/sailcbi/APIServer/DBSeedState.scala b/test/org/sailcbi/APIServer/DBSeedState.scala index b7f405e3..ad8d3dfc 100644 --- a/test/org/sailcbi/APIServer/DBSeedState.scala +++ b/test/org/sailcbi/APIServer/DBSeedState.scala @@ -4,13 +4,13 @@ import com.coleji.neptune.Core.RootRequestCache import org.junit.runner.RunWith import org.sailcbi.APIServer.Entities.EntityDefinitions.User import org.sailcbi.APIServer.Server.CBIBootLoaderTest -import org.scalatest.FunSuite -import org.scalatest.junit.JUnitRunner +import org.scalatest.funsuite.AnyFunSuite +import org.scalatestplus.junit.JUnitRunner import javax.inject.Inject @RunWith(classOf[JUnitRunner]) -class DBSeedState @Inject()(loader: CBIBootLoaderTest) extends FunSuite { +class DBSeedState @Inject()(loader: CBIBootLoaderTest) extends AnyFunSuite { // // // test("nuke") { @@ -35,8 +35,8 @@ class DBSeedState @Inject()(loader: CBIBootLoaderTest) extends FunSuite { val seedState = List( new User() .update(_.active, true) - .update(_.nameFirst, Some("Bob")) - .update(_.nameLast, Some("Smith")) + .update(_.nameFirst, "Bob") + .update(_.nameLast, "Smith") .update(_.userName, "bsmith") .update(_.email, "bsmith@sdfg.com") .withPK(9998) @@ -48,7 +48,7 @@ class DBSeedState @Inject()(loader: CBIBootLoaderTest) extends FunSuite { val user = users.head println("Seed user has id " + user.getID) val startingValue = user.values.nameLast.get - user.values.nameLast.initialize(Some(user.values.nameLast.get.get + "!")) + user.values.nameLast.initialize(user.values.nameLast.get + "!") rc.commitObjectToDatabase(user) val usersAgain = rc.getAllObjectsOfClass(User, Set(User.fields.userId, User.fields.nameFirst, User.fields.nameLast, User.fields.active)) diff --git a/test/org/sailcbi/APIServer/DBTest.scala b/test/org/sailcbi/APIServer/DBTest.scala index 6e5d9a07..76c9fb35 100644 --- a/test/org/sailcbi/APIServer/DBTest.scala +++ b/test/org/sailcbi/APIServer/DBTest.scala @@ -5,13 +5,13 @@ import com.coleji.neptune.IO.PreparedQueries.{PreparedQueryForInsert, PreparedQu import org.junit.runner.RunWith import org.sailcbi.APIServer.Entities.EntityDefinitions.{JpClassType, MembershipType} import org.sailcbi.APIServer.Server.CBIBootLoaderTest -import org.scalatest.FunSuite -import org.scalatest.junit.JUnitRunner +import org.scalatest.funsuite.AnyFunSuite +import org.scalatestplus.junit.JUnitRunner import javax.inject.Inject @RunWith(classOf[JUnitRunner]) -class DBTest @Inject()(loader: CBIBootLoaderTest) extends FunSuite { +class DBTest @Inject()(loader: CBIBootLoaderTest) extends AnyFunSuite { test("dbaccess") { loader.withPA(pa => { val rc = loader.assertRC(pa)(RootRequestCache, RootRequestCache.uniqueUserName) diff --git a/test/org/sailcbi/APIServer/Logic/MembershipLogicTest.scala b/test/org/sailcbi/APIServer/Logic/MembershipLogicTest.scala index 8720bad7..11353bd2 100644 --- a/test/org/sailcbi/APIServer/Logic/MembershipLogicTest.scala +++ b/test/org/sailcbi/APIServer/Logic/MembershipLogicTest.scala @@ -1,13 +1,13 @@ package org.sailcbi.APIServer.Logic import org.junit.runner.RunWith -import org.scalatest.FunSuite -import org.scalatest.junit.JUnitRunner +import org.scalatest.funsuite.AnyFunSuite +import org.scalatestplus.junit.JUnitRunner import java.time.LocalDate @RunWith(classOf[JUnitRunner]) -class MembershipLogicTest extends FunSuite { +class MembershipLogicTest extends AnyFunSuite { test("start dates from purchase dates") { val year = 2021 diff --git a/test/org/sailcbi/APIServer/Temp.scala b/test/org/sailcbi/APIServer/Temp.scala index 8a10abec..a43a0d86 100644 --- a/test/org/sailcbi/APIServer/Temp.scala +++ b/test/org/sailcbi/APIServer/Temp.scala @@ -7,15 +7,15 @@ import com.coleji.neptune.Util.DateUtil import org.junit.runner.RunWith import org.sailcbi.APIServer.Server.CBIBootLoaderTest import org.scalatest -import org.scalatest.FunSuite -import org.scalatest.junit.JUnitRunner +import org.scalatest.funsuite.AnyFunSuite +import org.scalatestplus.junit.JUnitRunner import java.time.temporal.ChronoUnit import java.time.{LocalDate, LocalDateTime, ZonedDateTime} import javax.inject.Inject @RunWith(classOf[JUnitRunner]) -class Temp @Inject()(loader: CBIBootLoaderTest) extends FunSuite { +class Temp @Inject()(loader: CBIBootLoaderTest) extends AnyFunSuite { def testPreparedDate[T](d: T, prepare: T => PreparedValue, getFromRSW: ResultSetWrapper => T)(pa: PermissionsAuthority): scalatest.Assertion = { val rc = loader.assertRC(pa)(RootRequestCache, RootRequestCache.uniqueUserName) diff --git a/test/org/sailcbi/APIServer/Test/IO/PreparedQueries/PreparedValueTest.scala b/test/org/sailcbi/APIServer/Test/IO/PreparedQueries/PreparedValueTest.scala index a506b5bb..d0620bca 100644 --- a/test/org/sailcbi/APIServer/Test/IO/PreparedQueries/PreparedValueTest.scala +++ b/test/org/sailcbi/APIServer/Test/IO/PreparedQueries/PreparedValueTest.scala @@ -5,14 +5,14 @@ import com.coleji.neptune.Core.RootRequestCache import com.coleji.neptune.IO.PreparedQueries.{PreparedQueryForInsert, PreparedValue} import org.junit.runner.RunWith import org.sailcbi.APIServer.Server.CBIBootLoaderTest -import org.scalatest.FunSuite -import org.scalatest.junit.JUnitRunner +import org.scalatest.funsuite.AnyFunSuite +import org.scalatestplus.junit.JUnitRunner import java.time.LocalDateTime import javax.inject.Inject @RunWith(classOf[JUnitRunner]) -class PreparedValueTest @Inject()(loader: CBIBootLoaderTest) extends FunSuite { +class PreparedValueTest @Inject()(loader: CBIBootLoaderTest) extends AnyFunSuite { test("dfgh") { loader.withPAWriteable(pa => { val rc = loader.assertRC(pa)(RootRequestCache, RootRequestCache.uniqueUserName)