models

package
v0.0.0-...-790789d Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Environment        string `mapstructure:"ENV"`
	MongoServer        string `mapstructure:"MONGO_SERVER"`
	MongoDatabase      string `mapstructure:"MONGO_DATABASE"`
	MongoUsername      string `mapstructure:"MONGO_USERNAME"`
	MongoPassword      string `mapstructure:"MONGO_PASSWORD"`
	LaravelBaseUrl     string `mapstructure:"LARAVEL_BASE_URL"`
	LaravelUserName    string `mapstructure:"LARAVEL_USERNAME"`
	LaravelPassword    string `mapstructure:"LARAVEL_PASSWORD"`
	UseTestNet         bool   `mapstructure:"USE_TEST_NET"`
	StreamsPerListener int64  `mapstructure:"NUM_OF_STREAMS_PER_LISTENER"`

	MySqlRootPassword string `mapstructure:"MYSQL_ROOT_PASSWORD"`
	MySqlPassword     string `mapstructure:"MYSQL_PASSWORD"`
	MySqlUser         string `mapstructure:"MYSQL_USER"`
	MySqlDatabase     string `mapstructure:"MYSQL_DATABASE"`
}

type Food

type Food struct {
	Id           primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Name         string             `json:"name,omitempty" bson:"name,omitempty" binding:"required"`
	FoodGroupId  string             `json:"FoodGroupId"  bson:"FoodGroupId,omitempty" binding:"required"`
	ImageAddress string
}

type FoodCommentMySql

type FoodCommentMySql struct {
	Id      int64  `json:"id,omitempty" bson:"id,omitempty"`
	FoodId  int64  `json:"foodid,omitempty" bson:"foodid,omitempty" binding:"required"`
	Comment string `json:"comment" bson:"comment"`
	UserId  int64  `json:"userid" bson:"userid"`
}

type FoodGroup

type FoodGroup struct {
	Id   primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Name string             `json:"name,omitempty" bson:"name,omitempty" binding:"required"`
}

type FoodGroupMySql

type FoodGroupMySql struct {
	Id           int64   `json:"id,omitempty" bson:"id,omitempty"`
	Name         string  `json:"name,omitempty" bson:"name,omitempty" binding:"required"`
	ImageAddress *string `json:"imageaddress" bson:"imageaddress"`
}

type FoodImage

type FoodImage struct {
	Id           primitive.ObjectID `json:"id,omitempty" bson:"id,omitempty"`
	FoodId       primitive.ObjectID `json:"FoodGroupId"  bson:"FoodGroupId,omitempty" binding:"required"`
	ImageAddress string             `binding:"required"`
}

type FoodImageMySql

type FoodImageMySql struct {
	Id           int64   `json:"id,omitempty" bson:"id,omitempty"`
	FoodId       int64   `json:"FoodGroupId"  bson:"FoodGroupId,omitempty" binding:"required"`
	ImageAddress *string `binding:"required"`
}

type FoodMySql

type FoodMySql struct {
	Id          int64  `json:"id,omitempty" bson:"id,omitempty"`
	Name        string `json:"name,omitempty" bson:"name,omitempty" binding:"required"`
	FoodGroupId int64  `json:"FoodGroupId"  bson:"FoodGroupId,omitempty" binding:"required"`
	ResturanId  int64  `json:"resturanId"  bson:"resturanId,omitempty" binding:"required"`
}

type FoodMySqlDTO

type FoodMySqlDTO struct {
	Id          int64              `json:"id,omitempty" bson:"id,omitempty"`
	Name        string             `json:"name,omzitempty" bson:"name,omitempty" binding:"required"`
	FoodGroupId int64              `json:"foodgroupid"  bson:"foodgroupid,omitempty" binding:"required"`
	ResturanId  int64              `json:"resturanid"  bson:"resturanid,omitempty"`
	Image       *string            `json:"image"  bson:"image"`
	Images      []string           `json:"images"  bson:"images"`
	Comments    []FoodCommentMySql `json:"comments"  bson:"comments"`
	FoodGroup   FoodGroupMySql     `json:"foodgroup" bson:"foodgroup"`
	Resturan    ResturanMySql      `json:"resturan" bson:"resturan"`
}

type Login

type Login struct {
	Username string `form:"username" json:"username" binding:"required"`
	Password string `form:"password" json:"password" binding:"required"`
}

type PagedResult

type PagedResult struct {
	TotalCount int         `json:"totalcount"`
	Items      interface{} `json:"items"`
}

type Pagination

type Pagination struct {
	Page      int `form:"page,default=0"`
	PageCount int `form:"pagecount,default=10"`
}

type Response

type Response struct {
	Status  int    `json:"status"`
	Message string `json:"message"`
}

type ResturanMySql

type ResturanMySql struct {
	Id          int64  `json:"id,omitempty" bson:"id,omitempty"`
	Name        string `json:"name" bson:"name"`
	Description string `json:"description" bson:"description"`
}

type User

type User struct {
	Id       primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Name     string             `json:"name,omitempty" bson:"name,omitempty" binding:"required"`
	UserName string             `json:"username,omitempty" binding:"required"`
	Password string             `json:"password,omitempty" binding:"required"`
}

type UserMySql

type UserMySql struct {
	Id       int64  `json:"_id,omitempty" bson:"_id,omitempty"`
	Name     string `json:"name,omitempty" bson:"name,omitempty" binding:"required"`
	UserName string `json:"username,omitempty" binding:"required"`
	Password string `json:"password,omitempty" binding:"required"`
}

Jump to

Keyboard shortcuts

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