model

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HasSub_Table                 = "has_subs"
	HasSub_Struct                = "has_sub"
	HasSub_ID                    = "id"
	HasSub_UpdateTime            = "update_time"
	HasSub_CreateTime            = "create_time"
	HasSub_OptimisticLockVersion = "optimistic_lock_version"
	HasSub_SubId                 = "sub_id"
	HasSub_Count                 = "count"
	HasSub_SubData               = "sub_data"
)
View Source
const (
	Notice_Table                 = "notices"
	Notice_Struct                = "notice"
	Notice_ID                    = "id"
	Notice_UpdateTime            = "update_time"
	Notice_CreateTime            = "create_time"
	Notice_OptimisticLockVersion = "optimistic_lock_version"
	Notice_Data                  = "data"
	Notice_Status                = "status"
	Notice_No                    = "no"
)
View Source
const (
	Sub_Table                 = "subs"
	Sub_Struct                = "sub"
	Sub_ID                    = "id"
	Sub_UpdateTime            = "update_time"
	Sub_CreateTime            = "create_time"
	Sub_OptimisticLockVersion = "optimistic_lock_version"
	Sub_Name                  = "name"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoData

type AutoData struct {
	db.AutoModelBase
	Name string
	Age  int8
}

type DataType

type DataType struct {
	Name  string
	Count int64
}

type HasSub

type HasSub struct {
	db.ModelBase
	SubId   string
	Count   int
	SubData *Sub `pg:"rel:has-one"`
}

func (*HasSub) String

func (m *HasSub) String() string

func (*HasSub) ToMap

func (m *HasSub) ToMap() map[string]string

func (*HasSub) ToUpsertSet

func (m *HasSub) ToUpsertSet() []string

type Notice

type Notice struct {
	db.ModelBase
	Data   DataType `pg:"composite:data"`
	Status int
	No     int `pg:"-"`
}

func (*Notice) String

func (m *Notice) String() string

func (*Notice) ToMap

func (m *Notice) ToMap() map[string]string

func (*Notice) ToUpsertSet

func (m *Notice) ToUpsertSet() []string

type Sub

type Sub struct {
	db.ModelBase
	Name string
}

func (*Sub) String

func (m *Sub) String() string

func (*Sub) ToMap

func (m *Sub) ToMap() map[string]string

func (*Sub) ToUpsertSet

func (m *Sub) ToUpsertSet() []string

Jump to

Keyboard shortcuts

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