mbas

package
v0.15.26 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRecord

func CreateRecord(param Record) error

func Destroy

func Destroy()

func Init

func Init(baseUrl string, timeoutSec time.Duration)

func RecordAddRemark

func RecordAddRemark(param RecordAddRemarkParam) error

Types

type GetRecordParam

type GetRecordParam struct {
	TangentId   string `validate:"required,len=32" form:"tangentId"`
	UserId      string `validate:"required,len=32" form:"userId"`
	CheckInDate string `form:"checkIndDate"`
	RecordType  uint8  `form:"recordType"`
	PageNo      int    `form:"pageNo"`
	PageSize    int    `form:"pageSize"`
}

type Record

type Record struct {
	Id          string  `json:"id"`
	TangentId   string  `validate:"required,len=32" json:"tangentId"`
	UserId      string  `validate:"required,len=32" json:"userId"`
	CheckInTime string  `validate:"required" json:"checkInTime"`
	Img         string  `json:"img"`
	Lat         float64 `json:"lat"`
	Lng         float64 `json:"lng"`
	Addr        string  `json:"addr"`
	Type        uint8   `json:"type"`
	Status      uint8   `json:"status"`
	LateTime    float64 `json:"lateTime"`
}

type RecordAddRemarkParam

type RecordAddRemarkParam struct {
	TangentId string `validate:"required,len=32" json:"tangentId"`
	RecordId  string `validate:"required,len=32" json:"recordId"`
	Remark    string `validate:"required,min=1,max=1024" json:"remark"`
}

type Resp

type Resp[T any] struct {
	Data T      `json:"data"`
	Code int    `json:"code"`
	Suc  bool   `json:"success"`
	Msg  string `json:"msg"`
}

type Result

type Result[T any] struct {
	Info       []T `json:"info"`
	TotalCount int `json:"totalCount"`
	PageNo     int `json:"pageNo"`
}

func GetRecords

func GetRecords(param GetRecordParam) (Result[Record], error)

Jump to

Keyboard shortcuts

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