github.com/infraboard/keyauth@v0.8.1/apps/session/operate.go (about)

     1  package session
     2  
     3  // // OperateLog 操作日志
     4  // type OperateLog struct {
     5  // 	ID              string `bson:"_id" json:"id"`
     6  // 	LoginLogID      string `bson:"login_id" json:"login_id"`
     7  // 	Domain          string `bson:"domain" json:"domain" alidate:"required"` // 所处域
     8  // 	*OperateLogData `bson:",inline"`
     9  // }
    10  
    11  // // OperateLogData todo
    12  // type OperateLogData struct {
    13  // 	Account         string     `bson:"account" json:"account" alidate:"required"`       // 用户
    14  // 	OperateAt       ftime.Time `bson:"operate_at" json:"operate_at" alidate:"required"` // 操作时间
    15  // 	ApplicationID   string     `bson:"application_id" json:"application_id"`            // 用户通过哪个端登录的
    16  // 	ApplicationName string     `bson:"application_name" json:"application_name"`        // 用户通过哪个端登录的
    17  // 	ResourceType    string     `bson:"resource_type" json:"resource_type"`              // 资源类型
    18  // 	Action          string     `bson:"action" json:"action"`                            // 操作资源的动作
    19  // 	Result          Result     `bson:"result" json:"result"`                            // 登录状态 (成功或者失败)
    20  // 	Comment         string     `bson:"comment" json:"comment"`                          // 备注, 用于记录失败原因
    21  // 	ResourceID      string     `bson:"resource_id" json:"resource_id"`                  // 资源ID
    22  // 	ResourceName    string     `bson:"resource_name" json:"resource_name"`              // 资源名称
    23  // }
    24  
    25  // // OperateRecordSet todo
    26  // type OperateRecordSet struct {
    27  // 	*request.PageRequest
    28  
    29  // 	Total int64         `json:"total"`
    30  // 	Items []*OperateLog `json:"items"`
    31  // }