nft

package
v0.0.0-...-a9fa8a7 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bid

type Bid struct {
	Id         primitive.ObjectID `json:"_id" bson:"_id,omitempty"`
	NftId      primitive.ObjectID `json:"nft_id" bson:"nft_id"`
	UserId     primitive.ObjectID `json:"user_id" bson:"user_id"`
	Price      float64            `json:"price" bson:"price"`
	ExpiryDate time.Time          `json:"expiry_date" bson:"expiry_date"`
	IsDeleted  bool               `json:"is_deleted" bson:"is_deleted"`
	CreatedAt  time.Time          `json:"created_at" bson:"created_at"`
	UpdatedAt  time.Time          `json:"updated_at" bson:"updated_at"`
}

type BidShowCase

type BidShowCase struct {
	BidId      string    `json:"bid_id"`
	NftId      string    `json:"nft_id"`
	Price      float64   `json:"price"`
	ExpiryDate time.Time `json:"expiry_date"`
	IsDeleted  bool      `json:"is_deleted"`
}

type CreateBidReq

type CreateBidReq struct {
	NftId      string    `json:"nft_id" validate:"required"`
	Price      float64   `json:"price" validate:"required"`
	ExpiryDate time.Time `json:"expiry_date" validate:"required"`
}

type CreateNftReq

type CreateNftReq struct {
	Title       string  `json:"title" validate:"required,max=64"`
	Price       float64 `json:"price" validate:"required"`
	ImageUrl    string  `json:"image_url" validate:"required,max=255"`
	Description string  `json:"description" validate:"required,max=255"`
	Category    string  `json:"category" validate:"required"`
	ListingType string  `json:"listing_type" validate:"required"`
	UsageStatus bool    `json:"usage_status"`
}

type CreateUserBidReq

type CreateUserBidReq struct {
	NftId string  `json:"nft_id" validate:"required"`
	Price float64 `json:"price" validate:"required"`
}

type DeleteFileReq

type DeleteFileReq struct {
	Destination string `json:"destination" form:"destination"`
}

type EnableOrDisableNftCategoryReq

type EnableOrDisableNftCategoryReq struct {
	UsageStatus bool `json:"usage_status"`
}

type EnableOrDisableNftReq

type EnableOrDisableNftReq struct {
	UsageStatus bool `json:"usage_status"`
}

type FileReq

type FileReq struct {
	File        *multipart.FileHeader `json:"file" form:"file"`
	Destination string                `json:"destination" form:"destination"`
	Extension   string
	FileName    string
}

type FileRes

type FileRes struct {
	FileName string `json:"file_name"`
	Url      string `json:"url"`
}

type Nft

type Nft struct {
	Id                primitive.ObjectID `json:"_id" bson:"_id,omitempty"`
	Title             string             `json:"title" bson:"title"`
	Price             float64            `json:"price" bson:"price"`
	ImageUrl          string             `json:"image_url" bson:"image_url"`
	UsageStatus       bool               `json:"usage_status" bson:"usage_status"`
	Description       string             `json:"description" bson:"description"`
	AuthorId          primitive.ObjectID `json:"author_id" bson:"author_id"`
	OwnerId           primitive.ObjectID `json:"owner_id" bson:"owner_id"`
	Category          primitive.ObjectID `json:"category" bson:"category"`
	ListingType       string             `json:"listing_type" bson:"listing_type"`
	CreatedAt         time.Time          `json:"created_at" bson:"created_at"`
	UpdatedAt         time.Time          `json:"updated_at" bson:"updated_at"`
	IsDeleted         bool               `json:"is_deleted" bson:"is_deleted"`
	IsCategoryBlocked bool               `json:"is_category_blocked" bson:"is_category_blocked"`
}

type NftCategory

type NftCategory struct {
	Id          primitive.ObjectID `json:"_id" bson:"_id,omitempty"`
	Title       string             `json:"title" bson:"title"`
	Description string             `json:"description" bson:"description"`
	UsageStatus bool               `json:"usage_status" bson:"usage_status"`
	IsDeleted   bool               `json:"is_deleted" bson:"is_deleted"`
	CreatedAt   time.Time          `json:"created_at" bson:"created_at"`
	UpdatedAt   time.Time          `json:"updated_at" bson:"updated_at"`
}

type NftCategoryReq

type NftCategoryReq struct {
	Title       string `json:"title" validate:"required,max=64"`
	Description string `json:"description" validate:"required,max=255"`
}

type NftSearchReq

type NftSearchReq struct {
	Title    string `query:"title" validate:"max=64"`
	Category string `query:"category" validate:"max=64"`
	models.PaginateReq
}

type NftShowCase

type NftShowCase struct {
	NftId             string  `json:"nft_id"`
	Title             string  `json:"title"`
	Price             float64 `json:"price"`
	ImageUrl          string  `json:"image_url"`
	Description       string  `json:"description"`
	AuthorId          string  `json:"author_id"`
	OwnerId           string  `json:"owner_id"`
	Category          string  `json:"category"`
	ListingType       string  `json:"listing_type"`
	UsageStatus       bool    `json:"usage_status"`
	IsDeleted         bool    `json:"is_deleted"`
	IsCategoryBlocked bool    `json:"is_category_blocked"`
}

type NftUpdateReq

type NftUpdateReq struct {
	Title       string  `json:"title" validate:"required,max=64"`
	Price       float64 `json:"price" validate:"required"`
	ImageUrl    string  `json:"image_url" validate:"required,max=255"`
	Description string  `json:"description" validate:"required,max=255"`
	Category    string  `json:"category" validate:"required"`
	ListingType string  `json:"listing_type" validate:"required"`
}

type SingleBid

type SingleBid struct {
	Id        primitive.ObjectID `json:"_id" bson:"_id,omitempty"`
	BidId     primitive.ObjectID `json:"bid_id" bson:"bid_id"`
	UserId    primitive.ObjectID `json:"user_id" bson:"user_id"`
	Price     float64            `json:"price" bson:"price"`
	IsDeleted bool               `json:"is_deleted" bson:"is_deleted"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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