• haoyanbin's avatar
    1 · c65e78f1
    haoyanbin authored
    c65e78f1
org_news.go 1.32 KB
package dto

import (
	oModels "go-admin/app/operate/models"
	"go-admin/common/dto"
)

type OrgNewsGetPageReq struct {
	dto.Pagination `search:"-"`
}

type OrgNewsGetPageReply struct {
	OrgAd   []oModels.OrgAd `json:"orgAd"`
	OrgNews []OrgNews       `json:"orgNews"`
}

type OrgNews struct {
	Id           int    `json:"id"`
	NewsImg      string `json:"newsImg"`
	NewsTitle    string `json:"newsTitle"`
	NewsContent  string `json:"newsContent"`
	CreatedAt    string `json:"createdAt"`
	CommentCount string `json:"commentCount"`
}

type OrgNewsComment struct {
	Id           int    `json:"id"`
	NewsId       string `json:"newsId"`
	PlayerId     string `json:"playerId"`
	PlayerUserId string `json:"playerUserId"`
	Comment      string `json:"comment"`
	Likes        string `json:"likes"`
	CreatedAt    string `json:"createdAt"`
}

func (m *OrgNewsGetPageReq) GetNeedSearch() interface{} {
	return *m
}

// OrgNewsGetReq 功能获取请求参数
type OrgNewsGetReq struct {
	Id int `uri:"id"`
}

type OrgNewsGetReply struct {
	OrgNews     OrgNews          `json:"orgNews"`
	CommentList []OrgNewsComment `json:"commentList"`
}

func (s *OrgNewsGetReq) GetId() interface{} {
	return s.Id
}

// OrgNewsDeleteReq 功能删除请求参数
type OrgNewsDeleteReq struct {
	Ids []int `json:"ids"`
}

func (s *OrgNewsDeleteReq) GetId() interface{} {
	return s.Ids
}