-
Notifications
You must be signed in to change notification settings - Fork 12
/
model.go
39 lines (32 loc) · 927 Bytes
/
model.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package invoicing_cycle
import (
commonmodel "github.com/openline-ai/openline-customer-os/packages/server/events-processing-platform/domain/common/model"
"time"
)
type InvoicingCycleType int32
const (
DATE InvoicingCycleType = iota
ANNIVERSARY
)
type InvoicingCycleTypeString string
const (
InvoicingCycleTypeDate InvoicingCycleTypeString = "DATE"
InvoicingCycleTypeAnniversary InvoicingCycleTypeString = "ANNIVERSARY"
)
func (t InvoicingCycleType) StringValue() InvoicingCycleTypeString {
switch t {
case DATE:
return InvoicingCycleTypeDate
case ANNIVERSARY:
return InvoicingCycleTypeAnniversary
default:
return ""
}
}
type InvoicingCycle struct {
ID string `json:"id"`
Type string `json:"type"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
SourceFields commonmodel.Source `json:"source"`
}