//------------------------------------------------------------------------------
// <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 CfgMaterialItem
    {
        // 以下为属性声明
        // ID
        [SerializeField] private uint id;
        // 材料名
        [SerializeField] private string name;
        // 材料类型
        [SerializeField] private byte type;
        // 范围
        [SerializeField] private uint[] limit;
        // 价值
        [SerializeField] private ushort worth;
        // 稀有度
        [SerializeField] private byte quality;
        // 图标Id
        [SerializeField] private uint iconId;
        // 排序权重
        [SerializeField] private ushort weight;
        // 有效开始时间
        [SerializeField] private string start;
        // 有效结束时间
        [SerializeField] private string end;
        // 有效时间
        [SerializeField] private string duration;
        // 操作码位
        [SerializeField] private byte operMark;
        // 描述
        [SerializeField] private string desc;

        // 以下为Get方法
        /**
         * ID
         *
         * @remark Id
         * @return uint
         */
        public uint Id => id;
        /**
         * 材料名
         *
         * @remark 填入游戏材料内容的命名
         * @return string
         */
        public string Name => name;
        /**
         * 材料类型
         *
         * @remark 填入sheet表对应的序号
         * @return byte
         */
        public byte Type => type;
        /**
         * 范围
         *
         * @remark 该材料在游戏中允许的最低下限和最大上限
         * @return uint[]
         */
        public uint[] Limit => limit;
        /**
         * 价值
         *
         * @remark 材料内容的等价参数
         * @return ushort
         */
        public ushort Worth => worth;
        /**
         * 稀有度
         *
         * @remark 白绿蓝紫橙
1 2 3 4 5
         * @return byte
         */
        public byte Quality => quality;
        /**
         * 图标Id
         *
         * @remark 图标Id
0：代表与id相同
         * @return uint
         */
        public uint IconId => iconId;
        /**
         * 排序权重
         *
         * @remark 填入道具显示的排序
         * @return ushort
         */
        public ushort Weight => weight;
        /**
         * 有效开始时间
         *
         * @remark 填入有效开始时间
没则留空
         * @return string
         */
        public string Start => start;
        /**
         * 有效结束时间
         *
         * @remark 填入有效结束时间
没则留空
         * @return string
         */
        public string End => end;
        /**
         * 有效时间
         *
         * @remark 填入有效时长
没则留空
         * @return string
         */
        public string Duration => duration;
        /**
         * 操作码位
         *
         * @remark 0.不可丢弃
1.可丢弃
         * @return byte
         */
        public byte OperMark => operMark;
        /**
         * 描述
         *
         * @remark 描述
         * @return string
         */
        public string Desc => desc;
        // 以下为解释数据方法

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

        // 二进制数据解释
//		public void ParseBinary(proxy: xu.BinaryReaderProxy)
//		{   
            //this.id = proxy.();
            //this.name = proxy.();
            //this.type = proxy.();
            //this.limit = proxy.();
            //this.worth = proxy.();
            //this.quality = proxy.();
            //this.iconId = proxy.();
            //this.weight = proxy.();
            //this.start = proxy.();
            //this.end = proxy.();
            //this.duration = proxy.();
            //this.operMark = proxy.();
            //this.desc = proxy.();
//		}

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