add some more cols

This commit is contained in:
gowthaman.b 2024-04-28 19:30:30 +05:30
parent bb51bb448f
commit 3f4c53c6cc
3 changed files with 23 additions and 3 deletions

View File

@ -7,14 +7,18 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import io.ebean.Model import io.ebean.Model
import io.ebean.annotation.* import io.ebean.annotation.*
import io.ebean.annotation.Index import io.ebean.annotation.Index
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STRestartNumber
import java.time.LocalDate import java.time.LocalDate
import java.time.LocalDateTime import java.time.LocalDateTime
import javax.persistence.* import javax.persistence.*
data class Comments(val text: String = "", val by: String = "", val at: LocalDateTime = LocalDateTime.now()) data class Comments(val text: String = "", val by: String = "", val at: LocalDateTime = LocalDateTime.now())
data class POProducts( 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.vehicle = updated.vehicle
this.products = updated.products this.products = updated.products
this.vendor = updated.vendor this.vendor = updated.vendor
this.loading = updated.loading
this.unloading = updated.unloading
} }
var mrn: String? = null var mrn: String? = null
@ -420,6 +426,8 @@ open class IncomingInventory : BaseTenantModel() {
var vendorBillNum: String? = null var vendorBillNum: String? = null
var vendorBillAmount: Double = 0.0 var vendorBillAmount: Double = 0.0
var vehicle: String = "" var vehicle: String = ""
var loading: String? = ""
var unloading: String? = ""
@DbJsonB @DbJsonB
var products: List<POProducts>? = null var products: List<POProducts>? = null
@ -632,7 +640,7 @@ open class ReminderLog : BaseTenantModel() {
} }
@Entity @Entity
@Index(name="plantid_idx", columnNames = ["plant_id"], unique = true) @Index(name = "plantid_idx", columnNames = ["plant_id"], unique = true)
open class Plant : BaseModel() { open class Plant : BaseModel() {
var plantId: String = "" var plantId: String = ""
var plantName: String = "" var plantName: String = ""

View 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);

View 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>