Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Control ¶
Control action
func NewControlGorm ¶
NewControlGorm new control action
func NewControlMgm ¶
NewControlMgm new control action
type Delete ¶
Delete action
func NewDeleteGorm ¶
NewDeleteGorm new delete action
func NewDeleteMgm ¶
NewDeleteMgm new deleteMgm action
type LinkConfig ¶
type LinkConfig struct {
// FieldName field name
FieldName string
// CollectionName collection name
CollectionName string
// LocalField local field
LocalField string
// ForeignField foreign field
ForeignField string
}
LinkConfig link config
type ModelGorm ¶
type ModelGorm struct {
// ID primary key
ID string `gorm:"primarykey" json:"id" bson:"_id,omitempty" form:"id" query:"id"`
// CreatedAt create time
CreatedAt time.Time `json:"createdAt" bson:"createdAt"`
// UpdatedAt update time
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"`
// DeletedAt delete time soft delete
DeletedAt gorm.DeletedAt `gorm:"index" bson:"-" json:"-"`
}
ModelGorm model gorm
func (*ModelGorm) BeforeCreate ¶ added in v0.0.2
type ModelProvider ¶
type ModelProvider string
ModelProvider model provider
const ( // ModelProviderMgm mgm model provider ModelProviderMgm ModelProvider = "mgm" // ModelProviderGorm gorm model provider ModelProviderGorm ModelProvider = "gorm" )
type Pagination ¶
type Pagination struct {
Page int64 `form:"page" query:"page"`
PageSize int64 `form:"pageSize" query:"pageSize"`
}
Pagination pagination params
type Search ¶
Search action
func NewSearchGorm ¶
NewSearchGorm new search action
func NewSearchMgm ¶
NewSearchMgm new search action
Click to show internal directories.
Click to hide internal directories.