package sop_task

import (
	"context"
	"github.com/suyuan32/simple-admin-common/msg/errormsg"
	"wechat-api/internal/svc"
	"wechat-api/internal/types"

	"github.com/zeromicro/go-zero/core/logx"
)

type GetSopMessageVarLogic struct {
	logx.Logger
	ctx    context.Context
	svcCtx *svc.ServiceContext
}

func NewGetSopMessageVarLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetSopMessageVarLogic {
	return &GetSopMessageVarLogic{
		Logger: logx.WithContext(ctx),
		ctx:    ctx,
		svcCtx: svcCtx}
}

func (l *GetSopMessageVarLogic) GetSopMessageVar() (resp *types.MessageVarResp, err error) {
	resp = &types.MessageVarResp{}
	resp.Msg = errormsg.Success
	resp.Data.MessageVar = []types.MessageVarInfo{
		{
			Label: "昵称",
			Value: "nickname",
		},
		{
			Label: "姓名",
			Value: "cname",
		},
		{
			Label: "称呼",
			Value: "ctitle",
		},
		{
			Label: "身份证号",
			Value: "cidcard_no",
		},
		{
			Label: "地区",
			Value: "carea",
		},
		{
			Label: "籍贯",
			Value: "cbirtharea",
		},
		{
			Label: "出生日期",
			Value: "cbirthday",
		},
		{
			Label: "性别",
			Value: "sex",
		},
		{
			Label: "年龄",
			Value: "cage",
		},
	}
	resp.Data.ForwardVar = []types.MessageVarInfo{
		{
			Label: "昵称",
			Value: "nickname",
		},
		{
			Label: "姓名",
			Value: "cname",
		},
		{
			Label: "称呼",
			Value: "ctitle",
		},
		{
			Label: "身份证号",
			Value: "cidcard_no",
		},
		{
			Label: "地区",
			Value: "carea",
		},
		{
			Label: "籍贯",
			Value: "cbirtharea",
		},
		{
			Label: "出生日期",
			Value: "cbirthday",
		},
		{
			Label: "性别",
			Value: "sex",
		},
		{
			Label: "年龄",
			Value: "cage",
		},
	}

	return resp, nil
}
