schema

package
v0.0.0-...-ab1a5e7 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dictionaries

type Dictionaries []*Dictionary

Defining the slice of `Dictionary` struct.

type Dictionary

type Dictionary struct {
	ID        string    `json:"id" gorm:"size:20;primaryKey;"` // Unique ID
	CreatedAt time.Time `json:"created_at" gorm:"index;"`      // Create time
	UpdatedAt time.Time `json:"updated_at" gorm:"index;"`      // Update time
}

Dictionaries management

type DictionaryForm

type DictionaryForm struct {
}

Defining the data structure for creating a `Dictionary` struct.

func (*DictionaryForm) FillTo

func (a *DictionaryForm) FillTo(dictionary *Dictionary) error

Convert `DictionaryForm` to `Dictionary` object.

func (*DictionaryForm) Validate

func (a *DictionaryForm) Validate() error

A validation function for the `DictionaryForm` struct.

type DictionaryQueryOptions

type DictionaryQueryOptions struct {
	util.QueryOptions
}

Defining the query options for the `Dictionary` struct.

type DictionaryQueryParam

type DictionaryQueryParam struct {
	util.PaginationParam
}

Defining the query parameters for the `Dictionary` struct.

type DictionaryQueryResult

type DictionaryQueryResult struct {
	Data       Dictionaries
	PageResult *util.PaginationResult
}

Defining the query result for the `Dictionary` struct.

type Logger

type Logger struct {
	ID        string    `gorm:"size:20;primaryKey;" json:"id"`           // Unique ID
	Level     string    `gorm:"size:20;index;" json:"level"`             // Log level
	TraceID   string    `gorm:"size:64;index;" json:"trace_id"`          // Trace ID
	UserID    string    `gorm:"size:20;index;" json:"user_id"`           // User ID
	Tag       string    `gorm:"size:32;index;" json:"tag"`               // Log tag
	Message   string    `gorm:"size:1024;" json:"message"`               // Log message
	Stack     string    `gorm:"type:text;" json:"stack"`                 // Error stack
	Data      string    `gorm:"type:text;" json:"data"`                  // Log data
	CreatedAt time.Time `gorm:"index;" json:"created_at"`                // Create time
	LoginName string    `json:"login_name" gorm:"<-:false;-:migration;"` // From User.Username
	UserName  string    `json:"user_name" gorm:"<-:false;-:migration;"`  // From User.Name
}

Logger management

func (*Logger) TableName

func (a *Logger) TableName() string

type LoggerQueryOptions

type LoggerQueryOptions struct {
	util.QueryOptions
}

Defining the query options for the `Logger` struct.

type LoggerQueryParam

type LoggerQueryParam struct {
	util.PaginationParam
	Level        string `form:"level"`     // Log level
	TraceID      string `form:"traceID"`   // Trace ID
	LikeUserName string `form:"userName"`  // User Name
	Tag          string `form:"tag"`       // Log tag
	LikeMessage  string `form:"message"`   // Log message
	StartTime    string `form:"startTime"` // Start time
	EndTime      string `form:"endTime"`   // End time
}

Defining the query parameters for the `Logger` struct.

type LoggerQueryResult

type LoggerQueryResult struct {
	Data       Loggers
	PageResult *util.PaginationResult
}

Defining the query result for the `Logger` struct.

type Loggers

type Loggers []*Logger

Defining the slice of `Logger` struct.

Jump to

Keyboard shortcuts

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