/*
 * 所有消息头和消息体
 * */
//请求消息
function msg(msgHead,msgBody)
{
 this.msgHead=msgHead;	
 this.msgBody=msgBody;
}
//消息头
function msgHead(fromType,fromID,toType,toID,
		msgType, modelId, cmdCode, sysNumber,
		sequense, errorCode,userSequense)
{
  this.fromType=fromType;
  this.fromID=fromID;
  this.toType=toType;
  this.toID=toID;
  this.msgType=msgType;
  this.modelId=modelId;
  this.cmdCode=cmdCode;
  this.sysNumber=sysNumber;
  this.sequense=sequense;
  this.errorCode=errorCode;
  this.userSequense=userSequense;
}

//节点请求消息体 100
function requestNodeBody(nodeId)
{
	this.nodeId=nodeId;
}

//聊天请求消息体 1001
function requestChatBody(content)
{
  this.content=content;	
}

//轮巡消息体 3006
function requestCycleBody()
{
	this.cycle="cycle";
	this.errorCode=0;
}

//登陆消息体 200
function requestLoginBody(userName,password,isCompelLogin)
{
	this.name=userName;
	this.passward=password;
	this.isCompelLogin = isCompelLogin;
}
//登出消息 201
function requestLogoutBody(userId,nodeId)
{
	this.userId=userId;
	this.nodeId=nodeId;
}
//3.1.13	MOD 200  CMD 204  用户注册
function requestOfUserRegister(userName,passwords,sex,imageId,realName,email,identity,identityType,question,answer,telephone,address,birthday,memo)
{
  	this.userDetailedInfo = {
  			userId : 0,
  			userName : userName,
  			sex : sex,
  			imageId : imageId,
  			point : 0,
  			userClass : 0,
  			realName: realName,
  			email: email,
  			identity : identity,
  			identityType : identityType,
  			passwords : passwords,
  			registerTime : 0,
  			registerType : 2,
  			question :question,
  			answer: answer,
  			telephone : telephone,
  			address : address,
  			birthday: birthday,
  			memo : memo
  	};
}
