Browse Source

取消comment后携带的''

pixel 4 years ago
parent
commit
1949307849

+ 5 - 5
server/model/exa_customer.go

@@ -6,9 +6,9 @@ import (
 
 type ExaCustomer struct {
 	gorm.Model
-	CustomerName       string  `json:"customerName" form:"customerName" gorm:"comment:'客户名'"`
-	CustomerPhoneData  string  `json:"customerPhoneData" form:"customerPhoneData" gorm:"comment:'客户手机号'"`
-	SysUserID          uint    `json:"sysUserId" form:"sysUserId" gorm:"comment:'管理ID'"`
-	SysUserAuthorityID string  `json:"sysUserAuthorityID" form:"sysUserAuthorityID" gorm:"comment:'管理角色ID'"`
-	SysUser            SysUser `json:"sysUser" form:"sysUser" gorm:"comment:'管理详情'"`
+	CustomerName       string  `json:"customerName" form:"customerName" gorm:"comment:客户名"`
+	CustomerPhoneData  string  `json:"customerPhoneData" form:"customerPhoneData" gorm:"comment:客户手机号"`
+	SysUserID          uint    `json:"sysUserId" form:"sysUserId" gorm:"comment:管理ID"`
+	SysUserAuthorityID string  `json:"sysUserAuthorityID" form:"sysUserAuthorityID" gorm:"comment:管理角色ID"`
+	SysUser            SysUser `json:"sysUser" form:"sysUser" gorm:"comment:管理详情"`
 }

+ 4 - 4
server/model/exa_file_upload_download.go

@@ -6,8 +6,8 @@ import (
 
 type ExaFileUploadAndDownload struct {
 	gorm.Model
-	Name string `json:"name" gorm:"comment:'文件名'"`
-	Url  string `json:"url" gorm:"comment:'文件地址'"`
-	Tag  string `json:"tag" gorm:"comment:'文件标签'"`
-	Key  string `json:"key" gorm:"comment:'编号'"`
+	Name string `json:"name" gorm:"comment:文件名"`
+	Url  string `json:"url" gorm:"comment:文件地址"`
+	Tag  string `json:"tag" gorm:"comment:文件标签"`
+	Key  string `json:"key" gorm:"comment:编号"`
 }

+ 9 - 9
server/model/exa_simple_uploader.go

@@ -1,13 +1,13 @@
 package model
 
 type ExaSimpleUploader struct {
-	ChunkNumber      string `json:"chunkNumber" gorm:"comment:'当前切片标记'"`
-	CurrentChunkSize string `json:"currentChunkSize" gorm:"comment:'当前切片容量'"`
-	CurrentChunkPath string `json:"currentChunkPath" gorm:"comment:'切片本地路径'"`
-	TotalSize        string `json:"totalSize" gorm:"comment:'总容量'"`
-	Identifier       string `json:"identifier" gorm:"comment:'文件标识(md5)'"`
-	Filename         string `json:"filename" gorm:"comment:'文件名'"`
-	TotalChunks      string `json:"totalChunks" gorm:"comment:'切片总数'"`
-	IsDone           bool   `json:"isDone" gorm:"comment:'是否上传完成'"`
-	FilePath         string `json:"filePath" gorm:"comment:'文件本地路径'"`
+	ChunkNumber      string `json:"chunkNumber" gorm:"comment:当前切片标记"`
+	CurrentChunkSize string `json:"currentChunkSize" gorm:"comment:当前切片容量"`
+	CurrentChunkPath string `json:"currentChunkPath" gorm:"comment:切片本地路径"`
+	TotalSize        string `json:"totalSize" gorm:"comment:总容量"`
+	Identifier       string `json:"identifier" gorm:"comment:文件标识(md5)"`
+	Filename         string `json:"filename" gorm:"comment:文件名"`
+	TotalChunks      string `json:"totalChunks" gorm:"comment:切片总数"`
+	IsDone           bool   `json:"isDone" gorm:"comment:是否上传完成"`
+	FilePath         string `json:"filePath" gorm:"comment:文件本地路径"`
 }

+ 4 - 4
server/model/sys_api.go

@@ -6,8 +6,8 @@ import (
 
 type SysApi struct {
 	gorm.Model
-	Path        string `json:"path" gorm:"comment:'api路径'"`
-	Description string `json:"description" gorm:"comment:'api中文描述'"`
-	ApiGroup    string `json:"apiGroup" gorm:"comment:'api组'"`
-	Method      string `json:"method" gorm:"default:'POST'" gorm:"comment:'方法'"`
+	Path        string `json:"path" gorm:"comment:api路径"`
+	Description string `json:"description" gorm:"comment:api中文描述"`
+	ApiGroup    string `json:"apiGroup" gorm:"comment:api组"`
+	Method      string `json:"method" gorm:"default:POST" gorm:"comment:方法"`
 }

+ 3 - 3
server/model/sys_authority.go

@@ -8,9 +8,9 @@ type SysAuthority struct {
 	CreatedAt       time.Time
 	UpdatedAt       time.Time
 	DeletedAt       *time.Time     `sql:"index"`
-	AuthorityId     string         `json:"authorityId" gorm:"not null;unique;primary_key;comment:'角色ID';size:90"`
-	AuthorityName   string         `json:"authorityName" gorm:"comment:'角色名'"`
-	ParentId        string         `json:"parentId" gorm:"comment:'父角色ID'"`
+	AuthorityId     string         `json:"authorityId" gorm:"not null;unique;primary_key;comment:角色ID;size:90"`
+	AuthorityName   string         `json:"authorityName" gorm:"comment:角色名"`
+	ParentId        string         `json:"parentId" gorm:"comment:父角色ID"`
 	DataAuthorityId []SysAuthority `json:"dataAuthorityId" gorm:"many2many:sys_data_authority_id"`
 	Children        []SysAuthority `json:"children" gorm:"-"`
 	SysBaseMenus    []SysBaseMenu  `json:"menus" gorm:"many2many:sys_authority_menus;"`

+ 2 - 2
server/model/sys_authority_menu.go

@@ -2,8 +2,8 @@ package model
 
 type SysMenu struct {
 	SysBaseMenu
-	MenuId      string                 `json:"menuId" gorm:"comment:'菜单ID'"`
-	AuthorityId string                 `json:"-" gorm:"comment:'角色ID'"`
+	MenuId      string                 `json:"menuId" gorm:"comment:菜单ID"`
+	AuthorityId string                 `json:"-" gorm:"comment:角色ID"`
 	Children    []SysMenu              `json:"children" gorm:"-"`
 	Parameters  []SysBaseMenuParameter `json:"parameters" gorm:"foreignKey:SysBaseMenuID;references:MenuId"`
 }

+ 11 - 11
server/model/sys_base_menu.go

@@ -7,23 +7,23 @@ import (
 type SysBaseMenu struct {
 	gorm.Model
 	MenuLevel     uint   `json:"-"`
-	ParentId      string `json:"parentId" gorm:"comment:'父菜单ID'"`
-	Path          string `json:"path" gorm:"comment:'路由path'"`
-	Name          string `json:"name" gorm:"comment:'路由name'"`
-	Hidden        bool   `json:"hidden" gorm:"comment:'是否在列表隐藏'"`
-	Component     string `json:"component" gorm:"comment:'对应前端文件路径'"`
-	Sort          int    `json:"sort" gorm:"comment:'排序标记'"`
-	Meta          `json:"meta" gorm:"comment:'附加属性'"`
+	ParentId      string `json:"parentId" gorm:"comment:父菜单ID"`
+	Path          string `json:"path" gorm:"comment:路由path"`
+	Name          string `json:"name" gorm:"comment:路由name"`
+	Hidden        bool   `json:"hidden" gorm:"comment:是否在列表隐藏"`
+	Component     string `json:"component" gorm:"comment:对应前端文件路径"`
+	Sort          int    `json:"sort" gorm:"comment:排序标记"`
+	Meta          `json:"meta" gorm:"comment:附加属性"`
 	SysAuthoritys []SysAuthority         `json:"authoritys" gorm:"many2many:sys_authority_menus;"`
 	Children      []SysBaseMenu          `json:"children" gorm:"-"`
 	Parameters    []SysBaseMenuParameter `json:"parameters"`
 }
 
 type Meta struct {
-	KeepAlive   bool   `json:"keepAlive" gorm:"comment:'是否缓存'"`
-	DefaultMenu bool   `json:"defaultMenu" gorm:"comment:'是否是基础路由(开发中)'"`
-	Title       string `json:"title" gorm:"comment:'菜单名'"`
-	Icon        string `json:"icon" gorm:"comment:'菜单图标'"`
+	KeepAlive   bool   `json:"keepAlive" gorm:"comment:是否缓存"`
+	DefaultMenu bool   `json:"defaultMenu" gorm:"comment:是否是基础路由(开发中)"`
+	Title       string `json:"title" gorm:"comment:菜单名"`
+	Icon        string `json:"icon" gorm:"comment:菜单图标"`
 }
 
 type SysBaseMenuParameter struct {

+ 4 - 4
server/model/sys_dictionary.go

@@ -8,9 +8,9 @@ import (
 // 如果含有time.Time 请自行import time包
 type SysDictionary struct {
 	gorm.Model
-	Name                 string                `json:"name" form:"name" gorm:"column:name;comment:'字典名(中)'"`
-	Type                 string                `json:"type" form:"type" gorm:"column:type;comment:'字典名(英)'"`
-	Status               *bool                 `json:"status" form:"status" gorm:"column:status;comment:'状态'"`
-	Desc                 string                `json:"desc" form:"desc" gorm:"column:desc;comment:'描述'"`
+	Name                 string                `json:"name" form:"name" gorm:"column:name;comment:字典名(中)"`
+	Type                 string                `json:"type" form:"type" gorm:"column:type;comment:字典名(英)"`
+	Status               *bool                 `json:"status" form:"status" gorm:"column:status;comment:状态"`
+	Desc                 string                `json:"desc" form:"desc" gorm:"column:desc;comment:描述"`
 	SysDictionaryDetails []SysDictionaryDetail `json:"sysDictionaryDetails" form:"sysDictionaryDetails"`
 }

+ 5 - 5
server/model/sys_dictionary_detail.go

@@ -8,9 +8,9 @@ import (
 // 如果含有time.Time 请自行import time包
 type SysDictionaryDetail struct {
 	gorm.Model
-	Label           string `json:"label" form:"label" gorm:"column:label;comment:'展示值'"`
-	Value           int    `json:"value" form:"value" gorm:"column:value;comment:'字典值'"`
-	Status          *bool  `json:"status" form:"status" gorm:"column:status;comment:'启用状态'"`
-	Sort            int    `json:"sort" form:"sort" gorm:"column:sort;comment:'排序标记'"`
-	SysDictionaryID int    `json:"sysDictionaryID" form:"sysDictionaryID" gorm:"column:sys_dictionary_id;comment:'关联标记'"`
+	Label           string `json:"label" form:"label" gorm:"column:label;comment:展示值"`
+	Value           int    `json:"value" form:"value" gorm:"column:value;comment:字典值"`
+	Status          *bool  `json:"status" form:"status" gorm:"column:status;comment:启用状态"`
+	Sort            int    `json:"sort" form:"sort" gorm:"column:sort;comment:排序标记"`
+	SysDictionaryID int    `json:"sysDictionaryID" form:"sysDictionaryID" gorm:"column:sys_dictionary_id;comment:关联标记"`
 }

+ 1 - 1
server/model/sys_jwt_blacklist.go

@@ -6,5 +6,5 @@ import (
 
 type JwtBlacklist struct {
 	gorm.Model
-	Jwt string `gorm:"type:text;comment:'jwt'"`
+	Jwt string `gorm:"type:text;comment:jwt"`
 }

+ 10 - 10
server/model/sys_operation_record.go

@@ -9,15 +9,15 @@ import (
 // 如果含有time.Time 请自行import time包
 type SysOperationRecord struct {
 	gorm.Model
-	Ip           string        `json:"ip" form:"ip" gorm:"column:ip;comment:'请求ip'"`
-	Method       string        `json:"method" form:"method" gorm:"column:method;comment:''"`
-	Path         string        `json:"path" form:"path" gorm:"column:path;comment:''"`
-	Status       int           `json:"status" form:"status" gorm:"column:status;comment:''"`
-	Latency      time.Duration `json:"latency" form:"latency" gorm:"column:latency;comment:''"`
-	Agent        string        `json:"agent" form:"agent" gorm:"column:agent;comment:''"`
-	ErrorMessage string        `json:"error_message" form:"error_message" gorm:"column:error_message;comment:''"`
-	Body         string        `json:"body" form:"body" gorm:"column:body;comment:'请求Body'"`
-	Resp         string        `json:"resp" form:"resp" gorm:"type:longtext;column:resp;comment:'响应Body'"`
-	UserID       int           `json:"user_id" form:"user_id" gorm:"column:user_id;comment:''"`
+	Ip           string        `json:"ip" form:"ip" gorm:"column:ip;comment:请求ip"`
+	Method       string        `json:"method" form:"method" gorm:"column:method;comment:请求方法"`
+	Path         string        `json:"path" form:"path" gorm:"column:path;comment:请求路径"`
+	Status       int           `json:"status" form:"status" gorm:"column:status;comment:请求状态"`
+	Latency      time.Duration `json:"latency" form:"latency" gorm:"column:latency;comment:延迟"`
+	Agent        string        `json:"agent" form:"agent" gorm:"column:agent;comment:代理"`
+	ErrorMessage string        `json:"error_message" form:"error_message" gorm:"column:error_message;comment:错误信息"`
+	Body         string        `json:"body" form:"body" gorm:"column:body;comment:请求Body"`
+	Resp         string        `json:"resp" form:"resp" gorm:"type:longtext;column:resp;comment:响应Body"`
+	UserID       int           `json:"user_id" form:"user_id" gorm:"column:user_id;comment:用户id"`
 	User         SysUser       `json:"user"`
 }

+ 7 - 7
server/model/sys_user.go

@@ -7,11 +7,11 @@ import (
 
 type SysUser struct {
 	gorm.Model
-	UUID        uuid.UUID    `json:"uuid" gorm:"comment:'用户UUID'"`
-	Username    string       `json:"userName" gorm:"comment:'用户登录名'"`
-	Password    string       `json:"-"  gorm:"comment:'用户登录密码'"`
-	NickName    string       `json:"nickName" gorm:"default:'系统用户';comment:'用户昵称'" `
-	HeaderImg   string       `json:"headerImg" gorm:"default:'http://qmplusimg.henrongyi.top/head.png';comment:'用户头像'"`
-	Authority   SysAuthority `json:"authority" gorm:"foreignKey:AuthorityId;references:AuthorityId;comment:'用户角色'"`
-	AuthorityId string       `json:"authorityId" gorm:"default:888;comment:'用户角色ID'"`
+	UUID        uuid.UUID    `json:"uuid" gorm:"comment:用户UUID"`
+	Username    string       `json:"userName" gorm:"comment:用户登录名"`
+	Password    string       `json:"-"  gorm:"comment:用户登录密码"`
+	NickName    string       `json:"nickName" gorm:"default:系统用户;comment:用户昵称" `
+	HeaderImg   string       `json:"headerImg" gorm:"default:http://qmplusimg.henrongyi.top/head.png;comment:用户头像"`
+	Authority   SysAuthority `json:"authority" gorm:"foreignKey:AuthorityId;references:AuthorityId;comment:用户角色"`
+	AuthorityId string       `json:"authorityId" gorm:"default:888;comment:用户角色ID"`
 }

+ 10 - 10
server/model/sys_workflow.go

@@ -7,19 +7,19 @@ import (
 // 工作流属性表
 type SysWorkflow struct {
 	gorm.Model
-	WorkflowNickName    string                `json:"workflowNickName" gorm:"comment:'工作流中文名称'"`  // 工作流名称
-	WorkflowName        string                `json:"workflowName" gorm:"comment:'工作流英文名称'"`      // 工作流英文id
-	WorkflowDescription string                `json:"workflowDescription" gorm:"comment:'工作流描述'"` // 工作流描述
-	WorkflowStepInfo    []SysWorkflowStepInfo `json:"workflowStep" gorm:"comment:'工作流步骤'"`        // 工作流步骤
+	WorkflowNickName    string                `json:"workflowNickName" gorm:"comment:工作流中文名称"`  // 工作流名称
+	WorkflowName        string                `json:"workflowName" gorm:"comment:工作流英文名称"`      // 工作流英文id
+	WorkflowDescription string                `json:"workflowDescription" gorm:"comment:工作流描述"` // 工作流描述
+	WorkflowStepInfo    []SysWorkflowStepInfo `json:"workflowStep" gorm:"comment:工作流步骤"`        // 工作流步骤
 }
 
 // 工作流状态表
 type SysWorkflowStepInfo struct {
 	gorm.Model
-	SysWorkflowID   uint    `json:"workflowID" gorm:"comment:'所属工作流ID'"`      // 所属工作流ID
-	IsStrat         bool    `json:"isStrat" gorm:"comment:'是否是开始流节点'"`        // 是否是开始流节点
-	StepName        string  `json:"stepName" gorm:"comment:'工作流节点名称'"`        // 工作流名称
-	StepNo          float64 `json:"stepNo" gorm:"comment:'步骤id (第几步)'"`       // 步骤id (第几步)
-	StepAuthorityID string  `json:"stepAuthorityID" gorm:"comment:'操作者级别id'"` // 操作者级别id
-	IsEnd           bool    `json:"isEnd" gorm:"comment:'是否是完结流节点'"`          // 是否是完结流节点
+	SysWorkflowID   uint    `json:"workflowID" gorm:"comment:所属工作流ID"`      // 所属工作流ID
+	IsStart         bool    `json:"isStart" gorm:"comment:是否是开始流节点"`        // 是否是开始流节点
+	StepName        string  `json:"stepName" gorm:"comment:工作流节点名称"`        // 工作流名称
+	StepNo          float64 `json:"stepNo" gorm:"comment:步骤id (第几步)"`       // 步骤id (第几步)
+	StepAuthorityID string  `json:"stepAuthorityID" gorm:"comment:操作者级别id"` // 操作者级别id
+	IsEnd           bool    `json:"isEnd" gorm:"comment:是否是完结流节点"`          // 是否是完结流节点
 }

+ 6 - 6
server/model/sys_workflow_process.go

@@ -5,10 +5,10 @@ import "gorm.io/gorm"
 // 工作流流转表
 type SysWorkFlowProcess struct {
 	gorm.Model
-	ApplicationID  uint   `json:"applicationID" gorm:"comment:'当前工作流所属申请的ID'"` // 当前工作流所属申请的ID
-	CurrentNode    string `json:"currentNode" gorm:"comment:'当前进度节点'"`         // 当前进度节点
-	HistoricalNode string `json:"historicalNode" gorm:"comment:'上一个进度节点'"`     // 上一个进度节点
-	CurrentUser    string `json:"currentUser" gorm:"comment:'当前进度操作人'"`        // 当前进度操作人
-	HistoricalUser string `json:"historicalUser" gorm:"comment:'上一个进度的操作人'"`   // 上一个进度的操作人
-	State          bool   `json:"state" gorm:"comment:'状态 是否是正在进行的状态'"`        // 状态 是否是正在进行的状态
+	ApplicationID  uint   `json:"applicationID" gorm:"comment:当前工作流所属申请的ID"` // 当前工作流所属申请的ID
+	CurrentNode    string `json:"currentNode" gorm:"comment:当前进度节点"`         // 当前进度节点
+	HistoricalNode string `json:"historicalNode" gorm:"comment:上一个进度节点"`     // 上一个进度节点
+	CurrentUser    string `json:"currentUser" gorm:"comment:当前进度操作人"`        // 当前进度操作人
+	HistoricalUser string `json:"historicalUser" gorm:"comment:上一个进度的操作人"`   // 上一个进度的操作人
+	State          bool   `json:"state" gorm:"comment:是否是正在进行的状态"`           // 状态 是否是正在进行的状态
 }

+ 2 - 2
server/resource/template/te/model.go.tpl

@@ -9,9 +9,9 @@ import (
 type {{.StructName}} struct {
       gorm.Model {{- range .Fields}}
             {{- if eq .FieldType "bool" }}
-      {{.FieldName}}  *{{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" gorm:"column:{{.ColumnName}};comment:'{{.Comment}}'{{- if .DataType -}};type:{{.DataType}}{{- if .DataTypeLong -}}({{.DataTypeLong}}){{- end -}};{{- if .DataTypeLong -}}size:{{.DataTypeLong}};{{- end -}}{{- end -}}"`
+      {{.FieldName}}  *{{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" gorm:"column:{{.ColumnName}};comment:{{.Comment}}{{- if .DataType -}};type:{{.DataType}}{{- if .DataTypeLong -}}({{.DataTypeLong}}){{- end -}};{{- if .DataTypeLong -}}size:{{.DataTypeLong}};{{- end -}}{{- end -}}"`
             {{- else }}
-      {{.FieldName}}  {{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" gorm:"column:{{.ColumnName}};comment:'{{.Comment}}'{{- if .DataType -}};type:{{.DataType}}{{- if .DataTypeLong -}}({{.DataTypeLong}}){{- end -}};{{- if .DataTypeLong -}}size:{{.DataTypeLong}};{{- end -}}{{- end -}}"`
+      {{.FieldName}}  {{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" gorm:"column:{{.ColumnName}};comment:{{.Comment}}{{- if .DataType -}};type:{{.DataType}}{{- if .DataTypeLong -}}({{.DataTypeLong}}){{- end -}};{{- if .DataTypeLong -}}size:{{.DataTypeLong}};{{- end -}}{{- end -}}"`
             {{- end }}  {{- end }} 
 }