busybar / internal / models / auth.models.go
auth.models.go
Raw
package models

import "time"

type RegistrationRequest struct {
	Email             string `json:"email"`
	FirstName         string `json:"first_name"`
	LastName          string `json:"last_name"`
	Age               string `json:"age"`
	Program           string `json:"degree_program"`
	Term              string `json:"degree_term"`
	School            string `json:"school"`
	Gender            string `json:"gender"`
	SexualOrientation string `json:"sexual_orientation"`
}

type UserSession struct {
	ID           int    `json:"-"`
	FirstName    string `json:"firstName"`
	LastName     string `json:"lastName"`
	Email        string `json:"email"`
	IsRegistered bool   `json:"isRegistered"`
	IsAdmin      bool   `json:"isAdmin"`
}

type Session struct {
	ID                    int       `json:"-"`
	UserID                int       `json:"-"`
	AccessToken           string    `json:"accessToken"`
	RefreshToken          string    `json:"refreshToken"`
	AccessTokenExpiresAt  time.Time `json:"-"`
	RefreshTokenExpiresAt time.Time `json:"expiresAt"`
}