note

package
v0.0.0-...-73c3907 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserIDKey contextUserIDKey = iota
	UserKey
)
View Source
const (
	I18nNoteKey i18n.ModuleKey = "I18nNoteKey"
)

Variables

View Source
var AfterCreateFunc = func(db *gorm.DB) (err error) {
	return
}
View Source
var Messages_en_US = &Messages{
	SuccessfullyCreated: "Successfully Created",
	Item:                "Item",
	Notes:               "Notes",
	NewNote:             "New Note",
}
View Source
var Messages_ja_JP = &Messages{
	SuccessfullyCreated: "作成に成功しました",
	Item:                "アイテム",
	Notes:               "ノート",
	NewNote:             "新規ノート",
}
View Source
var Messages_zh_CN = &Messages{
	SuccessfullyCreated: "成功创建",
	Item:                "记录",
	Notes:               "备注",
	NewNote:             "新建备注",
}

Functions

func Configure

func Configure(db *gorm.DB, pb *presets.Builder, models ...*presets.ModelBuilder)

func GetUnreadNotesCount

func GetUnreadNotesCount(db *gorm.DB, userID uint, resourceType, resourceID string) int64

Types

type Messages

type Messages struct {
	SuccessfullyCreated string
	Item                string
	Notes               string
	NewNote             string
}

type QorNote

type QorNote struct {
	gorm.Model

	UserID       uint `gorm:"index"`
	Creator      string
	ResourceType string `gorm:"index"`
	ResourceID   string `gorm:"index"`
	Content      string `sql:"size:5000"`
}

func (*QorNote) BeforeCreate

func (this *QorNote) BeforeCreate(tx *gorm.DB) (err error)

type UserNote

type UserNote struct {
	gorm.Model

	UserID       uint   `gorm:"index"`
	ResourceType string `gorm:"index"`
	ResourceID   string `gorm:"index"`
	Number       int64
}

Jump to

Keyboard shortcuts

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