1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- namespace Studio.Scripts.HttpMessage
- {
- public class UpdateRoomMessage : BaseHttpMessage
- {
- public UpdateRoomBody body;
- public string token
- {
- set
- {
- headers["token"] = value;
- }
- }
- public UpdateRoomMessage()
- {
- messageModuleType = MessageModuleType.Room;
- methodType = HttpMethodType.Post;
- _path = "v1/updateRoom";
- headers = new Dictionary<string, string>();
- headers.Add("Content-Type", "application/json");
- headers.Add("token", "");
- _wwwForm = null;
- }
- public override WWWForm wwwForm
- {
- get
- {
- if (_wwwForm == null)
- {
- _wwwForm = GetWWWFrom<UpdateRoomBody>(body);
- }
- return _wwwForm;
- }
- }
- public override string ToBodyString()
- {
- return Newtonsoft.Json.JsonConvert.SerializeObject(body);
- }
- }
- public struct UpdateRoomBody
- {
- /// <summary>
- /// 房间ID
- /// </summary>
- public int roomID;
- /// <summary>
- /// 房间类型 1 是个人房间 2是公共房间
- /// </summary>
- public int type;
- /// <summary>
- /// 房间名称
- /// </summary>
- public string roomName;
- /// <summary>
- /// 房间信息说明
- /// </summary>
- public string roomExplain;
- /// <summary>
- /// 房间密码
- /// </summary>
- public string roomPassword;
- /// <summary>
- /// 人数上限
- /// </summary>
- public int maxMember;
- /// <summary>
- /// 公开房间类型 1 是只能浏览 2是 全功能
- /// </summary>
- public int roomType;
- }
- }
|