package my.model.auto_generated |
|
|
| import slick.driver.MySQLDriver |
| import scala.concurrent.{Future, ExecutionContext} |
| //import play.api.db.slick.HasDatabaseConfig |
| import my.model._ |
|
|
| //AUTO-GENERATED Slick data model |
|
|
| trait Default { |
|
|
| val driver = MySQLDriver |
| val profile = MySQLDriver |
| import driver.api._ |
|
|
| import slick.model.ForeignKeyAction |
| import slick.collection.heterogeneous._ |
| import slick.collection.heterogeneous.syntax._ |
| // NOTE: GetResult mappers for plain SQL are only generated for tables where Slick knows how to map the types of all columns. |
| import slick.jdbc.{GetResult => GR} |
|
|
| /** DDL for all tables. Call .create to execute. */ |
| lazy val schema: profile.SchemaDescription = Array(`my.cascosDetalles`.schema).reduceLeft(_ ++ _) |
| @deprecated("Use .schema instead of .ddl", "3.0") |
| def ddl = schema |
|
|
| /** Entity class storing rows of table `itsInsurance.cascosDetalles` |
| * @param id Database column id SqlType(INT), PrimaryKey |
| * @param seccionCascosId Database column seccion_cascos_id SqlType(INT) |
| * @param createdAt Database column created_at SqlType(DATETIME) |
| * @param updatedAt Database column updated_at SqlType(DATETIME), Default(None) |
| * @param nombreNave Database column nombre_nave SqlType(VARCHAR), Length(200,true), Default(None) |
| * @param matricula Database column matricula SqlType(VARCHAR), Length(45,true), Default(None) |
| * @param fechaUltimaCarena Database column fecha_ultima_carena SqlType(DATE), Default(None) |
| * @param capitan Database column capitan SqlType(VARCHAR), Length(255,true), Default(None) */ |
|
|
| case class CascosDetalle(id: Int, seccionCascosId: Int, createdAt: java.time.LocalDateTime, updatedAt: Option[java.time.LocalDateTime] = None, nombreNave: Option[String] = None, matricula: Option[String] = None, fechaUltimaCarena: Option[java.time.LocalDate] = None, capitan: Option[String] = None) { |
| def asJs = my.model.auto_generated.SharedDefault.CascosDetalle(id, seccionCascosId, java.time.OffsetDateTime.of(createdAt, java.time.ZoneOffset.ofHours(1)).toEpochSecond, updatedAt.map(e => java.time.OffsetDateTime.of(e, java.time.ZoneOffset.ofHours(1)).toEpochSecond), nombreNave, matricula, fechaUltimaCarena, capitan) |
| } |
| |
| /** GetResult implicit for fetching CascosDetalle objects using plain SQL queries */ |
| implicit def GetResultCascosDetalle(implicit e0: GR[Int], e1: GR[java.time.LocalDateTime], e2: GR[Option[java.time.LocalDateTime]], e3: GR[Option[String]], e4: GR[Option[java.time.LocalDate]]): GR[CascosDetalle] = GR{ |
| prs => import prs._ |
| val r = (<<[Int], <<[Int], <<[java.time.LocalDateTime], <<?[java.time.LocalDateTime], <<?[String], <<?[String], <<?[java.time.LocalDate], <<?[String]) |
| import r._ |
| CascosDetalle.tupled((_1, _2, _3, _4, _5, _6, _7, _8)) // putting AutoInc last |
| } |
| /** Table description of table cascos_detalle. Objects of this class serve as prototypes for rows in queries. */
|
| class CascosDetalleTable(_tableTag: Tag) extends Table[CascosDetalle](_tableTag, "cascos_detalle") { |
| def * = (id, seccionCascosId, createdAt, updatedAt, nombreNave, matricula, fechaUltimaCarena, capitan) <> (CascosDetalle.tupled, CascosDetalle.unapply) |
| /** Maps whole row to an option. Useful for outer joins. */ |
| def ? = (Rep.Some(id), Rep.Some(seccionCascosId), Rep.Some(createdAt), updatedAt, nombreNave, matricula, fechaUltimaCarena, capitan).shaped.<>({r=>import r._; _1.map(_=> CascosDetalle.tupled((_1.get, _2.get, _3.get, _4, _5, _6, _7, _8)))}, (_:Any) => throw new Exception("Inserting into ? projection not supported.")) |
|
|
| /** Database column id SqlType(INT), PrimaryKey */ |
| val id: Rep[Int] = column[Int]("id", O.PrimaryKey) |
| /** Database column seccion_cascos_id SqlType(INT) */ |
| val seccionCascosId: Rep[Int] = column[Int]("seccion_cascos_id") |
| /** Database column created_at SqlType(DATETIME) */ |
| val createdAt: Rep[java.time.LocalDateTime] = column[java.time.LocalDateTime]("created_at") |
| /** Database column updated_at SqlType(DATETIME), Default(None) */ |
| val updatedAt: Rep[Option[java.time.LocalDateTime]] = column[Option[java.time.LocalDateTime]]("updated_at", O.Default(None)) |
| /** Database column nombre_nave SqlType(VARCHAR), Length(200,true), Default(None) */ |
| val nombreNave: Rep[Option[String]] = column[Option[String]]("nombre_nave", O.Length(200,varying=true), O.Default(None)) |
| /** Database column matricula SqlType(VARCHAR), Length(45,true), Default(None) */ |
| val matricula: Rep[Option[String]] = column[Option[String]]("matricula", O.Length(45,varying=true), O.Default(None)) |
| /** Database column fecha_ultima_carena SqlType(DATE), Default(None) */ |
| val fechaUltimaCarena: Rep[Option[java.time.LocalDate]] = column[Option[java.time.LocalDate]]("fecha_ultima_carena", O.Default(None)) |
| /** Database column capitan SqlType(VARCHAR), Length(255,true), Default(None) */ |
| val capitan: Rep[Option[String]] = column[Option[String]]("capitan", O.Length(255,varying=true), O.Default(None)) |
|
|
| /** Foreign key referencing `itsInsurance.polizaSeccionCascos` (database name FK_POLIZA_SECCION_CASCOS_ID_CASOS_DETALLE) */ |
| lazy val polizaSeccionCascosTableFk = foreignKey("FK_POLIZA_SECCION_CASCOS_ID_CASOS_DETALLE", seccionCascosId, `itsInsurance.polizaSeccionCascos`)(r => r.id, onUpdate=ForeignKeyAction.NoAction, onDelete=ForeignKeyAction.NoAction) |
| } |
| /** Collection-like TableQuery object for table `itsInsurance.cascosDetalles` */ |
| lazy val `itsInsurance.cascosDetalles` = new TableQuery(tag => new CascosDetalleTable(tag)) |
| } |