add some more cols
This commit is contained in:
parent
bb51bb448f
commit
3f4c53c6cc
@ -7,14 +7,18 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
||||
import io.ebean.Model
|
||||
import io.ebean.annotation.*
|
||||
import io.ebean.annotation.Index
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STRestartNumber
|
||||
import java.time.LocalDate
|
||||
import java.time.LocalDateTime
|
||||
import javax.persistence.*
|
||||
|
||||
data class Comments(val text: String = "", val by: String = "", val at: LocalDateTime = LocalDateTime.now())
|
||||
data class POProducts(
|
||||
val productId: String = "", val productName: String = "", val unitPrice: Double = 0.0, val quantity: Double = 0.0, val description: String = ""
|
||||
val productId: String = "",
|
||||
val productName: String = "",
|
||||
val unitPrice: Double = 0.0,
|
||||
val quantity: Double = 0.0,
|
||||
val description: String = "",
|
||||
val uom: String = "",
|
||||
)
|
||||
|
||||
|
||||
@ -413,6 +417,8 @@ open class IncomingInventory : BaseTenantModel() {
|
||||
this.vehicle = updated.vehicle
|
||||
this.products = updated.products
|
||||
this.vendor = updated.vendor
|
||||
this.loading = updated.loading
|
||||
this.unloading = updated.unloading
|
||||
}
|
||||
|
||||
var mrn: String? = null
|
||||
@ -420,6 +426,8 @@ open class IncomingInventory : BaseTenantModel() {
|
||||
var vendorBillNum: String? = null
|
||||
var vendorBillAmount: Double = 0.0
|
||||
var vehicle: String = ""
|
||||
var loading: String? = ""
|
||||
var unloading: String? = ""
|
||||
|
||||
@DbJsonB
|
||||
var products: List<POProducts>? = null
|
||||
@ -632,7 +640,7 @@ open class ReminderLog : BaseTenantModel() {
|
||||
}
|
||||
|
||||
@Entity
|
||||
@Index(name="plantid_idx", columnNames = ["plant_id"], unique = true)
|
||||
@Index(name = "plantid_idx", columnNames = ["plant_id"], unique = true)
|
||||
open class Plant : BaseModel() {
|
||||
var plantId: String = ""
|
||||
var plantName: String = ""
|
||||
|
||||
3
src/main/resources/dbmigration/1.25.sql
Normal file
3
src/main/resources/dbmigration/1.25.sql
Normal file
@ -0,0 +1,3 @@
|
||||
-- apply alter tables
|
||||
alter table incoming_inventory add column if not exists loading varchar(255);
|
||||
alter table incoming_inventory add column if not exists unloading varchar(255);
|
||||
9
src/main/resources/dbmigration/model/1.25.model.xml
Normal file
9
src/main/resources/dbmigration/model/1.25.model.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<migration xmlns="http://ebean-orm.github.io/xml/ns/dbmigration">
|
||||
<changeSet type="apply">
|
||||
<addColumn tableName="incoming_inventory">
|
||||
<column name="loading" type="varchar"/>
|
||||
<column name="unloading" type="varchar"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</migration>
|
||||
Loading…
x
Reference in New Issue
Block a user