model

package
v0.0.0-...-b155b17 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetColActress

func GetColActress() *mongosdk.Collection

GetColActress get actress collection

func GetColFulltext

func GetColFulltext() *mongosdk.Collection

GetColFulltext get fulltext collection

func GetColMovie

func GetColMovie() *mongosdk.Collection

GetColMovie get movie collection

func GetDB

func GetDB() mongo.DB

GetDB get db

func SetupDB

func SetupDB(ctx context.Context) (err error)

SetupDB setup db

Types

type Actress

type Actress struct {
	ID         primitive.ObjectID `bson:"_id,omitempty" json:"mongo_id"`
	Name       string             `bson:"name" json:"name"`
	OtherNames []string           `bson:"other_names" json:"other_names"`
}

type Fulltext

type Fulltext struct {
	ID     primitive.ObjectID   `bson:"_id,omitempty" json:"mongo_id"`
	Word   string               `bson:"word" json:"word"`
	Movies []primitive.ObjectID `bson:"movies" json:"movies"`
}

type Movie

type Movie struct {
	ID           primitive.ObjectID   `bson:"_id,omitempty" json:"mongo_id"`
	Actresses    []primitive.ObjectID `bson:"actresses" json:"actresses"`
	Descriptions []string             `bson:"descriptions" json:"descriptions"`
	ImgUrls      []string             `bson:"img_urls" json:"img_urls"`
	Name         string               `bson:"name" json:"name"`
	Tags         []string             `bson:"tags" json:"tags"`
}

Jump to

Keyboard shortcuts

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