/**
* Swaggy Jenkins
* Jenkins API clients generated from Swagger / Open API specification
*
* The version of the OpenAPI document: 1.5.1-pre.0
* Contact: blah@cliffano.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.database.models

import org.ktorm.dsl.*
import org.ktorm.schema.*
import org.ktorm.database.Database
import .*


/**
 * 
 * @param propertyClass 
 * @param expectedBuildNumber 
 * @param id 
 * @param pipeline 
 * @param queuedTime 
 */
object QueueItemImpls : BaseTable<QueueItemImpl>("QueueItemImpl") {
    val propertyClass = text("_class") /* null */
    val expectedBuildNumber = int("expectedBuildNumber") /* null */
    val id = text("id") /* null */
    val pipeline = text("pipeline") /* null */
    val queuedTime = int("queuedTime") /* null */

    /**
     * Create an entity of type QueueItemImpl from the model
     */
    override fun doCreateEntity(row: QueryRowSet, withReferences: Boolean) = QueueItemImpl(
        propertyClass = row[propertyClass]  /* kotlin.String? */,
        expectedBuildNumber = row[expectedBuildNumber]  /* kotlin.Int? */,
        id = row[id]  /* kotlin.String? */,
        pipeline = row[pipeline]  /* kotlin.String? */,
        queuedTime = row[queuedTime]  /* kotlin.Int? */
    )

    /**
    * Assign all the columns from the entity of type QueueItemImpl to the DML expression.
    *
    * Usage:
    *
    * ```kotlin
    * let entity = QueueItemImpl()
    * database.update(QueueItemImpls, {
    *     assignFrom(entity)
    * })
    * ```
    * @return the builder with the columns for the update or insert.
    */
    fun AssignmentsBuilder.assignFrom(entity: QueueItemImpl) {
        this.apply {
            set(QueueItemImpls.propertyClass, entity.propertyClass)
            set(QueueItemImpls.expectedBuildNumber, entity.expectedBuildNumber)
            set(QueueItemImpls.id, entity.id)
            set(QueueItemImpls.pipeline, entity.pipeline)
            set(QueueItemImpls.queuedTime, entity.queuedTime)
        }
    }

}


