//------------------------------------------------------------------------------
// <auto-generated>
//     This code was auto-generated by ExcelExporter
//     version 2.0
//     from https://github.com/xuzhuoxi/ExcelExporter 
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using UnityEngine;

namespace JLGames.RocketDriver.Samples.RpgMaterialDemo.Cfg.CfgTitle
{
    /**
     * @author {AUTHOR}
     * Created on {NowTimeStr} .
     * client 1 c#
     */
    [Serializable]
    public class CfgGiftbagDetail
    {
        // 以下为属性声明
        // ID
        [SerializeField] private ushort id;
        // 类型
        [SerializeField] private byte type;
        // 允许最大批量数量
        [SerializeField] private ushort batch;
        // 固定材料
        [SerializeField] private string numFixed;
        // 独立数量随机材料
        [SerializeField] private string numRand;
        // 独立权重随机材料
        [SerializeField] private string weightRand;
        // 均权组合随机材料
        [SerializeField] private string groupRand;
        // 带权组合随机材料
        [SerializeField] private string groupWeightRand;

        // 以下为Get方法
        /**
         * ID
         *
         * @remark 分组ID
         * @return ushort
         */
        public ushort Id => id;
        /**
         * 类型
         *
         * @remark 类型
         * @return byte
         */
        public byte Type => type;
        /**
         * 允许最大批量数量
         *
         * @remark 允许最大批量数量
         * @return ushort
         */
        public ushort Batch => batch;
        /**
         * 固定材料
         *
         * @remark 格式：多个使用&连接
类型:id:数量
         * @return string
         */
        public string NumFixed => numFixed;
        /**
         * 独立数量随机材料
         *
         * @remark 格式：多个使用&连接
类型:id:最小数量:最大数量
         * @return string
         */
        public string NumRand => numRand;
        /**
         * 独立权重随机材料
         *
         * @remark 格式：多个使用&连接
类型:id:数量:万权值
         * @return string
         */
        public string WeightRand => weightRand;
        /**
         * 均权组合随机材料
         *
         * @remark 格式：多组使用&连接，同组使用|连接
类型:id:数量
         * @return string
         */
        public string GroupRand => groupRand;
        /**
         * 带权组合随机材料
         *
         * @remark 格式：多组使用&连接，同组使用|连接
类型:id:数量:权值
         * @return string
         */
        public string GroupWeightRand => groupWeightRand;
        // 以下为解释数据方法

        // Json数据解释
        public void ParseJson(string data)
        {
            JsonUtility.FromJsonOverwrite(data, this);
        }

        // 二进制数据解释
//		public void ParseBinary(proxy: xu.BinaryReaderProxy)
//		{   
            //this.id = proxy.();
            //this.type = proxy.();
            //this.batch = proxy.();
            //this.numFixed = proxy.();
            //this.numRand = proxy.();
            //this.weightRand = proxy.();
            //this.groupRand = proxy.();
            //this.groupWeightRand = proxy.();
//		}

        // 静态实例化
        public static CfgGiftbagDetail FromJson(string data)
        {
            return JsonUtility.FromJson<CfgGiftbagDetail>(data);
        }
    }
}