package operate_log import ( "git.sxidc.com/go-framework/baize/framework/core/domain" "git.sxidc.com/go-framework/baize/framework/core/domain/value_object" "time" ) const ( FieldResource = "Resource" FieldResourceID = "ResourceID" FieldOperate = "Operate" FieldOperatorID = "OperatorID" FieldOperatorName = "OperatorName" FieldOperateTime = "OperateTime" FieldContent = "Content" ) var fieldMap = map[string]string{ FieldResource: "资源名称", FieldResourceID: "资源ID", FieldOperate: "操作", FieldOperatorID: "操作者ID", FieldOperatorName: "操作者", FieldOperateTime: "操作时间", FieldContent: "日志内容", } var ( ColumnResource = domain.ColumnName(FieldResource) ColumnResourceID = domain.ColumnName(FieldResourceID) ColumnOperate = domain.ColumnName(FieldOperate) ColumnOperatorID = domain.ColumnName(FieldOperatorID) ColumnOperatorName = domain.ColumnName(FieldOperatorName) ColumnOperateTime = domain.ColumnName(FieldOperateTime) ColumnContent = domain.ColumnName(FieldContent) ) type ValueObject struct { value_object.Base Resource string `sqlmapping:"column:resource" sqlresult:"column:resource"` ResourceID string `sqlmapping:"column:resource_id" sqlresult:"column:resource_id"` Operate string `sqlmapping:"column:operate" sqlresult:"column:operate"` OperatorID string `sqlmapping:"column:operator_id" sqlresult:"column:operator_id"` OperatorName string `sqlmapping:"column:operator_name" sqlresult:"column:operator_name"` OperateTime time.Time `sqlmapping:"column:operate_time" sqlresult:"column:operate_time"` Content string `sqlmapping:"column:content" sqlresult:"column:content"` } func (v *ValueObject) DomainCNName() string { return "操作日志" } func (v *ValueObject) DomainCamelName() string { return "OperateLog" }