33 lines
828 B
Go
33 lines
828 B
Go
package dataMaps
|
|
|
|
import (
|
|
"github.com/google/uuid"
|
|
"time"
|
|
)
|
|
|
|
type Chirp struct {
|
|
ID uuid.UUID `json:"id"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
Body string `json:"body"`
|
|
UserID uuid.UUID `json:"user_id"`
|
|
}
|
|
|
|
type User struct {
|
|
ID uuid.UUID `json:"id"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
Email string `json:"email"`
|
|
IsChirpyRed bool `json:"is_chirpy_red"`
|
|
}
|
|
|
|
type UserWithToken struct {
|
|
ID uuid.UUID `json:"id"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
Email string `json:"email"`
|
|
Token string `json:"token"`
|
|
RefreshToken string `json:"refresh_token"`
|
|
IsChirpyRed bool `json:"is_chirpy_red"`
|
|
}
|