package dto

// UpdateDeviceTokenRequest refreshes the handset's FCM registration token on
// an already logged-in account.
//
// This endpoint matters more than it looks: FCM rotates tokens on its own, and
// a reinstall or a cleared app storage issues a new one. An app that only ever
// sends its token at login goes quietly unreachable in between — the API still
// holds a token, it just no longer routes anywhere. The app should call this
// from its onTokenRefresh handler.
type UpdateDeviceTokenRequest struct {
	DeviceToken string `json:"device_token" binding:"required"`

	// ANDROID, IPHONE or WEB. Optional; left as it was when omitted.
	DeviceType string `json:"device_type"`
}

type UpdateDeviceTokenResponse struct {
	UserID uint `json:"userId"`

	DeviceToken string `json:"device_token"`

	DeviceType string `json:"device_type,omitempty"`

	Updated bool `json:"updated"`
}
