| @@ -2,6 +2,7 @@ package com.ffii.fpsms.modules.stock.entity | |||||
| import com.ffii.core.entity.BaseEntity | import com.ffii.core.entity.BaseEntity | ||||
| import com.ffii.fpsms.modules.master.entity.Shop | import com.ffii.fpsms.modules.master.entity.Shop | ||||
| import com.ffii.fpsms.modules.purchaseOrder.entity.PurchaseOrder | |||||
| import com.ffii.fpsms.modules.stock.entity.enum.StockInStatus | import com.ffii.fpsms.modules.stock.entity.enum.StockInStatus | ||||
| import jakarta.persistence.* | import jakarta.persistence.* | ||||
| import jakarta.validation.constraints.NotNull | import jakarta.validation.constraints.NotNull | ||||
| @@ -18,20 +19,21 @@ open class StockIn : BaseEntity<Long>() { | |||||
| @Column(name = "code", nullable = false, length = 30) | @Column(name = "code", nullable = false, length = 30) | ||||
| open var code: String? = null | open var code: String? = null | ||||
| @ManyToOne(fetch = FetchType.LAZY, optional = false) | |||||
| @ManyToOne | |||||
| @JoinColumn(name = "supplierId") | @JoinColumn(name = "supplierId") | ||||
| open var supplier: Shop? = null | open var supplier: Shop? = null | ||||
| @ManyToOne(fetch = FetchType.LAZY, optional = false) | |||||
| @ManyToOne | |||||
| @JoinColumn(name = "shopId") | @JoinColumn(name = "shopId") | ||||
| open var shop: Shop? = null | open var shop: Shop? = null | ||||
| @Column(name = "refId") | |||||
| open var refId: Int? = null | |||||
| @OneToOne | |||||
| @JoinColumn(name = "purchaseOrderId") | |||||
| open var purchaseOrder: PurchaseOrder? = null | |||||
| @Size(max = 5) | |||||
| @Column(name = "refType", length = 5) | |||||
| open var refType: String? = null | |||||
| @ManyToMany | |||||
| @JoinColumn(name = "stockOutId") | |||||
| open var stockOutId: StockOut? = null | |||||
| @Column(name = "orderDate") | @Column(name = "orderDate") | ||||
| open var orderDate: LocalDateTime? = null | open var orderDate: LocalDateTime? = null | ||||