db

package
v0.0.0-...-83f560d Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get() *gorm.DB

Get ...

func Init

func Init() error

Init 初始化数据库

Types

type File

type File struct {
	ID         uint `gorm:"primarykey"`
	UserID     uint
	ToUserID   uint
	FileName   string
	FileSize   int64
	MediaType  string
	URL        string
	Status     int32
	MediaCate  int32
	Hash       string
	CompleteAt time.Time
	CheckAt    time.Time
}

File 文件

type FileTrace

type FileTrace struct {
	ID        uint `gorm:"primarykey"`
	UserID    uint
	FileID    uint
	TraceID   string
	CreatedAt time.Time
	UpdatedAt time.Time
}

FileTrace 文件

type User

type User struct {
	ID      uint   `gorm:"primarykey"`
	Openid  string `gorm:"index"`
	Created int
	Posted  int
	Related int
	Fromid  int
	Isblock int
}

User 用户

Jump to

Keyboard shortcuts

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