InteractMessageModel.ets 2.48 KB

/**
 * WDMessageCenterMessageType 拉取消息类型
 */
export const enum WDMessageCenterMessageType {
  WDMessageCenterMessageType_Interact = 1,  //互动通知
  WDMessageCenterMessageType_Subscribe = 2,     //预约消息
  WDMessageCenterMessageType_System, //系统消息
}


export interface  InteractMessageListModel{
  data: InteractMessageMItem
  code: number
  message: string
  success: string
  timestamp: number
}


export class  InteractMessageMItem{
  pageNum:number = 0
  pageSize:number = 0
  totalCount:number = 0
  hasNext:number = 0
  list:InteractMessageModel[] = []

  constructor(list?:InteractMessageModel[],pageNum?: number,pageSize?: number,totalCount?: number,hasNext?:number) {
  }
}

export class InteractMessageModel {
  classify: string = '';
  contentId: string = '';
  contentType: string = '';
  id: number = 0;
  message: string = '';
  platform: string = '';
  privateMailId: number = 0;
  privateMailIdList: number[] = [];
  privateMailIds: string = '';
  privateMailNum: number = 0;
  read: boolean = true;
  source: string = '';
  time: string = '';
  title: string = '';
  userId: string = '';
  remark: string = '';
  InteractMsubM:InteractMsubModel = new InteractMsubModel;
}

export class InteractMsubModel {
  beReply: string = '';
  headUrl: string = '';
  contentId: string = '';
  contentRelObjectid: string = '';
  contentTitle: string = '';
  commentContent: string = '';
  userName: string = '';
  userId: string = '';
  contentRelId: string = '';
  shareUrl: string = '';
  userType: string = '';
  contentRelType: string = '';
  visitor: string = '';
  contentType: string = '';
}

export interface InteractMParams {
  contentType?: string;
  pageNum?: string;
  pageSize?: string;
  userId?: string;
  createTime?: string;
}

export interface InteractMDTO{
  success: boolean;
  code: number;
  message: string;
  data: number;
  timestamp?: number;
}

@Observed
export class SubscribeMessageModel{
  dealTime:string = ""
  title:string = ""
  imgUrl:string = ""
  desc:string = ""
  time:string = ""
  contentId:string = ""
  contentType:string = ""
  relId :string = ""
  relType:string = ""

  constructor(dealTime: string, title: string, imgUrl: string, desc: string , time: string, contentId: string) {
    this.dealTime = dealTime
    this.title = title
    this.imgUrl = imgUrl
    this.desc = desc
    this.time = time
    this.contentId = contentId
  }
}

export class Remark{
  relationType:string = ""
  coverImageUrl:string = ""
  relationId:string = ""
  status:string = ""
}