Skip to content

Commit

Permalink
改进模板,增加Data数据层
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Dec 16, 2024
1 parent a613d01 commit 1565c7f
Show file tree
Hide file tree
Showing 44 changed files with 298 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"author": "新生命团队",
"name": "新生命蚂蚁调度"
"name": "新生命AntJob大数据计算"
}
3 changes: 2 additions & 1 deletion NewLife.Templates/AntJob/.template.config/template.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "NewLife",
"classifications": [ "NewLife", "Console", "Job" ],
"classifications": [ "NewLife", "Job" ],
"name": "NewLife AntJob",
"description": "蚂蚁调度系统子程序,编写数据处理等业务逻辑,连接蚂蚁调度中心,拉取作业任务来执行",
"identity": "NewLife.AntJob",
"shortName": "antjob",
"tags": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"author": "新生命团队",
"name": "新生命客户端"
"name": "新生命IoT客户端"
}
3 changes: 2 additions & 1 deletion NewLife.Templates/Client/.template.config/template.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "NewLife",
"classifications": [ "NewLife", "Console", "IoT" ],
"classifications": [ "NewLife", "IoT" ],
"name": "NewLife Client",
"description": "CS架构的客户端应用,以后台服务工作,一般由StarAgent负责守护",
"identity": "NewLife.Client",
"shortName": "client",
"tags": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"author": "新生命团队",
"name": "新生命控制台"
"name": "新生命Console控制台"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"author": "新生命团队",
"name": "新生命XCode数据层"
}
16 changes: 16 additions & 0 deletions NewLife.Templates/Data/.template.config/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "NewLife",
"classifications": [ "NewLife", "Common", "Library" ],
"name": "NewLife Data",
"description": "Web应用、微服务、应用服务、大数据计算等共用数据层,主要包括数据层实体类。一般只用于服务端",
"identity": "NewLife.Data.2024",
"groupIdentity": "NewLife.Data",
"shortName": "data",
"tags": {
"language": "C#",
"type": "project"
},
"sourceName": "Zero.Data",
"preferNameDirectory": true
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"author": "新生命团队",
"name": "新生命控制台"
"name": "新生命GTK桌面应用"
}
1 change: 1 addition & 0 deletions NewLife.Templates/GtkForm/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"author": "NewLife",
"classifications": [ "NewLife", "Desktop" ],
"name": "NewLife GtkForm",
"description": "使用GTK#技术的跨平台桌面应用,给用户提供便捷操作,可对接硬件",
"identity": "NewLife.GtkForm",
"shortName": "gtkform",
"tags": {
Expand Down
3 changes: 2 additions & 1 deletion NewLife.Templates/HttpServer/.template.config/template.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "NewLife",
"classifications": [ "NewLife", "Console" ],
"classifications": [ "NewLife", "Server" ],
"name": "NewLife HttpServer",
"description": "轻量级Http服务器,可用于追求简单Http服务的场景,例如暴露硬件控制为Http接口,如打印组件",
"identity": "NewLife.HttpServer",
"shortName": "http",
"tags": {
Expand Down
3 changes: 2 additions & 1 deletion NewLife.Templates/NetServer/.template.config/template.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "NewLife",
"classifications": [ "NewLife", "Console" ],
"classifications": [ "NewLife", "Server" ],
"name": "NewLife NetServer",
"description": "高性能Tcp网络服务器,单机最高400万连接,可用于建立各种协议的网络服务器",
"identity": "NewLife.NetServer",
"shortName": "net",
"tags": {
Expand Down
4 changes: 4 additions & 0 deletions NewLife.Templates/NewLife.Templates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
<Content Include="..\Zero.Worker\**\*" Link=".\Worker\" PackagePath="content\Worker\" Exclude="..\Zero.Worker\**\bin\**;..\Zero.Worker\**\obj\**" />
<Content Include="Worker\**\*" />
</ItemGroup>
<ItemGroup>
<Content Include="..\Zero.Data\**\*" Link=".\Data\" PackagePath="content\Data\" Exclude="..\Zero.Data\**\bin\**;..\Zero.Data\**\obj\**" />
<Content Include="Data\**\*" />
</ItemGroup>
<ItemGroup>
<Content Include="..\Zero.Web\**\*" Link=".\Web\" PackagePath="content\Web\" Exclude="..\Zero.Web\**\bin\**;..\Zero.Web\**\obj\**" />
<Content Include="Web\**\*" />
Expand Down
3 changes: 2 additions & 1 deletion NewLife.Templates/RpcServer/.template.config/template.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "NewLife",
"classifications": [ "NewLife", "Console" ],
"classifications": [ "NewLife", "Server" ],
"name": "NewLife RpcServer",
"description": "高性能,长连接,数据接口",
"identity": "NewLife.RpcServer",
"shortName": "rpc",
"tags": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"author": "新生命团队",
"name": "新生命后台服务"
"name": "新生命Service后台服务"
}
3 changes: 2 additions & 1 deletion NewLife.Templates/Service/.template.config/template.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "NewLife",
"classifications": [ "NewLife", "Console" ],
"classifications": [ "NewLife", "Agent" ],
"name": "NewLife Service",
"description": "数据处理、定时任务、MQ生产消费、系统监控等超长独立工作的后台任务",
"identity": "NewLife.Service",
"shortName": "service",
"tags": {
Expand Down
2 changes: 1 addition & 1 deletion NewLife.Templates/WebApi/.template.config/template.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "NewLife",
"classifications": [ "NewLife", "Common", "Web", "Api", "Web Api" ],
"classifications": [ "NewLife", "Common", "Web", "API", "Web API" ],
"name": "NewLife WebApi",
"description": "数据接口,带有Swagger的标准WebApi接口项目",
"identity": "NewLife.WebApi.2024",
Expand Down
3 changes: 2 additions & 1 deletion NewLife.Templates/WebSocket/.template.config/template.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "NewLife",
"classifications": [ "NewLife", "Console" ],
"classifications": [ "NewLife", "Server" ],
"name": "NewLife WebSocket",
"description": "轻量级WebSocket服务,可用于网页与终端本地硬件保持长连接通信",
"identity": "NewLife.WebSocket",
"shortName": "websocket",
"tags": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"author": "新生命团队",
"name": "新生命WebView"
"name": "新生命WebView窗体应用"
}
3 changes: 2 additions & 1 deletion NewLife.Templates/WebView/.template.config/template.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "NewLife",
"classifications": [ "NewLife", "Windows", "WinForm", "Desktop" ],
"classifications": [ "NewLife", "Windows", "WinForms", "Desktop" ],
"name": "NewLife WebView",
"description": "嵌入Web的客户端桌面应用,给用户提供便捷操作,可对接硬件",
"identity": "NewLife.WebView",
"shortName": "webview",
"tags": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"author": "新生命团队",
"name": "新生命窗口应用"
"name": "新生命Windows窗体应用"
}
3 changes: 2 additions & 1 deletion NewLife.Templates/WinForm/.template.config/template.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "NewLife",
"classifications": [ "NewLife", "Windows", "WinForm", "Desktop" ],
"classifications": [ "NewLife", "Windows", "WinForms", "Desktop" ],
"name": "NewLife WinForm",
"description": "CS架构的客户端桌面应用,给用户提供便捷操作,可对接硬件",
"identity": "NewLife.WinForm",
"shortName": "nwinform",
"tags": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"author": "新生命团队",
"name": "新生命后台"
"name": "新生命Worker"
}
1 change: 1 addition & 0 deletions NewLife.Templates/Worker/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"author": "NewLife",
"classifications": [ "NewLife", "Worker" ],
"name": "NewLife Worker",
"description": "数据处理、定时任务、MQ生产消费、系统监控等超长独立工作的后台任务",
"identity": "NewLife.Worker",
"shortName": "nworker",
"tags": {
Expand Down
5 changes: 2 additions & 3 deletions Zero.AntJob/Zero.AntJob.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NewLife.AntJob" Version="4.0.2024.904" />
<PackageReference Include="NewLife.AntJob.Extensions" Version="3.4.2024.904" />
<PackageReference Include="NewLife.AntJob" Version="4.0.2024.1216" />
<PackageReference Include="NewLife.AntJob.Extensions" Version="3.4.2024.1216" />
<PackageReference Include="NewLife.Core" Version="11.1.2024.1206" />
<PackageReference Include="NewLife.Redis" Version="6.0.2024.1205" />
<PackageReference Include="NewLife.XCode" Version="11.16.2024.1202" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Zero.Core\Zero.Core.csproj" />
<ProjectReference Include="..\Zero.Data\Zero.Data.csproj" />
</ItemGroup>

Expand Down
39 changes: 39 additions & 0 deletions Zero.Data/Models/LoginInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using NewLife.Remoting.Models;

namespace Zero.Data.Models;

/// <summary>节点登录信息</summary>
public class LoginInfo : LoginRequest
{
#region 属性
/// <summary>产品编码</summary>
public String ProductCode { get; set; }

/// <summary>名称。可用于标识设备的名称</summary>
public String Name { get; set; }

/// <summary>系统名</summary>
public String OSName { get; set; }

/// <summary>系统版本</summary>
public String OSVersion { get; set; }

/// <summary>处理器架构</summary>
public String Architecture { get; set; }

/// <summary>机器名</summary>
public String MachineName { get; set; }

/// <summary>用户名</summary>
public String UserName { get; set; }

/// <summary>核心数</summary>
public Int32 ProcessorCount { get; set; }

/// <summary>内存大小</summary>
public UInt64 Memory { get; set; }

/// <summary>磁盘大小。应用所在盘</summary>
public UInt64 TotalSize { get; set; }
#endregion
}
42 changes: 42 additions & 0 deletions Zero.Data/Models/PingInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using NewLife.Remoting.Models;

namespace Zero.Data.Models;

/// <summary>心跳信息</summary>
public class PingInfo : PingRequest
{
#region 属性
///// <summary>内存大小</summary>
//public UInt64 Memory { get; set; }

///// <summary>可用内存大小</summary>
//public UInt64 AvailableMemory { get; set; }

///// <summary>磁盘大小。应用所在盘</summary>
//public UInt64 TotalSize { get; set; }

///// <summary>磁盘可用空间。应用所在盘</summary>
//public UInt64 AvailableFreeSpace { get; set; }

///// <summary>CPU使用率</summary>
//public Double CpuRate { get; set; }

///// <summary>温度</summary>
//public Double Temperature { get; set; }

///// <summary>电量</summary>
//public Double Battery { get; set; }

///// <summary>本地IP</summary>
//public String IP { get; set; }

///// <summary>开机时间,单位s</summary>
//public Int32 Uptime { get; set; }

///// <summary>本地UTC时间。ms毫秒</summary>
//public Int64 Time { get; set; }

///// <summary>延迟。ms毫秒</summary>
//public Int32 Delay { get; set; }
#endregion
}
2 changes: 1 addition & 1 deletion Zero.Data/Nodes/节点.Biz.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using XCode;
using XCode.Cache;
using XCode.Membership;
using Zero.Models;
using Zero.Data.Models;

namespace Zero.Data.Nodes;

Expand Down
2 changes: 1 addition & 1 deletion Zero.Data/Nodes/节点在线.Biz.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using NewLife.Serialization;
using XCode;
using XCode.Membership;
using Zero.Models;
using Zero.Data.Models;

namespace Zero.Data.Nodes;

Expand Down
19 changes: 19 additions & 0 deletions Zero.Data/WeiXin/Article.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;

namespace Zero.WeiXin;

/// <summary>文章</summary>
public class Article
{
/// <summary>标题,不超过128个字节,超过会自动截断</summary>
public String Title { get; set; }

/// <summary>描述,不超过512个字节,超过会自动截断</summary>
public String Description { get; set; }

/// <summary>点击后跳转的链接。</summary>
public String Url { get; set; }

/// <summary>图文消息的图片链接,支持JPG、PNG格式,较好的效果为大图 1068*455,小图150*150。</summary>
public String PicUrl { get; set; }
}
Loading

0 comments on commit 1565c7f

Please sign in to comment.