Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CountRequest ¶
type CountResponse ¶
type CountResponse struct {
Count int64
}
type CreateRequest ¶
type CreateRequest struct { TargetID int64 UserID int64 Type SDLogType Extra SDLogExtra CreatedAt time.Time }
CreateRequest ...
type FindRequest ¶
type FindRequest struct { LogID *int64 TargetID *int64 UserID *int64 Type *SDLogType Page *int16 // 页数从1开始,默认1 PageSize *int16 // 页项,默认10 CreatedAt *time.Time }
FindRequest ...
type SDLogExtra ¶
type SDLogModel ¶
type SDLogModel struct { ID int64 `gorm:"primary_key;AUTO_INCREMENT;not null"` UserID int64 `gorm:"not null;"` TargetID int64 `gorm:"not null;"` Type string `gorm:"type:varchar(60);not null"` CreatedAt time.Time `gorm:"DEFAULT:CURRENT_TIMESTAMP;NOT NULL"` Extra string `gorm:"type:TEXT;"` }
func (SDLogModel) TableName ¶
func (SDLogModel) TableName() string
type SDLogService ¶
type SDLogService struct { SDLogServiceInterface // contains filtered or unexported fields }
func SDLogServiceInstance ¶
func SDLogServiceInstance() *SDLogService
func (SDLogService) Count ¶
func (ss SDLogService) Count(req CountRequest) (*CountResponse, error)
Count...
func (SDLogService) Create ¶
func (ss SDLogService) Create(req CreateRequest) (*CreateResponse, error)
Create ...
func (SDLogService) Find ¶
func (ss SDLogService) Find(req FindRequest) (*FindResponse, error)
Find ...
type SDLogServiceInterface ¶
type SDLogServiceInterface interface { Find(req FindRequest) (*FindResponse, error) Create(req CreateRequest) (*CreateResponse, error) Count(req CountRequest) (*CountResponse, error) }
Click to show internal directories.
Click to hide internal directories.