package viewmodel

import "time"

// User model for API binding
type User struct {
	ID            string             `json:"useruuid"`
	Name          string             `json:"name,omitempty"`
	First         string             `json:"first,omitempty"`
	Last          string             `json:"last,omitempty"`
	Gender        *string            `json:"gender,omitempty"`
	Member        *string            `json:"member,omitempty"`
	BirthDate     *time.Time         `json:"birthdate,omitempty"`
	Email         *string            `json:"email,omitempty"`
	PhoneNumber   *string            `json:"phonenumber,omitempty"`
	Type          *string            `json:"type,omitempty"`
	Pass          string             `json:"pass,omitempty"`
	Active        bool               `json:"active,omitempty"`
	Created       time.Time          `json:"created,omitempty"`
	Updated       time.Time          `json:"updated,omitempty"`
	Contacts      []Contact          `json:"contacts,omitempty"`
	Rides         []Ride             `json:"rides,omitempty"`
	Addresses     []Address          `json:"addresses,omitempty"`
	Profiles      []Profile          `json:"profiles,omitempty"`
	Types         []OrganizationType `json:"types,omitempty"`
	Organizations []Organization     `json:"organizations,omitempty"`
	Provider      *ProviderResp      `json:"provider,omitempty"`
	Consent       bool               `json:"consent,omitempty"`
	Test          bool               `json:"test,omitempty"`
}

type Contact struct {
	ID     string      `json:"id,omitempty"`
	User   User        `json:"-"`
	Type   ContactType `json:"type,omitempty"`
	Value  string      `json:"contact,omitempty"`
	Author User        `json:"-"`
}

type ContactType struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
}
