database

package
v0.0.0-...-b61ba89 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

@File: model.go @Contact: lucien@lucien.ink @Licence: (C)Copyright 2019 Lucien Shui

@Modify Time @Author @Version @Description ------------ ------- -------- ----------- 2019-06-23 14:03 Lucien 1.0 None

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FixAutoIncrement

func FixAutoIncrement()

func TransPermanent

func TransPermanent() uint64

func TransTemporary

func TransTemporary() uint64

Types

type Permanent

type Permanent struct {
	Key       uint64 `gorm:"primary_key;index:idx"`
	Lang      string `json:"lang" gorm:"type:varchar(16)"`
	Content   string `json:"content" gorm:"type:mediumtext"`
	Password  string `json:"password" gorm:"type:varchar(32)"`
	ClientIP  string `gorm:"type:varchar(64)"`
	CreatedAt time.Time
	DeletedAt *time.Time
}

func (*Permanent) Save

func (paste *Permanent) Save(db *gorm.DB) error

type Temporary

type Temporary struct {
	Key       string `json:"key" gorm:"type:varchar(16);primary_key;index:idx"`
	Lang      string `json:"lang" gorm:"type:varchar(16)"`
	Content   string `json:"content" gorm:"type:mediumtext"`
	Password  string `json:"password" gorm:"type:varchar(32)"`
	ClientIP  string `gorm:"type:varchar(64)"`
	CreatedAt time.Time
}

func (*Temporary) Save

func (paste *Temporary) Save(db *gorm.DB) error

Jump to

Keyboard shortcuts

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