mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
Feat[BE-261]: creating multiple Approval API, Update API, Delete API and some logic Adjustment
This commit is contained in:
@@ -8,19 +8,21 @@ import (
|
||||
)
|
||||
|
||||
type Expense struct {
|
||||
Id uint64 `gorm:"primaryKey;autoIncrement"`
|
||||
ReferenceNumber *string `gorm:"type:varchar(50);uniqueIndex"`
|
||||
SupplierId *uint64 `gorm:""`
|
||||
Category string `gorm:"type:varchar(50);not null"`
|
||||
PoNumber *string `gorm:"type:varchar(50)"`
|
||||
DocumentPath sql.NullString `gorm:"type:json"`
|
||||
ExpenseDate time.Time `gorm:"type:date;not null"`
|
||||
GrandTotal float64 `gorm:"type:numeric(15,3);default:0"`
|
||||
Note *string `gorm:"type:text"`
|
||||
CreatedBy *uint64 `gorm:""`
|
||||
CreatedAt time.Time `gorm:"autoCreateTime"`
|
||||
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
Id uint64 `gorm:"primaryKey;autoIncrement"`
|
||||
ReferenceNumber string `gorm:"type:varchar(50);uniqueIndex"`
|
||||
SupplierId uint64 `gorm:""`
|
||||
Category string `gorm:"type:varchar(50);not null"`
|
||||
PoNumber string `gorm:"type:varchar(50)"`
|
||||
DocumentPath sql.NullString `gorm:"type:json"` // Dokumen pengajuan
|
||||
RealizationDocumentPath sql.NullString `gorm:"type:json;column:realization_document_path"` // Dokumen realisasi
|
||||
RealizationDate time.Time `gorm:"type:date;column:realization_date"` // Tanggal realisasi
|
||||
ExpenseDate time.Time `gorm:"type:date;not null"`
|
||||
GrandTotal float64 `gorm:"type:numeric(15,3);default:0"`
|
||||
Note string `gorm:"type:text"`
|
||||
CreatedBy uint64 `gorm:""`
|
||||
CreatedAt time.Time `gorm:"autoCreateTime"`
|
||||
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
|
||||
// Relations
|
||||
Supplier *Supplier `gorm:"foreignKey:SupplierId;references:Id"`
|
||||
|
||||
Reference in New Issue
Block a user