Skip to content
Snippets Groups Projects
Select Git revision
  • master
1 result

OrderDAO.kt

Blame
  • OrderDAO.kt 698 B
    package com.example.dao
    
    import com.example.dao.ToppingDAO.Companion.referrersOn
    import com.example.dao.tables.OrderItemTable
    import com.example.dao.tables.OrderTable
    import com.example.dao.tables.UserTable
    import org.jetbrains.exposed.dao.IntEntity
    import org.jetbrains.exposed.dao.IntEntityClass
    import org.jetbrains.exposed.dao.id.EntityID
    
    class OrderDAO(id: EntityID<Int>) : IntEntity(id) {
        companion object : IntEntityClass<OrderDAO>(OrderTable)
    
        var customer by UserDAO referencedOn OrderTable.user
        var datetime by OrderTable.date
        var address by OrderTable.address
        var phone by OrderTable.phone
        var payment by OrderTable.payment
    
        var rating by OrderTable.rating
    }