审查视图

pkg/domain/order_log.go 1.3 KB
唐旭辉 authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
package domain

import "time"

// 日志数据来源
const (
	//管理后台
	ORDER_LOG_FROM string = "web_admin"
)

//操作人员的类型
const (
	//操作人类型
	ORDER_LOG_OPERATOR_ADMIN string = "admin"
)

//OrderLogDescript  描述日志内容
type OrderLogDescript struct {
唐旭辉 authored
19
	GoodId int64    `json:"goodId"`
20 21 22
	Title  string   `json:"title"`  //标题
	Item   string   `json:"item"`   //修改的项目
	Action []string `json:"action"` //执行的操作
唐旭辉 authored
23 24 25 26
}

//OrderLog 订单修改记录
type OrderLog struct {
27
	Id           int64
28 29 30
	OrderId      int64              `json:"orderId"` //订单id
	GoodId       int64              `json:"goodId"`
	AlterTime    time.Time          `json:"alterTime"`    //时间
唐旭辉 authored
31 32 33 34 35 36
	Operator     string             `json:"operator"`     //操作人员
	OperatorId   int64              `json:"operatorId"`   //操作人员Id
	OperatorType string             `json:"operatorType"` //操作人员的类型
	LogAction    string             `json:"logAction"`    //执行动作
	Descript     []OrderLogDescript `json:"descript"`     //描述日志内容
	DataFrom     string             `json:"dataFrom"`     //修改操作的来源:"web_admin"
唐旭辉 authored
37
}
唐旭辉 authored
38 39 40 41 42 43 44 45 46

type OrderLogFindQuery struct {
	OrderId int64 `json:"orderId"`
}

type OrderLogRepository interface {
	Add(*OrderLog) error
	Find(queryOptions OrderLogFindQuery) ([]OrderLog, error)
}