code refactor

This commit is contained in:
MaysWind
2024-10-31 00:57:34 +08:00
parent 5006a96181
commit d174e99c80
+12 -7
View File
@@ -6,8 +6,13 @@ import (
"github.com/mayswind/ezbookkeeping/pkg/models" "github.com/mayswind/ezbookkeeping/pkg/models"
) )
const ofxVersion1 = "100" // oFXDeclarationVersion represents the declaration version of open financial exchange (ofx) file
const ofxVersion2 = "200" type oFXDeclarationVersion string
const (
ofxVersion1 oFXDeclarationVersion = "100"
ofxVersion2 oFXDeclarationVersion = "200"
)
const ofxDefaultTimezoneOffset = "+00:00" const ofxDefaultTimezoneOffset = "+00:00"
@@ -74,11 +79,11 @@ type ofxFile struct {
// ofxFileHeader represents the struct of open financial exchange (ofx) file header // ofxFileHeader represents the struct of open financial exchange (ofx) file header
type ofxFileHeader struct { type ofxFileHeader struct {
OFXVersion string OFXDeclarationVersion oFXDeclarationVersion
OFXDataVersion string OFXDataVersion string
Security string Security string
OldFileUid string OldFileUid string
NewFileUid string NewFileUid string
} }
// ofxBankMessageResponseV1 represents the struct of open financial exchange (ofx) bank message response v1 // ofxBankMessageResponseV1 represents the struct of open financial exchange (ofx) bank message response v1