models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package models 模型通用属性和方法

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseModel

type BaseModel struct {
	ID        uint32    `gorm:"column:id;primaryKey;autoIncrement;" json:"id,omitempty"`
	CreatedAt time.Time `gorm:"column:created_at;" json:"created_at,omitempty"`
	UpdatedAt time.Time `gorm:"column:updated_at;" json:"updated_at,omitempty"`
}

BaseModel 模型基类

func (BaseModel) GetStringID

func (a BaseModel) GetStringID() string

GetStringID 获取 ID 的字符串格式

type Json

type Json []byte

func (Json) Equals

func (j Json) Equals(j1 Json) bool

func (Json) IsNull

func (j Json) IsNull() bool

func (Json) MarshalJSON

func (j Json) MarshalJSON() ([]byte, error)

func (*Json) Scan

func (j *Json) Scan(value interface{}) error

func (Json) ToStruct

func (j Json) ToStruct(obj interface{}) error

func (*Json) UnmarshalJSON

func (j *Json) UnmarshalJSON(data []byte) error

func (Json) Value

func (j Json) Value() (driver.Value, error)

Directories

Path Synopsis
Package order 存放订单 Model 相关逻辑
Package order 存放订单 Model 相关逻辑
Package user 存放用户 Model 相关逻辑
Package user 存放用户 Model 相关逻辑

Jump to

Keyboard shortcuts

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