加大令牌长度
智能大石头 authored at 2021-12-25 08:09:24
11.69 KiB
Stardust
<?xml version="1.0" encoding="utf-8"?>
<Tables xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="http://www.newlifex.com http://www.newlifex.com/Model2020.xsd" NameSpace="Stardust.Data" ConnName="Stardust" Output="" BaseClass="" xmlns="http://www.newlifex.com/Model2020.xsd">
  <Table Name="App" TableName="StarApp" Description="应用系统。服务提供者和消费者">
    <Columns>
      <Column Name="Id" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
      <Column Name="Name" DataType="String" Master="True" Nullable="False" Description="名称" />
      <Column Name="DisplayName" DataType="String" Description="显示名" />
      <Column Name="Secret" DataType="String" Description="密钥" />
      <Column Name="Category" DataType="String" Description="类别" />
      <Column Name="Enable" DataType="Boolean" Description="启用" />
      <Column Name="AutoActive" DataType="Boolean" Description="自动激活。新登录应用是否自动激活,只有激活的应用,才提供服务" />
      <Column Name="WebHook" DataType="String" Length="500" Description="告警机器人。钉钉、企业微信等" />
      <Column Name="AlarmOnOffline" DataType="Boolean" Description="下线告警。节点下线时,发送告警" />
      <Column Name="LastLogin" DataType="DateTime" Description="最后登录" />
      <Column Name="LastIP" DataType="String" Description="最后IP" />
      <Column Name="AllowControlNodes" DataType="String" Description="节点控制。允许该应用发指令控制的节点,*表示全部节点" />
      <Column Name="Remark" DataType="String" Length="500" Description="内容" />
      <Column Name="CreateUser" DataType="String" Description="创建者" />
      <Column Name="CreateUserID" DataType="Int32" Description="创建者" />
      <Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
      <Column Name="CreateIP" DataType="String" Description="创建地址" />
      <Column Name="UpdateUser" DataType="String" Description="更新者" />
      <Column Name="UpdateUserID" DataType="Int32" Description="更新者" />
      <Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
      <Column Name="UpdateIP" DataType="String" Description="更新地址" />
    </Columns>
    <Indexes>
      <Index Columns="Name" Unique="True" />
    </Indexes>
  </Table>
  <Table Name="AppOnline" Description="应用在线。一个应用有多个部署,每个在线会话对应一个服务地址">
    <Columns>
      <Column Name="Id" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
      <Column Name="Category" DataType="String" Description="类别" />
      <Column Name="AppId" DataType="Int32" Description="应用" />
      <Column Name="Name" DataType="String" Master="True" Description="名称。机器名称" />
      <Column Name="Client" DataType="String" Description="客户端。IP加进程" />
      <Column Name="PingCount" DataType="Int32" Description="心跳" />
      <Column Name="ProcessId" DataType="Int32" Description="进程" />
      <Column Name="ProcessName" DataType="String" Description="进程名称" />
      <Column Name="UserName" DataType="String" Description="用户名。启动该进程的用户名" />
      <Column Name="StartTime" DataType="DateTime" Description="进程时间" />
      <Column Name="Version" DataType="String" Description="版本。客户端" />
      <Column Name="Compile" DataType="DateTime" Description="编译时间。客户端" />
      <Column Name="Token" DataType="String" Length="500" Description="令牌" />
      <Column Name="Creator" DataType="String" Description="创建者。服务端节点" />
      <Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
      <Column Name="CreateIP" DataType="String" Description="创建地址" />
      <Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
    </Columns>
    <Indexes>
      <Index Columns="Client" Unique="True" />
      <Index Columns="AppId" />
      <Index Columns="UpdateTime" />
      <Index Columns="Token" />
    </Indexes>
  </Table>
  <Table Name="AppHistory" Description="应用历史">
    <Columns>
      <Column Name="Id" DataType="Int64" PrimaryKey="True" Description="编号" />
      <Column Name="AppId" DataType="Int32" Description="应用" />
      <Column Name="Client" DataType="String" Description="客户端。IP加进程" />
      <Column Name="Version" DataType="String" Description="版本" />
      <Column Name="Action" DataType="String" Description="操作" />
      <Column Name="Success" DataType="Boolean" Description="成功" />
      <Column Name="Remark" DataType="String" Length="500" Description="内容" />
      <Column Name="Creator" DataType="String" Description="创建者。服务端节点" />
      <Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
      <Column Name="CreateIP" DataType="String" Description="创建地址" />
    </Columns>
    <Indexes>
      <Index Columns="AppId,Client" />
    </Indexes>
  </Table>
  <Table Name="AppMeter" Description="应用性能。保存应用上报的性能数据,如CPU、内存、线程、句柄等">
    <Columns>
      <Column Name="Id" DataType="Int64" PrimaryKey="True" Description="编号" />
      <Column Name="AppId" DataType="Int32" Description="应用" />
      <Column Name="ClientId" DataType="String" Description="实例。应用可能多实例部署,ip@proccessid" />
      <Column Name="Memory" DataType="Int32" Description="内存。单位M" />
      <Column Name="ProcessorTime" DataType="Int32" Description="处理器。处理器时间,单位ms" />
      <Column Name="Threads" DataType="Int32" Description="线程数" />
      <Column Name="Handles" DataType="Int32" Description="句柄数" />
      <Column Name="Connections" DataType="Int32" Description="连接数" />
      <Column Name="Data" DataType="String" Length="-1" Description="数据" />
      <Column Name="Creator" DataType="String" Description="创建者。服务端节点" />
      <Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
      <Column Name="CreateIP" DataType="String" Description="创建地址" />
    </Columns>
    <Indexes>
      <Index Columns="AppId,ClientId,Id" />
    </Indexes>
  </Table>
  <Table Name="Service" Description="服务信息。服务提供者发布的服务">
    <Columns>
      <Column Name="Id" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
      <Column Name="Name" DataType="String" Master="True" Nullable="False" Description="名称。服务名,提供一个地址,包含多个接口" />
      <Column Name="DisplayName" DataType="String" Description="显示名" />
      <Column Name="Category" DataType="String" Description="类别" />
      <Column Name="Enable" DataType="Boolean" Description="启用" />
      <Column Name="Providers" DataType="Int32" Description="提供者" />
      <Column Name="Consumers" DataType="Int32" Description="消费者" />
      <Column Name="Remark" DataType="String" Length="500" Description="内容" />
      <Column Name="CreateUser" DataType="String" Description="创建者" />
      <Column Name="CreateUserID" DataType="Int32" Description="创建者" />
      <Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
      <Column Name="CreateIP" DataType="String" Description="创建地址" />
      <Column Name="UpdateUser" DataType="String" Description="更新者" />
      <Column Name="UpdateUserID" DataType="Int32" Description="更新者" />
      <Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
      <Column Name="UpdateIP" DataType="String" Description="更新地址" />
    </Columns>
    <Indexes>
      <Index Columns="Name" Unique="True" />
    </Indexes>
  </Table>
  <Table Name="AppService" Description="应用服务。应用提供的服务">
    <Columns>
      <Column Name="Id" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
      <Column Name="AppId" DataType="Int32" Description="应用" />
      <Column Name="ServiceId" DataType="Int32" Description="服务" />
      <Column Name="ServiceName" DataType="String" Description="服务名" />
      <Column Name="Client" DataType="String" Description="客户端。IP加端口" />
      <Column Name="Enable" DataType="Boolean" Description="启用" />
      <Column Name="PingCount" DataType="Int32" Description="心跳" />
      <Column Name="Version" DataType="String" Description="版本" />
      <Column Name="Address" DataType="String" Length="500" Description="地址。服务地址,如http://127.0.0.1:1234" />
      <Column Name="HealthCheck" DataType="String" Description="健康监测" />
      <Column Name="Weight" DataType="Int32" Description="权重" />
      <Column Name="Scope" DataType="String" Description="作用域。根据配置中心应用规则计算,禁止跨域访问服务" />
      <Column Name="Tag" DataType="String" Description="标签。带有指定特性,逗号分隔" />
      <Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
      <Column Name="CreateIP" DataType="String" Description="创建地址" />
      <Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
    </Columns>
    <Indexes>
      <Index Columns="AppId" />
      <Index Columns="ServiceId" />
      <Index Columns="UpdateTime" />
    </Indexes>
  </Table>
  <Table Name="AppConsume" Description="应用消费。应用消费的服务">
    <Columns>
      <Column Name="Id" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
      <Column Name="AppId" DataType="Int32" Description="应用" />
      <Column Name="ServiceId" DataType="Int32" Description="服务" />
      <Column Name="ServiceName" DataType="String" Description="服务名" />
      <Column Name="Client" DataType="String" Description="客户端。IP加进程" />
      <Column Name="Enable" DataType="Boolean" Description="启用" />
      <Column Name="PingCount" DataType="Int32" Description="心跳" />
      <Column Name="MinVersion" DataType="String" Description="最低版本。要求返回大于等于该版本的服务提供者" />
      <Column Name="Scope" DataType="String" Description="作用域。根据配置中心应用规则计算,禁止跨域访问服务" />
      <Column Name="Tag" DataType="String" Description="标签。带有指定特性,逗号分隔" />
      <Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
      <Column Name="CreateIP" DataType="String" Description="创建地址" />
      <Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
    </Columns>
    <Indexes>
      <Index Columns="AppId" />
      <Index Columns="ServiceId" />
      <Index Columns="UpdateTime" />
    </Indexes>
  </Table>
  <Table Name="AppLog" Description="应用日志" ConnName="AppLog">
    <Columns>
      <Column Name="Id" DataType="Int64" PrimaryKey="True" Description="编号" />
      <Column Name="AppId" DataType="Int32" Master="True" Description="应用" />
      <Column Name="ClientId" DataType="String" Master="True" Description="客户端" />
      <Column Name="Time" DataType="String" Description="时间" />
      <Column Name="ThreadId" DataType="String" Description="线程" />
      <Column Name="Kind" DataType="String" Description="类型" />
      <Column Name="Name" DataType="String" Description="名称" />
      <Column Name="Message" DataType="String" Length="-1" Description="内容" />
      <Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
      <Column Name="CreateIP" DataType="String" Description="创建地址" />
    </Columns>
    <Indexes>
      <Index Columns="AppId,ClientId,ThreadId,Id" />
      <Index Columns="AppId,Id" />
    </Indexes>
  </Table>
</Tables>