customer/internal/models/account.go

32 lines
1008 B
Go
Raw Normal View History

2023-05-17 20:27:09 +00:00
package models
import "time"
type Account struct {
2023-05-31 21:28:35 +00:00
ID string `json:"id" bson:"_id,omitempty"`
UserID string `json:"userId" bson:"userId"`
Cart []string `json:"cart" bson:"cart"`
Wallet Wallet `json:"wallet" bson:"wallet"`
Name Name `json:"name" bson:"name"`
Status AccountStatus `json:"status" bson:"status"`
Deleted bool `json:"deleted" bson:"deleted"`
CreatedAt time.Time `json:"createdAt" bson:"createdAt"`
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"`
DeletedAt *time.Time `json:"deletedAt,omitempty" bson:"deletedAt,omitempty"`
2023-05-17 20:27:09 +00:00
}
2023-05-31 21:28:35 +00:00
type Name struct {
Lastname *string `json:"lastname,omitempty"`
Name *string `json:"name,omitempty"`
Orgname *string `json:"orgname,omitempty"`
Secondname *string `json:"secondname,omitempty"`
}
type AccountStatus string
const (
AccountStatusNko AccountStatus = "nko"
AccountStatusNo AccountStatus = "no"
AccountStatusOrg AccountStatus = "org"
)