using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UniRx;

public class LogisticsSafeguards
{
    public List<LogisticsSafeguard> Safeguards;
}

public class LogisticsSafeguard
{
    public string Id { get; set; }
    /// <summary>
    /// 单位名称
    /// </summary>
    public string UnitName { get; set; }
    /// <summary>
    /// 单位地址
    /// </summary>
    public string Address { get; set; }
    /// <summary>
    /// 法人
    /// </summary>
    public string JuridicalPerson { get; set; }
    /// <summary>
    /// 电话
    /// </summary>
    public string Phone { get; set; }
    /// <summary>
    /// 技术人员数
    /// </summary>
    public string PersonCount { get; set; }
    /// <summary>
    /// 紧急运输车辆数
    /// </summary>
    public string TruckCount { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }
    /// <summary>
    /// 保障品名
    /// </summary>
    public string SecurityGoods { get; set; }
    /// <summary>
    /// 保障能力
    /// </summary>
    public string SupportCapability { get; set; }
    /// <summary>
    /// 库存量
    /// </summary>
    public string Inventory { get; set; }
}


public class LogisticsSafeguardReactive
{
    private LogisticsSafeguard Data = new LogisticsSafeguard();

    public ReactiveProperty<string> Id { get; set; } = new ReactiveProperty<string>();
    /// <summary>
    /// 单位名称
    /// </summary>
    public ReactiveProperty<string> UnitName { get; set; } = new ReactiveProperty<string>();
    /// <summary>
    /// 单位地址
    /// </summary>
    public ReactiveProperty<string> Address { get; set; } = new ReactiveProperty<string>();
    /// <summary>
    /// 法人
    /// </summary>
    public ReactiveProperty<string> JuridicalPerson { get; set; } = new ReactiveProperty<string>();
    /// <summary>
    /// 电话
    /// </summary>
    public ReactiveProperty<string> Phone { get; set; } = new ReactiveProperty<string>();
    /// <summary>
    /// 技术人员数
    /// </summary>
    public ReactiveProperty<string> PersonCount { get; set; } = new ReactiveProperty<string>();
    /// <summary>
    /// 紧急运输车辆数
    /// </summary>
    public ReactiveProperty<string> TruckCount { get; set; } = new ReactiveProperty<string>();
    /// <summary>
    /// 备注
    /// </summary>
    public ReactiveProperty<string> Remark { get; set; } = new ReactiveProperty<string>();
    /// <summary>
    /// 保障品名
    /// </summary>
    public ReactiveProperty<string> SecurityGoods { get; set; } = new ReactiveProperty<string>();
    /// <summary>
    /// 保障能力
    /// </summary>
    public ReactiveProperty<string> SupportCapability { get; set; } = new ReactiveProperty<string>();
    /// <summary>
    /// 库存量
    /// </summary>
    public ReactiveProperty<string> Inventory { get; set; } = new ReactiveProperty<string>();

    public LogisticsSafeguardReactive()
    {
        Id.Subscribe(value => Data.Id = value);
        UnitName.Subscribe(value => Data.UnitName = value);
        Address.Subscribe(value => Data.Address = value);
        JuridicalPerson.Subscribe(value => Data.JuridicalPerson = value);
        Phone.Subscribe(value => Data.Phone = value);
        PersonCount.Subscribe(value => Data.PersonCount = value);
        TruckCount.Subscribe(value => Data.TruckCount = value);
        Remark.Subscribe(value => Data.Remark = value);
        SecurityGoods.Subscribe(value => Data.SecurityGoods = value);
        SupportCapability.Subscribe(value => Data.SupportCapability = value);
        Inventory.Subscribe(value => Data.Inventory = value);
    }

    public LogisticsSafeguard GetData()
    {
        return Data;
    }
}