39 lines
1.0 KiB
Go
39 lines
1.0 KiB
Go
package dto
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/oklog/ulid/v2"
|
|
)
|
|
|
|
type UserDto struct {
|
|
ID ulid.ULID `json:"id"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
LastEditorID ulid.ULID `json:"lastEditorID"`
|
|
Email string `json:"email"`
|
|
Role string `json:"role"`
|
|
CompanyID int `json:"companyId"`
|
|
HourlyRate float64 `json:"hourlyRate"`
|
|
}
|
|
|
|
type UserCreateDto struct {
|
|
Email string `json:"email"`
|
|
Password string `json:"password"`
|
|
Role string `json:"role"`
|
|
CompanyID int `json:"companyId"`
|
|
HourlyRate float64 `json:"hourlyRate"`
|
|
}
|
|
|
|
type UserUpdateDto struct {
|
|
ID ulid.ULID `json:"id"`
|
|
CreatedAt *time.Time `json:"createdAt"`
|
|
UpdatedAt *time.Time `json:"updatedAt"`
|
|
LastEditorID *ulid.ULID `json:"lastEditorID"`
|
|
Email *string `json:"email"`
|
|
Password *string `json:"password"`
|
|
Role *string `json:"role"`
|
|
CompanyID *int `json:"companyId"`
|
|
HourlyRate *float64 `json:"hourlyRate"`
|
|
}
|