Documentation
¶
Index ¶
- func Close()
- func GetNotesByRecordIDs(recordIDs []primitive.ObjectID) (map[primitive.ObjectID]DifNotes, error)
- func New(c map[string]string) error
- type DifNote
- type DifNotes
- type HrTime
- type INote
- type Location
- type ModificationNote
- type Note
- type NoteType
- type OtherWorkNote
- type Record
- type Records
- type SystemNote
- type TripNote
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNotesByRecordIDs ¶
GetNotesByRecordIDs 获取recordIDs相对应的记录并以key为recordID,value为所对应Notes的map结构返回
Types ¶
type Location ¶
type Location struct { Address locModel.Address `bson:"address,omitempty" json:"address,omitempty" valid:"-"` Coors locModel.Coors `bson:"coors,omitempty" json:"coors,omitempty" valid:"-"` }
Location 位置信息
type ModificationNote ¶
type ModificationNote struct { Note `bson:",inline"` By primitive.ObjectID `bson:"by" json:"by" valid:"required"` }
ModificationNote 人为修改笔记
type Note ¶
type Note struct { ID primitive.ObjectID `bson:"_id" json:"id" valid:"-"` RecordID primitive.ObjectID `bson:"recordID" json:"recordID" valid:"required"` Type NoteType `bson:"noteType" json:"noteType" valid:"required"` Comment string `bson:"comment" json:"comment" valid:"-"` CreatedAt time.Time `bson:"createdAt" json:"createdAt" valid:"required"` }
Note 笔记
type Record ¶
type Record struct { ID primitive.ObjectID `bson:"_id" json:"id" valid:"-"` DriverID primitive.ObjectID `bson:"driverID" json:"driverID" valid:"required"` Type Type `bson:"type" json:"type" valid:"required"` Time time.Time `bson:"time" json:"time" valid:"required"` Duration time.Duration `bson:"duration" json:"duration" valid:"required"` StartLocation Location `bson:"startLocation" json:"startLocation" valid:"required"` EndLocation Location `bson:"endLocation," json:"endLocation" valid:"required"` VehicleID primitive.ObjectID `bson:"vehicleID" json:"vehicleID" valid:"required"` StartMileAge *float64 `bson:"startDistance,omitempty" json:"startDistance,omitempty" valid:"-"` EndMileAge *float64 `bson:"endDistance,omitempty" json:"endDistance,omitempty" valid:"-"` CreatedAt time.Time `bson:"createdAt" json:"createdAt" valid:"required"` ClientTime *time.Time `bson:"clientTime,omitempty" json:"clientTime,omitempty" valid:"-"` DeletedAt *time.Time `bson:"deletedAt,omitempty" json:"deletedAt,omitempty" valid:"-"` }
Record 记录
func GetLastestRecord ¶
GetLastestRecord 获取最近的一条记录
func GetRecords ¶
GetRecords 获取用户时间段内的记录
type TripNote ¶
type TripNote struct { Note `bson:",inline"` TransportOperatorID *primitive.ObjectID `bson:"transportOperatorID,omitempty" json:"transportOperatorID,omitempty" valid:"-"` StartTime time.Time `bson:"startTime" json:"startTime" valid:"required"` EndTime time.Time `bson:"endTime" json:"endTime" valid:"required"` StartLocation Location `bson:"startLocation" json:"startLocation" valid:"required"` EndLocation Location `bson:"endLocation" json:"endLocation" valid:"required"` }
TripNote 行程笔记
Click to show internal directories.
Click to hide internal directories.