// Code generated by sqlc. DO NOT EDIT.
// versions:
//   sqlc v1.14.0

package core_repo

import (
	"time"

	"github.com/google/uuid"
)

type Session struct {
	// auto generated session id
	ID uuid.UUID `json:"id"`
	// required,numeric,shouldref=_users.id
	UserID int64 `json:"user_id"`
	// required,ipaddress
	ClientIp string `json:"client_ip"`
	// required,user_agent
	UserAgent string `json:"user_agent"`
	// required,token,desc=refresh token
	RefreshToken string `json:"refresh_token"`
	// required,boolean,desc=refresh token blocked or not
	Blocked bool `json:"blocked"`
	// timstamp when the refresh token gets expired
	Expires time.Time `json:"expires"`
	// timestamp when the refresh token was created
	Created time.Time `json:"created"`
}

type Table struct {
	// numeric,server-side auto generated id
	ID int64 `json:"id"`
	// required,numeric,shouldref=_users.id
	UserID int64 `json:"user_id"`
	// required,alphanumeric,unique,min=3
	Name string `json:"name"`
	// required,jsonstring,desc=columns of the tables
	Columns string    `json:"columns"`
	Created time.Time `json:"created"`
	Updated time.Time `json:"updated"`
}

type User struct {
	// server-side auto generated id
	ID int64 `json:"id"`
	// required,max=255
	Email string `json:"email"`
	// required,alphanumeric,min=3,max=60
	Username string `json:"username"`
	// required,hashed
	Password string `json:"password"`
	// optional,max=255
	Fullname string `json:"fullname"`
	// optinal,default=false,desc=profile visible by others or not
	Public bool `json:"public"`
	// optinal,default=false,desc=email is verified or not
	Verified bool `json:"verified"`
	// optinal,default=false,desc=profile is accessible or not
	Blocked bool   `json:"blocked"`
	Role    string `json:"role"`
	// server-side auto generated timestamp with time zone
	Updated time.Time `json:"updated"`
	// server-side auto generated timestamp with time zone
	Created time.Time `json:"created"`
}
