models

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveRecord

type ActiveRecord interface {
	schema.Tabler
	SetCreatedBy(createBy int64)
	SetUpdatedBy(updateBy int64)
	Generate() ActiveRecord
	GetId() interface{}
}

type CharSelectOptions

type CharSelectOptions struct {
	Value string `json:"value"`
	Desc  string `json:"desc"`
}

type ControlBy

type ControlBy struct {
	CreatedBy string `json:"createdBy" gorm:"column:created_by;index;comment:创建者"`
	UpdatedBy string `json:"updatedBy" gorm:"column:updated_by;index;comment:更新者"`
}

func (*ControlBy) SetCreatedBy

func (e *ControlBy) SetCreatedBy(createdBy string)

SetCreatedBy 设置创建人id

func (*ControlBy) SetUpdatedBy

func (e *ControlBy) SetUpdatedBy(updatedBy string)

SetUpdatedBy 设置修改人id

type ModelTime

type ModelTime struct {
	CreatedAt xtime.Time `json:"createdTime" gorm:"column:created_time;comment:创建时间" url:"createdTime"`
	UpdatedAt xtime.Time `json:"updatedTime" gorm:"column:updated_time;comment:最后更新时间" url:"updatedTime"`
}

type Page

type Page struct {
	PageNum  int `json:"pageNum" url:"pageNum" gorm:"-"`
	PageSize int `json:"pageSize" url:"pageSize" gorm:"-"`
}

func (Page) GetLimit

func (p Page) GetLimit() int

func (Page) GetOffset

func (p Page) GetOffset() int

type PrimaryKey

type PrimaryKey struct {
	Id string `json:"id" gorm:"column:id;primaryKey;comment:主键编码" url:"id"`
}

func (*PrimaryKey) SetPrimaryKey

func (e *PrimaryKey) SetPrimaryKey(primaryKey string)

SetPrimaryKey 主键

type SelectOptions

type SelectOptions struct {
	Value int    `json:"value"`
	Desc  string `json:"desc"`
}

type ViewEnumCache

type ViewEnumCache struct {
	Val  int    `json:"val"`
	Des  string `json:"des"`
	Enum string `json:"enum"`
}

Jump to

Keyboard shortcuts

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