model

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const CatetoryRoot = "default"

Variables

This section is empty.

Functions

This section is empty.

Types

type AliOss

type AliOss struct {
	Endpoint        string
	AccessKeyID     string
	AccessKeySecret string
	Bucket          string
}

type Category

type Category struct {
	gorm.Model
	Name string
}

Category 目录,暂时只支持一级

type File

type File struct {
	gorm.Model
	// 文件名
	Name string `gorm:"unique;not null"`
	// 目录id 和 文件是一对多关系
	CategoryID uint

	Category Category `gorm:"foreignkey:CategoryID"`

	// tag
	MD5 string `gorm:"unique;not null"`

	// 相对地址
	Path string
}

File 文件信息

type FileDTO

type FileDTO struct {
	File
	Category string
}

Jump to

Keyboard shortcuts

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