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

package db

import (
	"database/sql"
	"database/sql/driver"
	"fmt"
	"time"

	"github.com/google/uuid"
	"github.com/jackc/pgtype"
)

type Continents string

const (
	ContinentsAfrica       Continents = "Africa"
	ContinentsAntarctica   Continents = "Antarctica"
	ContinentsAsia         Continents = "Asia"
	ContinentsEurope       Continents = "Europe"
	ContinentsOceania      Continents = "Oceania"
	ContinentsNorthAmerica Continents = "North America"
	ContinentsSouthAmerica Continents = "South America"
)

func (e *Continents) Scan(src interface{}) error {
	switch s := src.(type) {
	case []byte:
		*e = Continents(s)
	case string:
		*e = Continents(s)
	default:
		return fmt.Errorf("unsupported scan type for Continents: %T", src)
	}
	return nil
}

type NullContinents struct {
	Continents Continents
	Valid      bool // Valid is true if Continents is not NULL
}

// Scan implements the Scanner interface.
func (ns *NullContinents) Scan(value interface{}) error {
	if value == nil {
		ns.Continents, ns.Valid = "", false
		return nil
	}
	ns.Valid = true
	return ns.Continents.Scan(value)
}

// Value implements the driver Valuer interface.
func (ns NullContinents) Value() (driver.Value, error) {
	if !ns.Valid {
		return nil, nil
	}
	return string(ns.Continents), nil
}

type Asn struct {
	ID        int64
	Number    int32
	Name      string
	CountV4   sql.NullInt32
	CountV6   sql.NullInt32
	PercentV4 sql.NullFloat64
	PercentV6 sql.NullFloat64
}

type Campaign struct {
	ID          int64
	CreatedAt   time.Time
	Uuid        uuid.UUID
	Name        string
	Description string
	Disabled    bool
}

type CampaignChangelog struct {
	ID         int64
	Ts         time.Time
	DomainID   int64
	CampaignID uuid.UUID
	Message    string
	Ipv6Status string
}

type CampaignDomain struct {
	ID           int64
	CampaignID   uuid.UUID
	Site         string
	BaseDomain   string
	WwwDomain    string
	Nameserver   string
	MxRecord     string
	V6Only       string
	AsnID        sql.NullInt64
	CountryID    sql.NullInt64
	Disabled     bool
	TsBaseDomain sql.NullTime
	TsWwwDomain  sql.NullTime
	TsNameserver sql.NullTime
	TsMxRecord   sql.NullTime
	TsV6Only     sql.NullTime
	TsCheck      sql.NullTime
	TsUpdated    sql.NullTime
}

type Changelog struct {
	ID         int64
	Ts         time.Time
	DomainID   int64
	Message    string
	Ipv6Status string
}

type ChangelogCampaignView struct {
	ID         int64
	Ts         time.Time
	DomainID   int64
	CampaignID uuid.UUID
	Message    string
	Ipv6Status string
	Site       string
}

type ChangelogView struct {
	ID         int64
	Ts         time.Time
	DomainID   int64
	Message    string
	Ipv6Status string
	Site       string
}

type Country struct {
	ID          int64
	CountryName string
	CountryCode string
	CountryTld  string
	Continent   NullContinents
	Sites       int32
	V6sites     int32
	Percent     pgtype.Numeric
}

type Domain struct {
	ID           int64
	Site         string
	BaseDomain   string
	WwwDomain    string
	Nameserver   string
	MxRecord     string
	V6Only       string
	AsnID        sql.NullInt64
	CountryID    sql.NullInt64
	Disabled     bool
	TsBaseDomain sql.NullTime
	TsWwwDomain  sql.NullTime
	TsNameserver sql.NullTime
	TsMxRecord   sql.NullTime
	TsV6Only     sql.NullTime
	TsCheck      sql.NullTime
	TsUpdated    sql.NullTime
}

type DomainCrawlList struct {
	ID           int64
	Site         string
	BaseDomain   string
	WwwDomain    string
	Nameserver   string
	MxRecord     string
	V6Only       string
	AsnID        sql.NullInt64
	CountryID    sql.NullInt64
	Disabled     bool
	TsBaseDomain sql.NullTime
	TsWwwDomain  sql.NullTime
	TsNameserver sql.NullTime
	TsMxRecord   sql.NullTime
	TsV6Only     sql.NullTime
	TsCheck      sql.NullTime
	TsUpdated    sql.NullTime
}

type DomainShameView struct {
	ID           int64
	Site         string
	BaseDomain   string
	WwwDomain    string
	Nameserver   string
	MxRecord     string
	V6Only       string
	AsnID        sql.NullInt64
	CountryID    sql.NullInt64
	Disabled     bool
	TsBaseDomain sql.NullTime
	TsWwwDomain  sql.NullTime
	TsNameserver sql.NullTime
	TsMxRecord   sql.NullTime
	TsV6Only     sql.NullTime
	TsCheck      sql.NullTime
	TsUpdated    sql.NullTime
	ShameID      int64
	ShameSite    string
}

type DomainViewList struct {
	ID           sql.NullInt64
	Site         sql.NullString
	BaseDomain   sql.NullString
	WwwDomain    sql.NullString
	Nameserver   sql.NullString
	MxRecord     sql.NullString
	V6Only       sql.NullString
	AsnID        sql.NullInt64
	CountryID    sql.NullInt64
	Disabled     sql.NullBool
	TsBaseDomain sql.NullTime
	TsWwwDomain  sql.NullTime
	TsNameserver sql.NullTime
	TsMxRecord   sql.NullTime
	TsV6Only     sql.NullTime
	TsCheck      sql.NullTime
	TsUpdated    sql.NullTime
	Rank         int64
	Asname       sql.NullString
	CountryName  sql.NullString
}

type Lists struct {
	ID   int64
	Name string
	Ts   time.Time
}

type Metrics struct {
	ID          int64
	Measurement string
	Time        time.Time
	Data        pgtype.JSONB
}

type Sites struct {
	ID     int64
	ListID int64
	Rank   int64
	Site   string
}

type TopShame struct {
	ID   int64
	Site string
}
