electricity_bill_calc_service/model/user.go

73 lines
1.5 KiB
Go

package model
import (
"time"
"github.com/shopspring/decimal"
)
const (
USER_TYPE_ENT int16 = iota
USER_TYPE_SUP
USER_TYPE_OPS
)
type ManagementAccountCreationForm struct {
Id *string
Username string
Name string
Contact *string
Phone *string
Type int16 `json:"type"`
Enabled bool
Expires Date
}
type User struct {
Id string
Username string
Password string
ResetNeeded bool
UserType int16 `db:"type"`
Enabled bool
CreatedAt *time.Time
}
type UserDetail struct {
Id string
Name *string
Abbr *string
Region *string
Address *string
Contact *string
Phone *string
UnitServiceFee decimal.Decimal `db:"unit_service_fee"`
ServiceExpiration Date
CreatedAt time.Time
CreatedBy *string
LastModifiedAt time.Time
LastModifiedBy *string
DeletedAt *time.Time
DeletedBy *string
}
type UserWithDetail struct {
Id string
Username string
ResetNeeded bool
UserType int16 `db:"type"`
Enabled bool
Name *string
Abbr *string
Region *string
Address *string
Contact *string
Phone *string
UnitServiceFee decimal.Decimal `db:"unit_service_fee"`
ServiceExpiration Date
CreatedAt time.Time
CreatedBy *string
LastModifiedAt time.Time
LastModifiedBy *string
}