31 lines
1.2 KiB
Go
31 lines
1.2 KiB
Go
package entities
|
|
|
|
import (
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type TInventoryIssueLineEntity struct {
|
|
ID uuid.UUID `gorm:"primaryKey;type:uuid;default:uuid_generate_v4()" json:"id"`
|
|
CurrentStock float64 `gorm:"type:numeric;default:0" json:"current_stock"`
|
|
MinStock float64 `gorm:"type:numeric;default:0" json:"min_stock"`
|
|
RequestQuantity float64 `gorm:"type:numeric;default:0" json:"request_quantity"`
|
|
IssuedQuantity float64 `gorm:"type:numeric;default:0" json:"issued_quantity"`
|
|
Remarks string `gorm:"type:text;" json:"remarks"`
|
|
|
|
InvIssueID uuid.UUID `gorm:"type:uuid;index;" json:"inv_issue_id"`
|
|
ProductID uuid.UUID `gorm:"type:uuid;index;" json:"product_id"`
|
|
WarehouseID uuid.UUID `gorm:"type:uuid;index;" json:"warehouse_id"`
|
|
ClientID uuid.UUID `gorm:"type:uuid;index;" json:"client_id"`
|
|
|
|
Product MProductEntity `gorm:"foreignKey:ProductID;references:ID"`
|
|
InvIssue TInventoryIssueEntity `gorm:"foreignKey:InvIssueID;references:ID"`
|
|
Warehouse MWarehouseEntity `gorm:"foreignKey:WarehouseID;references:ID"`
|
|
Client M_Client `gorm:"foreignKey:ClientID;references:ID"`
|
|
|
|
FullAuditTrail
|
|
}
|
|
|
|
func (TInventoryIssueLineEntity) TableName() string {
|
|
return "t_inventory_issue_lines"
|
|
}
|