package core

import (
	"context"

	"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
	"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"

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

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

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

func (l *GetScreenInfoLogic) GetScreenInfo() (resp *types.ScreenInfoResp, err error) {
	resp = &types.ScreenInfoResp{}
	l.svcCtx.DbEngin.Raw("select * from screen").Scan(resp)
	return
}
