fix purchase due date

This commit is contained in:
ragilap
2025-12-10 21:10:46 +07:00
parent 086184bbaa
commit de6304332b
7 changed files with 104 additions and 81 deletions
+3 -2
View File
@@ -5,17 +5,18 @@ import (
)
type Purchase struct {
Id uint `gorm:"primaryKey;autoIncrement"`
Id uint `gorm:"primaryKey;autoIncrement"`
PrNumber string `gorm:"not null"`
PoNumber *string
PoDate *time.Time
SupplierId uint `gorm:"not null"`
CreditTerm int `gorm:"column:credit_term;not null;default:0"`
DueDate *time.Time
Notes *string
CreatedAt time.Time `gorm:"autoCreateTime"`
UpdatedAt time.Time `gorm:"autoUpdateTime"`
DeletedAt *time.Time `gorm:"index"`
CreatedBy uint `gorm:"not null"`
CreatedBy uint `gorm:"not null"`
// Relations
Supplier Supplier `gorm:"foreignKey:SupplierId;references:Id"`