feat: add invoice-configs management functionality

This commit is contained in:
Tran Anh Tuan
2026-05-12 09:25:03 +07:00
parent 0ff65a18c0
commit eac8a686d1
14 changed files with 1534 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
package models
import "time"
type InvoiceConfig struct {
ID int64 `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Description string `json:"description"`
IsActive bool `json:"isActive"`
Metadata []byte `json:"metadata"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}

View File

@@ -0,0 +1,15 @@
package requests
type CreateInvoiceConfigRequest struct {
Name string `json:"name" binding:"required"`
Type string `json:"type" binding:"required"`
Description string `json:"description"`
IsActive bool `json:"isActive"`
}
type UpdateInvoiceConfigRequest struct {
Name string `json:"name"`
Type string `json:"type"`
Description string `json:"description"`
IsActive *bool `json:"isActive"`
}

View File

@@ -0,0 +1,13 @@
package responses
type CreateInvoiceConfigResponse struct {
ID int64 `json:"id"`
}
type UpdateInvoiceConfigResponse struct {
ID int64 `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Description string `json:"description"`
IsActive bool `json:"isActive"`
}