micro-bundle/internal/model/questionnaire_survey.go
2026-03-11 19:31:13 +08:00

75 lines
5.2 KiB
Go

package model
import (
"time"
"gorm.io/gorm"
)
type QuestionnaireSurvey struct {
gorm.Model
SurveyUUID string `gorm:"column:survey_uuid;comment:问卷UUID" json:"survey_uuid"`
UserId int `gorm:"column:user_id;comment:用户ID" json:"user_id"`
UserNum string `gorm:"column:user_num;comment:用户编号" json:"user_num"`
UserName string `gorm:"column:user_name;comment:用户姓名" json:"user_name"`
UserTel string `gorm:"column:user_tel;comment:用户电话" json:"user_tel"`
OrderUUID string `gorm:"column:order_uuid;comment:订单UUID" json:"order_uuid"`
SendTime time.Time `gorm:"column:send_time;comment:发送时间" json:"send_time"`
SubmitTime time.Time `gorm:"column:submit_time;comment:提交时间" json:"submit_time"`
SurveyTitle string `gorm:"column:survey_title;comment:问卷标题" json:"survey_title"`
SurveyStatus int `gorm:"column:survey_status;comment:问卷状态 1:已发送 2:已提交" json:"survey_status"`
BundleInfo string `gorm:"column:bundle_info;type:varchar(1024);comment:套餐信息" json:"bundle_info"`
SurveyAnswer string `gorm:"column:survey_answer;type:varchar(512);comment:问卷答案" json:"survey_answer"`
MeritsReview string `gorm:"column:merits_review;type:varchar(512);comment:优点评价" json:"merits_review"`
SuggestionsorImprovements string `gorm:"column:suggestionsor_improvements;type:varchar(512);comment:改进建议" json:"suggestionsor_improvements"`
AdditionalComments string `gorm:"column:additional_comments;type:varchar(512);comment:补充意见" json:"additional_comments"`
SurveyUrl string `gorm:"column:survey_url;comment:问卷URL" json:"survey_url"`
SubmitBy string `gorm:"column:submit_by;comment:提交人" json:"submit_by"`
}
func (QuestionnaireSurvey) TableName() string {
return "questionnaire_survey"
}
type BundleInfo struct {
BundleName string `gorm:"column:bundle_name;not null;comment:套餐名称" json:"bundle_name"`
StartAt time.Time `gorm:"column:start_at;type:datetime;comment:套餐开始时间"`
ExpiredAt time.Time `gorm:"column:expired_at;type:datetime;comment:套餐过期时间"`
BundleAccountNumber int `gorm:"column:bundle_account_number;not null;comment:套餐账号数量" json:"bundle_account_number"`
BundleVideoNumber int `gorm:"column:bundle_video_number;not null;comment:套餐视频数量" json:"bundle_video_number"`
IncreaseVideoNumber int `gorm:"column:increase_video_number;not null;comment:增值视频数量" json:"increase_video_number"`
BundleImageNumber int `gorm:"column:bundle_image_number;not null;comment:套餐图片数量" json:"bundle_image_number"`
BundleDataNumber int `gorm:"column:bundle_data_number;not null;comment:套餐数据数量" json:"bundle_data_number"`
BundleCompetitiveNumber int `gorm:"column:bundle_competitive_number;not null;comment:套餐竞品数量" json:"bundle_competitive_number"`
}
type SurveyAnswer struct {
BundleAccountScore int32 `gorm:"column:bundle_account_score;not null;comment:套餐账号评分" json:"bundle_account_score"`
BundleVideoScore int32 `gorm:"column:bundle_video_score;not null;comment:套餐视频评分" json:"bundle_video_score"`
IncreaseVideoScore int32 `gorm:"column:increase_video_score;not null;comment:增值视频评分" json:"increase_video_score"`
BundleImageScore int32 `gorm:"column:bundle_image_score;not null;comment:套餐图片评分" json:"bundle_image_score"`
BundleDataScore int32 `gorm:"column:bundle_data_score;not null;comment:套餐数据评分" json:"bundle_data_score"`
BundleCompetitiveScore int32 `gorm:"column:bundle_competitive_score;not null;comment:套餐竞品评分" json:"bundle_competitive_score"`
ServiceResponseSpeed int32 `gorm:"column:service_response_speed;not null;comment:服务响应速度评分" json:"service_response_speed"`
ServiceStaffProfessionalism int32 `gorm:"column:service_staff_professionalism;not null;comment:服务人员专业性评分" json:"service_staff_professionalism"`
}
type UserInfo struct {
UserId int `gorm:"column:user_id;not null;comment:用户ID" json:"user_id"`
UserNum string `gorm:"column:user_num;not null;comment:用户编号" json:"user_num"`
UserName string `gorm:"column:user_name;not null;comment:用户姓名" json:"user_name"`
UserTel string `gorm:"column:user_tel;not null;comment:用户电话" json:"user_tel"`
}
type DbBundleInfo struct {
BundleName string `json:"bundle_name"`
StartAt string `json:"start_at"`
ExpiredAt string `json:"expired_at"`
BundleAccountNumber int32 `json:"bundle_account_number"`
BundleVideoNumber int32 `json:"bundle_video_number"`
IncreaseVideoNumber int32 `json:"increase_video_number"`
BundleImageNumber int32 `json:"bundle_image_number"`
BundleDataNumber int32 `json:"bundle_data_number"`
BundleCompetitiveNumber int32 `json:"bundle_competitive_number"`
}