19 lines
372 B
Kotlin
19 lines
372 B
Kotlin
|
package com.chantha.jdbc.jpa.view
|
||
|
|
||
|
import com.chantha.jdbc.jpa.model.Customer
|
||
|
import com.chantha.jdbc.jpa.model.Gender
|
||
|
|
||
|
fun ViewsInvoice.toView():Customer{
|
||
|
return this.toView2()
|
||
|
}
|
||
|
|
||
|
fun ViewsInvoice.toView2(): Customer{
|
||
|
val data=Customer()
|
||
|
data.id=this.id
|
||
|
data.cusName=this.cusName
|
||
|
data.gender=this.gender
|
||
|
data.orders=this.order
|
||
|
return data
|
||
|
}
|
||
|
|