models

package
v0.0.0-...-9b663ca Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Album

type Album struct {
	base.DefaultModel
	Name         string `gorm:"size:32;NOT NULL;comment:相册名"`
	AlbumType    string `gorm:"size:32;NOT NULL;comment:相册类型"`
	AlbumRecords []*AlbumRecord
}

Album 相册

func NewAlbum

func NewAlbum() *Album

type AlbumImage

type AlbumImage struct {
	Visible    bool `json:"visible"`
	File       File `json:"file"`
	RawFile    File `json:"raw_file"`
	OriginFile File `json:"origin_file"`
}

AlbumImage 相册图片

type AlbumItem

type AlbumItem struct {
	ShotLocation string        `json:"shot_location"`
	Remark       string        `json:"remark"`
	ImageFiles   []*AlbumImage `json:"images"`
	VideoFiles   []*AlbumVideo `json:"videos"`
}

AlbumItem 相册单个景点数据

type AlbumRecord

type AlbumRecord struct {
	base.DefaultModel
	AlbumID  uint
	ShareURL string `gorm:"size:256;NOT NULL;comment:分享地址"`
	ShotDate time.Time
	TempLow  int8
	TempHigh int8
	Weather  string `gorm:"size:32;NOT NULL;comment:天气"`
	Items    datatypes.JSON
}

AlbumRecord 相册记录,以天为记录

type AlbumVideo

type AlbumVideo struct {
	Visible bool `json:"visible"`
	File    File `json:"file"`
}

AlbumVideo 相册视频

type File

type File struct {
	Name         string `json:"name"`
	URL          string `json:"url"`
	Type         string `json:"type"`
	Size         int    `json:"size"`
	LastModified int    `json:"last_modified"`
}

Jump to

Keyboard shortcuts

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