types

package
v0.0.0-...-734a412 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseModel

type BaseModel struct {
	Id        uint32 `json:"id" gorm:"primaryKey;autoIncrement;comment:主键ID"`
	CreatedAt int64  `json:"createdAt,omitempty" gorm:"index;comment:创建时间"`
	UpdatedAt int64  `json:"updatedAt,omitempty" gorm:"index;comment:修改时间"`
}

type CreateModel

type CreateModel struct {
	Id        uint32 `json:"id" gorm:"primaryKey;autoIncrement;comment:主键ID"`
	CreatedAt int64  `json:"createdAt,omitempty" gorm:"index;comment:创建时间"`
}

type DeleteModel

type DeleteModel struct {
	Id        uint32    `json:"id" gorm:"primaryKey;autoIncrement;comment:主键ID"`
	CreatedAt int64     `json:"createdAt,omitempty" gorm:"index;comment:创建时间"`
	UpdatedAt int64     `json:"updatedAt,omitempty" gorm:"index;comment:修改时间"`
	DeletedAt NullInt64 `json:"deletedAt" gorm:"index;comment:删除时间"`
}

type Empty

type Empty = struct{}

type NullInt64

type NullInt64 sql.NullInt64

func (NullInt64) DeleteClauses

func (NullInt64) DeleteClauses(f *schema.Field) []clause.Interface

func (NullInt64) MarshalJSON

func (n NullInt64) MarshalJSON() ([]byte, error)

func (NullInt64) QueryClauses

func (NullInt64) QueryClauses(f *schema.Field) []clause.Interface

func (*NullInt64) Scan

func (n *NullInt64) Scan(value any) error

Scan implements the Scanner interface.

func (*NullInt64) UnmarshalJSON

func (n *NullInt64) UnmarshalJSON(b []byte) error

func (NullInt64) UpdateClauses

func (NullInt64) UpdateClauses(f *schema.Field) []clause.Interface

func (NullInt64) Value

func (n NullInt64) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type PageOptions

type PageOptions struct {
	Page     uint32
	PageSize uint32
	Scopes   Scopes
}

type Scopes

type Scopes func(db *gorm.DB) *gorm.DB

type SoftDeleteDeleteClause

type SoftDeleteDeleteClause struct {
	ZeroValue sql.NullString
	Field     *schema.Field
}

func (SoftDeleteDeleteClause) Build

func (SoftDeleteDeleteClause) MergeClause

func (sd SoftDeleteDeleteClause) MergeClause(*clause.Clause)

func (SoftDeleteDeleteClause) ModifyStatement

func (sd SoftDeleteDeleteClause) ModifyStatement(stmt *gorm.Statement)

func (SoftDeleteDeleteClause) Name

func (sd SoftDeleteDeleteClause) Name() string

type SoftDeleteQueryClause

type SoftDeleteQueryClause struct {
	ZeroValue sql.NullString
	Field     *schema.Field
}

func (SoftDeleteQueryClause) Build

func (SoftDeleteQueryClause) MergeClause

func (sd SoftDeleteQueryClause) MergeClause(*clause.Clause)

func (SoftDeleteQueryClause) ModifyStatement

func (sd SoftDeleteQueryClause) ModifyStatement(stmt *gorm.Statement)

func (SoftDeleteQueryClause) Name

func (sd SoftDeleteQueryClause) Name() string

type SoftDeleteUpdateClause

type SoftDeleteUpdateClause struct {
	ZeroValue sql.NullString
	Field     *schema.Field
}

func (SoftDeleteUpdateClause) Build

func (SoftDeleteUpdateClause) MergeClause

func (sd SoftDeleteUpdateClause) MergeClause(*clause.Clause)

func (SoftDeleteUpdateClause) ModifyStatement

func (sd SoftDeleteUpdateClause) ModifyStatement(stmt *gorm.Statement)

func (SoftDeleteUpdateClause) Name

func (sd SoftDeleteUpdateClause) Name() string

Jump to

Keyboard shortcuts

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