rentease/internal/service/booking/invoice_document.go
Ruidy 9b2510460a
Some checks are pending
CI / checks (push) Waiting to run
feat: store invoice PDFs in minio
2026-03-20 23:58:57 +01:00

30 lines
626 B
Go

package booking
import (
"time"
"gorm.io/gorm"
)
type GeneratedFile struct {
Name string
ContentType string
Data []byte
}
type StoredInvoiceFile struct {
ObjectKey string
ShareURL string
ShareURLExpiresAt time.Time
}
type InvoiceDocument struct {
gorm.Model
BookingID int `gorm:"not null;uniqueIndex"`
ID int
ObjectKey string `gorm:"not null"`
FileName string `gorm:"not null"`
ContentType string `gorm:"not null"`
ShareURL string `gorm:"type:text;not null"`
ShareURLExpiresAt time.Time `gorm:"not null"`
}