forked from mtusi2026/mtusi2026lab6
31 lines
522 B
Go
31 lines
522 B
Go
package dto
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type User struct {
|
|
ID uuid.UUID
|
|
Username string
|
|
DisplayName string
|
|
CreatedAt time.Time
|
|
}
|
|
|
|
type CreateUser struct {
|
|
Username string
|
|
DisplayName string
|
|
Password string
|
|
}
|
|
|
|
// CreateStoredUser contains the prepared database record, never a plaintext password.
|
|
type CreateStoredUser struct {
|
|
ID uuid.UUID
|
|
Username string
|
|
DisplayName string
|
|
PasswordHash string `json:"-"`
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|