初始化
This commit is contained in:
15
CommonEntity/CacheEntity/Carbon_Cache.cs
Normal file
15
CommonEntity/CacheEntity/Carbon_Cache.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MemoryPack;
|
||||
|
||||
namespace CommonEntity.CacheEntity
|
||||
{
|
||||
[MemoryPackable]
|
||||
public partial class Carbon_Cache
|
||||
{
|
||||
public int CarbonVIP_Status { get; set; }
|
||||
}
|
||||
}
|
||||
70
CommonEntity/CacheEntity/KongTiao_Cache.cs
Normal file
70
CommonEntity/CacheEntity/KongTiao_Cache.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MemoryPack;
|
||||
|
||||
namespace CommonEntity.CacheEntity
|
||||
{
|
||||
[MemoryPackable()]
|
||||
public partial class KongTiao_Cache
|
||||
{
|
||||
/// <summary>
|
||||
/// 状态:1开,2关
|
||||
/// </summary>
|
||||
public virtual int Status
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 当前温度
|
||||
/// </summary>
|
||||
public virtual int CurrentTemp
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 设定温度
|
||||
/// </summary>
|
||||
public virtual int SettingTemp
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 风速
|
||||
/// </summary>
|
||||
public virtual int FanSpeed
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 模式
|
||||
/// </summary>
|
||||
public virtual int Mode
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 阀门
|
||||
/// </summary>
|
||||
public virtual int Valve
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 当天开启时长
|
||||
/// </summary>
|
||||
public virtual int Time
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
30
CommonEntity/CacheEntity/MyData_Cache.cs
Normal file
30
CommonEntity/CacheEntity/MyData_Cache.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MemoryPack;
|
||||
|
||||
namespace CommonEntity.CacheEntity
|
||||
{
|
||||
[MemoryPackable()]
|
||||
public partial class MyData_Cache
|
||||
{
|
||||
public long HotelCode { get; set; }
|
||||
public string? HostNumber { get; set; }
|
||||
public string? RoomNumber { get; set; }
|
||||
public string? Mac { get; set; }
|
||||
public string? EndPoint { get; set; }
|
||||
public string? Version { get; set; }
|
||||
public bool IsTakeCard { get; set; }
|
||||
public Carbon_Cache? TanDaRen { get; set; } = new Carbon_Cache();
|
||||
|
||||
public PMS_RoomStatus? PMS_RoomStatus { get; set; } = new PMS_RoomStatus();
|
||||
public TakeCard_Cache? TakeCardInfo { get; set; } = new TakeCard_Cache();
|
||||
|
||||
public List<NormalDevice_Cache>? Device_Cache_List { get; set; } = new List<NormalDevice_Cache>();
|
||||
|
||||
public List<KongTiao_Cache>? KongTiaoInfo_List { get; set; } = new List<KongTiao_Cache>();
|
||||
|
||||
}
|
||||
}
|
||||
23
CommonEntity/CacheEntity/NengHao_Cache.cs
Normal file
23
CommonEntity/CacheEntity/NengHao_Cache.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MemoryPack;
|
||||
|
||||
namespace CommonEntity.CacheEntity
|
||||
{
|
||||
[MemoryPackable()]
|
||||
public partial class NengHao_Cache
|
||||
{
|
||||
public double V { get; set; }
|
||||
public double A { get; set; }
|
||||
public double P { get; set; }
|
||||
public double KW_H { get; set; }
|
||||
public double Sum_KW_H { get; set; }
|
||||
|
||||
public long CreateTime { get; set; }
|
||||
|
||||
public DateTime ReportTime { get; set; }
|
||||
}
|
||||
}
|
||||
45
CommonEntity/CacheEntity/NormalDevice_Cache.cs
Normal file
45
CommonEntity/CacheEntity/NormalDevice_Cache.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MemoryPack;
|
||||
|
||||
namespace CommonEntity.CacheEntity
|
||||
{
|
||||
[MemoryPackable()]
|
||||
public partial class NormalDevice_Cache
|
||||
{
|
||||
/// <summary>
|
||||
/// HostID
|
||||
/// </summary>
|
||||
public virtual int HostID
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 状态:1开,2关
|
||||
/// </summary>
|
||||
public virtual int Status
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 亮度
|
||||
/// </summary>
|
||||
public virtual int Brightness
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public virtual DateTime? UpdateTime
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
16
CommonEntity/CacheEntity/PMS_RoomStatus.cs
Normal file
16
CommonEntity/CacheEntity/PMS_RoomStatus.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MemoryPack;
|
||||
|
||||
namespace CommonEntity.CacheEntity
|
||||
{
|
||||
|
||||
[MemoryPackable()]
|
||||
public partial class PMS_RoomStatus
|
||||
{
|
||||
public byte PMSStatus { get; set; }
|
||||
}
|
||||
}
|
||||
19
CommonEntity/CacheEntity/TakeCard_Cache.cs
Normal file
19
CommonEntity/CacheEntity/TakeCard_Cache.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MemoryPack;
|
||||
|
||||
namespace CommonEntity.CacheEntity
|
||||
{
|
||||
[MemoryPackable()]
|
||||
public partial class TakeCard_Cache
|
||||
{
|
||||
public byte TakeCardStatus { get; set; }
|
||||
|
||||
public byte IdentityInfo { get; set; }
|
||||
|
||||
public byte NOCardInfo { get; set; }
|
||||
}
|
||||
}
|
||||
15
CommonEntity/CommonEntity.csproj
Normal file
15
CommonEntity/CommonEntity.csproj
Normal file
@@ -0,0 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MemoryPack" Version="1.21.4" />
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.Orleans.Sdk" Version="8.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
15
CommonEntity/ConstValue.cs
Normal file
15
CommonEntity/ConstValue.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CommonEntity
|
||||
{
|
||||
public class ConstValue
|
||||
{
|
||||
public static string OnLine = "online";
|
||||
public static string OffLine = "offline";
|
||||
public static string OnOffLineKey = "is_on_off_line";
|
||||
}
|
||||
}
|
||||
14
CommonEntity/DeviceCacheInfo.cs
Normal file
14
CommonEntity/DeviceCacheInfo.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CommonEntity
|
||||
{
|
||||
public class DeviceCacheInfo
|
||||
{
|
||||
public long ClientId { get; set; }
|
||||
public string? SecretKey { get; set; }
|
||||
}
|
||||
}
|
||||
13
CommonEntity/Grafana/XinTiao.cs
Normal file
13
CommonEntity/Grafana/XinTiao.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CommonEntity.Grafana
|
||||
{
|
||||
public class XinTiao
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
29
CommonEntity/KafkaKey.cs
Normal file
29
CommonEntity/KafkaKey.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CommonEntity
|
||||
{
|
||||
public class KafkaKey
|
||||
{
|
||||
/// <summary>
|
||||
/// 新版数据的Kafka主题
|
||||
/// </summary>
|
||||
public static string New_RCU_Data_Topic = "New_RCU_Data_Topic";
|
||||
|
||||
public static string UDPckageAllUDPDataKey = "UDPckageAllUDPDataKey";
|
||||
}
|
||||
public class GrainPrefix
|
||||
{
|
||||
public static string RCU_Grain_Prefix = "RCU_Grain_Prefix_";
|
||||
}
|
||||
public class RedisKey
|
||||
{
|
||||
/// <summary>
|
||||
/// IOT 平台 Redis发布 的主题
|
||||
/// </summary>
|
||||
public static string NewVersion_RCU_Data = "RCU/UDP/Data";
|
||||
}
|
||||
}
|
||||
23
CommonEntity/LoginData.cs
Normal file
23
CommonEntity/LoginData.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CommonEntity
|
||||
{
|
||||
public class LoginData
|
||||
{
|
||||
public string username { get; set; }
|
||||
public string password { get; set; }
|
||||
}
|
||||
public class ResLoginData
|
||||
{
|
||||
public string AccessToken { get; set; }
|
||||
public int Id { get; set; }
|
||||
public string? Permission { get; set; }
|
||||
public string? UserName { get; set; }
|
||||
public string? RealName { get; set; }
|
||||
public string? CompanyName { get; set; }
|
||||
}
|
||||
}
|
||||
38
CommonEntity/RCUEntity/RCU_UDPData.cs
Normal file
38
CommonEntity/RCUEntity/RCU_UDPData.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MessagePack;
|
||||
|
||||
namespace CommonEntity.RCUEntity
|
||||
{
|
||||
public class RCU_UDPData
|
||||
{
|
||||
public byte[]? hostnum { get; set; }
|
||||
public byte[]? endpoint { get; set; }
|
||||
public byte[]? data { get; set; }
|
||||
public long? currenttimestamp { get; set; }
|
||||
}
|
||||
|
||||
[MessagePackObject]
|
||||
[GenerateSerializer, Immutable]
|
||||
public class RCU_UDPData_With_String
|
||||
{
|
||||
[Key(0)]
|
||||
[Id(0)]
|
||||
public string? hostnum { get; set; }
|
||||
|
||||
[Key(1)]
|
||||
[Id(1)]
|
||||
public string? endpoint { get; set; }
|
||||
|
||||
[Key(2)]
|
||||
[Id(2)]
|
||||
public byte[]? data { get; set; }
|
||||
|
||||
[Key(3)]
|
||||
[Id(3)]
|
||||
public long? currenttimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
20
CommonEntity/ReturnInfo.cs
Normal file
20
CommonEntity/ReturnInfo.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CommonEntity
|
||||
{
|
||||
public class ReturnInfo
|
||||
{
|
||||
public bool isok { set; get; } // 是否成功,true成功
|
||||
public string message { set; get; } // 传递接口信息,or报错信息
|
||||
public int status { set; get; } // 服务器报错信息,正确为200,错误404/500等
|
||||
public object response { set; get; } // 获取到的信息本体,若报错则为null
|
||||
}
|
||||
public class ReturnData
|
||||
{
|
||||
public string Status { get; set; }
|
||||
}
|
||||
}
|
||||
76
CommonEntity/Root.cs
Normal file
76
CommonEntity/Root.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CommonEntity
|
||||
{
|
||||
public class Root
|
||||
{
|
||||
public List<DataItem> data { get; set; }
|
||||
}
|
||||
public class DataItem
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ExtendedLocation { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string OriginQuery { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string appinfo { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int disp_type { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string fetchkey { get; set; }
|
||||
/// <summary>
|
||||
/// 本地局域网
|
||||
/// </summary>
|
||||
public string location { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string origip { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string origipquery { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string resourceid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int role_id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int shareImage { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int showLikeShare { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string showlamp { get; set; }
|
||||
/// <summary>
|
||||
/// IP地址查询
|
||||
/// </summary>
|
||||
public string titlecont { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string tplt { get; set; }
|
||||
}
|
||||
}
|
||||
30
CommonEntity/TcpCloseReason.cs
Normal file
30
CommonEntity/TcpCloseReason.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CommonEntity
|
||||
{
|
||||
public class TcpCloseReason
|
||||
{
|
||||
public string? endpoint { get; set; }
|
||||
public int? clientid { get; set; }
|
||||
public string? close_reason { get; set; }
|
||||
public long currenttimestamp { get; set; }
|
||||
}
|
||||
public class TcpConnectLog
|
||||
{
|
||||
public string? endpoint { get; set; }
|
||||
public int? clientid { get; set; }
|
||||
public long currenttimestamp { get; set; }
|
||||
}
|
||||
|
||||
public class TcpSendDataLog
|
||||
{
|
||||
public string? endpoint { get; set; }
|
||||
public int? clientid { get; set; }
|
||||
public int[]? send_data { get; set; }
|
||||
public long currenttimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user