using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using ServerCore; using ServerBase; namespace ServerCommon.BusinessLogDomain; public class BuildingLogInfo : ILogInvoker.IInfo { [JsonProperty] public int BuildingMetaId { get; set; } [JsonProperty] public string OwnerGuid { get; set; } = string.Empty; [JsonProperty] public CurrencyType RentalCurrencyType { get; set; } = CurrencyType.None; [JsonProperty] public double RentalCurrencyAmount { get; set; } = 0; [JsonProperty] public bool IsRentalOpen { get; set; } = false; public BuildingLogInfo() : base() { } public BuildingLogInfo(ILogInvoker parent, BuildingLogInfo logParam) : base(parent) { if (null != logParam) { setBuildingInfo(logParam); } } public void setBuildingInfo(BuildingLogInfo logInfo) { BuildingMetaId = logInfo.BuildingMetaId; OwnerGuid = logInfo.OwnerGuid; RentalCurrencyType = logInfo.RentalCurrencyType; RentalCurrencyAmount = logInfo.RentalCurrencyAmount; IsRentalOpen = logInfo.IsRentalOpen; } public void setLogProperty(int buildingMetaId, string ownerGuid, CurrencyType currencyType, double currencyAmount, bool isRentalOpen) { BuildingMetaId = buildingMetaId; OwnerGuid = ownerGuid; RentalCurrencyType = currencyType; RentalCurrencyAmount = currencyAmount; IsRentalOpen = isRentalOpen; } }