mirror of
https://github.com/abhinavxd/libredesk.git
synced 2025-11-01 20:44:12 +00:00
- single table stores acitivites against entities, actors, timestamps, ip addresses and activity description. - admin page to view, sort and filter activity logs. - new `activity_logs:manage` permission
29 lines
903 B
Go
29 lines
903 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
const (
|
|
Login = "login"
|
|
Logout = "logout"
|
|
Away = "away"
|
|
AwayManual = "away_manual"
|
|
AwayReassigned = "away_reassigned"
|
|
Online = "online"
|
|
)
|
|
|
|
type ActivityLog struct {
|
|
ID int64 `db:"id" json:"id"`
|
|
CreatedAt time.Time `db:"created_at" json:"created_at"`
|
|
UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
|
|
ActivityType string `db:"activity_type" json:"activity_type"`
|
|
ActivityDescription string `db:"activity_description" json:"activity_description"`
|
|
ActorID int `db:"actor_id" json:"actor_id"`
|
|
TargetModelType string `db:"target_model_type" json:"target_model_type"`
|
|
TargetModelID int `db:"target_model_id" json:"target_model_id"`
|
|
IP string `db:"ip" json:"ip"`
|
|
|
|
Total int `db:"total" json:"total"`
|
|
}
|