models

package
v0.0.0-...-be50a32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID    int    `gorm:"id"`
	Name  string `gorm:"name"`
	Price uint   `gorm:"price"`
}

Channel Model

type City

type City struct {
	gorm.Model
	Name     string  `json:"name"`
	Lon      float64 `json:"lon"`
	Lat      float64 `json:"lat"`
	Temp     float64 `json:"temp"`
	Pressure int     `json:"pressure"`
	SeaLevel int     `json:"sea_level"`
}

type Pack

type Pack struct {
	ID    int    `gorm:"id"`
	Name  string `gorm:"name"`
	Price uint   `gorm:"price"`
}

Pack Model

type PackComposition

type PackComposition struct {
	ID   int    `gorm:"id"`
	Name string `gorm:"name"`
}

PackComposition Model

type Service

type Service struct {
	ID    int    `gorm:"id"`
	Name  string `gorm:"name"`
	Price uint   `gorm:"price"`
}

Service Model

type Subscription

type Subscription struct {
	ID        int        `gorm:"id"`
	UserID    int        `gorm:"user_id"`
	ServiceID int        `gorm:"service_id"`
	PackID    int        `gorm:"pack_id"`
	ChannelID int        `gorm:"channel_id"`
	Duration  uint       `gorm:"duration"`
	CreatedAt time.Time  `gorm:"created_at"`
	UpdatedAt time.Time  `gorm:"updated_at"`
	DeletedAt *time.Time `gorm:"deleted_at"`
}

Subscription Model

type SubscriptionDetails

type SubscriptionDetails struct {
	ID          int    `gorm:"id"`
	UserID      int    `gorm:"user_id"`
	ServiceName string `gorm:"service_name"`
	PackName    string `gorm:"pack_name"`
	ChannelName string `gorm:"channel_name"`
}

SubscriptionDetails Model

type User

type User struct {
	ID        int        `gorm:"id"`
	Name      string     `gorm:"name"`
	Balance   uint       `gorm:"balance"`
	Email     string     `gorm:"email"`
	Phone     string     `gorm:"phone"`
	CreatedAt time.Time  `gorm:"created_at"`
	UpdatedAt time.Time  `gorm:"updated_at"`
	DeletedAt *time.Time `gorm:"deleted_at"`
}

User Model

type WeatherDesc

type WeatherDesc struct {
	Coord struct {
		Lon float64 `json:"lon"`
		Lat float64 `json:"lat"`
	} `json:"coord"`
	Weather []struct {
		ID          int    `json:"id"`
		Main        string `json:"main"`
		Description string `json:"description"`
		Icon        string `json:"icon"`
	} `json:"weather"`
	Base string `json:"base"`
	Main struct {
		Temp      float64 `json:"temp"`
		FeelsLike float64 `json:"feels_like"`
		TempMin   float64 `json:"temp_min"`
		TempMax   float64 `json:"temp_max"`
		Pressure  int     `json:"pressure"`
		Humidity  int     `json:"humidity"`
		SeaLevel  int     `json:"sea_level"`
		GrndLevel int     `json:"grnd_level"`
	} `json:"main"`
	Wind struct {
		Speed float64 `json:"speed"`
		Deg   int     `json:"deg"`
	} `json:"wind"`
	Clouds struct {
		All int `json:"all"`
	} `json:"clouds"`
	Dt  int `json:"dt"`
	Sys struct {
		Country string `json:"country"`
		Sunrise int    `json:"sunrise"`
		Sunset  int    `json:"sunset"`
	} `json:"sys"`
	Timezone int    `json:"timezone"`
	ID       int    `json:"id"`
	Name     string `json:"name"`
	Cod      int    `json:"cod"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL