初始化项目
This commit is contained in:
15
Models/ApiModei/GsInfo.cs
Normal file
15
Models/ApiModei/GsInfo.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ApiModei
|
||||
{
|
||||
public class GsInfo
|
||||
{
|
||||
public int uid { get; set; }
|
||||
public int gs { get; set; }
|
||||
public string gsname { get; set; }
|
||||
}
|
||||
}
|
||||
82
Models/ApiModei/HostsAsync.cs
Normal file
82
Models/ApiModei/HostsAsync.cs
Normal file
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ApiModei
|
||||
{
|
||||
public class HostsAsync
|
||||
{
|
||||
//ID(主机 ID)
|
||||
// , HostNumber(主机编号)
|
||||
// , RoomNumber(房号)
|
||||
// , Status(状态:0 离线,1 在线)
|
||||
// , RegisterDate(注册日期,如:2021-01-01)
|
||||
// , RoomStatusID(房态 ID)
|
||||
// RoomStatusName(房态名称),
|
||||
// RoomTypeID(房型 ID)
|
||||
// , RoomTypeName(房型名称)
|
||||
// , MAC(主机 mac 地址,如:34-D0-B8-1F-02-15)
|
||||
// , IP(主机 IP 地址), Remark(备注
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int ID { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int HotelID { get; set; }
|
||||
/// <summary>
|
||||
/// 默认酒店
|
||||
/// </summary>
|
||||
public string HotelName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string HostNumber { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string RoomNumber { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool Status { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime RegisterDate { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int RoomStatusID { get; set; }
|
||||
/// <summary>
|
||||
/// 空房
|
||||
/// </summary>
|
||||
public string RoomStatusName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int RoomTypeID { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string RoomTypeName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string MAC { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string IP { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
}
|
||||
72
Models/ApiModei/HotelsAsync.cs
Normal file
72
Models/ApiModei/HotelsAsync.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ApiModei
|
||||
{
|
||||
public class HotelsAsync
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int ID { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Code { get; set; }
|
||||
/// <summary>
|
||||
/// 默认酒店
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string EName { get; set; }
|
||||
/// <summary>
|
||||
/// 默認酒店
|
||||
/// </summary>
|
||||
public string TWName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Contact { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Phone { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Address { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ValidateDate { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime CreatDate { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool IsApprove { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int SysHotelGroupID { get; set; }
|
||||
/// <summary>
|
||||
/// 宝来威
|
||||
/// </summary>
|
||||
public string SysHotelGroupName { get; set; }
|
||||
}
|
||||
}
|
||||
101
Models/ApiModei/UserInfoAsync.cs
Normal file
101
Models/ApiModei/UserInfoAsync.cs
Normal file
@@ -0,0 +1,101 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ApiModei
|
||||
{
|
||||
public class UserInfoAsync
|
||||
{
|
||||
//ID(用户 ID),
|
||||
//HotelID(酒店 ID),
|
||||
//SysHotelGroupID(酒店分组 ID),
|
||||
//SysHotelGroupName(酒店分组名称),
|
||||
//GroupID(分组 ID),
|
||||
//GroupName(分组名称),
|
||||
//Account(账号),
|
||||
//Password(加密的密码),
|
||||
//Name(用户名称),
|
||||
//RoleID(角色 ID),
|
||||
//RoleName(角色名称),
|
||||
//Sex(性别),
|
||||
//Phone(电话),
|
||||
//Email(邮箱),
|
||||
//ActiveIndicator(启用),
|
||||
//CreateDate(创建日期,如:2020-01-01),
|
||||
//Sort(排序), Remark(备注)
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int ID { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int HotelID { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int SysHotelGroupID { get; set; }
|
||||
/// <summary>
|
||||
/// 所有酒店
|
||||
/// </summary>
|
||||
public string SysHotelGroupName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int GroupID { get; set; }
|
||||
/// <summary>
|
||||
/// 默认酒店
|
||||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Account { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Password { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int RoleID { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string RoleName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Sex { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Phone { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Email { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool ActiveIndicator { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime CreatedDate { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int Sort { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
}
|
||||
41
Models/App.config
Normal file
41
Models/App.config
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
|
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||
</configSections>
|
||||
<entityFramework>
|
||||
<providers>
|
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
|
||||
</providers>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
||||
<parameters>
|
||||
<parameter value="mssqllocaldb"/>
|
||||
</parameters>
|
||||
</defaultConnectionFactory>
|
||||
</entityFramework>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.29.0" newVersion="8.0.29.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<entityFramework>
|
||||
<providers>
|
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
|
||||
</providers>
|
||||
</entityFramework>
|
||||
<connectionStrings>
|
||||
<add name="CRICSEntities" connectionString="metadata=res://*/EF.Model1.csdl|res://*/EF.Model1.ssdl|res://*/EF.Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=boonlive-rcu.com;initial catalog=CRICS;user id=blw;password=blw@123;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient"/>
|
||||
</connectionStrings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||
43
Models/AuthorityDB.cs
Normal file
43
Models/AuthorityDB.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using Models.ModelItems;
|
||||
using Models.View;
|
||||
using System.Data.Entity;
|
||||
using System.IO;
|
||||
|
||||
namespace Models
|
||||
{
|
||||
//Code First
|
||||
public class AuthorityDB : DbContext
|
||||
{
|
||||
public AuthorityDB()
|
||||
//base调用基类构造函数
|
||||
: base("name=DB")//调用配置文件的connectionStrings的DB连接数据库
|
||||
{
|
||||
//this.Database.CommandTimeout = int.MaxValue;
|
||||
//模型更改是重创数据库
|
||||
Database.SetInitializer(new DBInit());
|
||||
}
|
||||
public virtual DbSet<ErrorInfo> ErrorInfos { get; set; }
|
||||
public virtual DbSet<UserInfo> UserInfos { get; set; }
|
||||
public virtual DbSet<MACLogs> MACLoges { get; set; }
|
||||
public virtual DbSet<ApplicationDomain> Apps { get; set; }
|
||||
public virtual DbSet<Authority> Authoritys { get; set; }
|
||||
public virtual DbSet<AppAutho> AppAuthos { get; set; }
|
||||
public virtual DbSet<AuthoStatusType> AuthoStatusTypes { get; set; }
|
||||
public virtual DbSet<Organization> Organizations{ get; set; }
|
||||
public virtual DbSet<OrgAuthority> OrgAuthorities { get; set; }
|
||||
public virtual DbSet<OrgUsers> OrgUsers { get; set; }
|
||||
public virtual DbSet<UserAuthoes> UserAuthos { get; set; }
|
||||
public virtual DbSet<View_UserInfo> View_UserInfos { get; set; }
|
||||
public virtual DbSet<View_MAClog> View_MAClogs { get; set; }
|
||||
public virtual DbSet<View_UOA> View_UOAs{ get; set; }
|
||||
public virtual DbSet<View_UA> View_UAs{ get; set; }
|
||||
public virtual DbSet<View_AppAutho> View_AppAuthos{ get; set; }
|
||||
public virtual DbSet<Hotels> Hotels{ get; set; }
|
||||
public virtual DbSet<HotelGroups> HoteldGroups { get; set; }
|
||||
public virtual DbSet<DbLog> DbLogs { get; set; }
|
||||
public virtual DbSet<Hosts> Hostses { get; set; }
|
||||
public virtual DbSet<AuthoRecord> AuthoRecordes { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
36
Models/DBHelper.cs
Normal file
36
Models/DBHelper.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models
|
||||
{
|
||||
public class DBHelper
|
||||
{
|
||||
private readonly static string config = "Data Source=boonlive-rcu.com;Initial Catalog=CRICS;Persist Security Info=True;User ID=blw;Password=blw@#$";
|
||||
public static int ExecuteNonQuery(string sql, Action<object, SqlInfoMessageEventArgs> OnReceivingInfoMessage = null, params SqlParameter[] par)
|
||||
{
|
||||
using (SqlConnection con = new SqlConnection(config))
|
||||
{
|
||||
using (SqlCommand com = new SqlCommand(sql, con))
|
||||
{
|
||||
if (par != null && par.Length > 0)
|
||||
{
|
||||
com.Parameters.AddRange(par);
|
||||
}
|
||||
if (con.State != ConnectionState.Open)
|
||||
{
|
||||
con.Open();
|
||||
}
|
||||
if (OnReceivingInfoMessage != null) {
|
||||
con.InfoMessage += new SqlInfoMessageEventHandler(OnReceivingInfoMessage);
|
||||
}
|
||||
return com.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Models/DBInit.cs
Normal file
52
Models/DBInit.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
|
||||
using Models.ModelItems;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.Entity;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Web.Security;
|
||||
|
||||
namespace Models
|
||||
{
|
||||
//数据库模型不一致时创建
|
||||
//DropCreateDatabaseIfModelChanges
|
||||
//默认 不存在时创建
|
||||
// CreateDatabaseIfNotExists
|
||||
// DropCreateDatabaseAlways:每次运行时都重新生成数据
|
||||
public class DBInit : CreateDatabaseIfNotExists<AuthorityDB>
|
||||
{
|
||||
|
||||
//继承三种内置的初始化器中的DropCreateDatabaseAlways
|
||||
protected override void Seed(AuthorityDB context)
|
||||
{
|
||||
try
|
||||
{
|
||||
//添加约束 适当修改
|
||||
string sql = File.ReadAllText(AppContext.BaseDirectory + "App_Data\\configs\\Constraint.sql").Replace("go", "").Replace("GO", "");
|
||||
context.Database.ExecuteSqlCommand(sql);
|
||||
//添加触发器 不用
|
||||
sql = File.ReadAllText(AppContext.BaseDirectory + "App_Data\\configs\\trigger.sql").Replace("go", "").Replace("GO", "");
|
||||
context.Database.ExecuteSqlCommand(sql);
|
||||
//创建视图
|
||||
sql = File.ReadAllText(AppContext.BaseDirectory + "App_Data\\configs\\ViewInit.sql").Replace("go", "").Replace("GO", "");
|
||||
context.Database.ExecuteSqlCommand(sql);
|
||||
//初始化数据 这块暂不处理
|
||||
sql = File.ReadAllText(AppContext.BaseDirectory + "App_Data\\configs\\InitData.sql").Replace("go", "").Replace("GO", "");
|
||||
context.Database.ExecuteSqlCommand(sql);
|
||||
//同步酒店人员信息 这块暂时无效
|
||||
sql = File.ReadAllText(AppContext.BaseDirectory + "App_Data\\configs\\datasql.sql").Replace("go", "").Replace("GO", "");
|
||||
context.Database.ExecuteSqlCommand(sql);
|
||||
base.Seed(context);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
File.WriteAllLines(AppContext.BaseDirectory + "App_Data\\DBINITerr.txt", new string[] { ex.ToString() });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Models/ModelItems/AppAutho.cs
Normal file
64
Models/ModelItems/AppAutho.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
#region 应用权限表
|
||||
[Table("AppAutho")]
|
||||
public class AppAutho
|
||||
{
|
||||
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
//[ForeignKey("AppId")]
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 应用ID
|
||||
/// </summary>
|
||||
//[Key, Column(Order = 1)]
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType ="int")]
|
||||
public int AppId { get; set; }
|
||||
|
||||
|
||||
|
||||
//[ForeignKey("AuthorityId")]
|
||||
|
||||
|
||||
//public Authority authority { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 权限ID
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
///
|
||||
//[Key, Column(Order = 2)]
|
||||
public int AuthorityId { get; set; }
|
||||
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "datetime(3)")]
|
||||
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true ,DefaultValue = "系统")]
|
||||
public string CreatedBy { get; set; } = "系统";
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
86
Models/ModelItems/ApplicationDomain.cs
Normal file
86
Models/ModelItems/ApplicationDomain.cs
Normal file
@@ -0,0 +1,86 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
#region 应用域表
|
||||
[Table("ApplicationDomain")]
|
||||
public class ApplicationDomain
|
||||
{
|
||||
//[Key]
|
||||
//[DatabaseGenerated(DatabaseGeneratedOption.Identity)
|
||||
|
||||
|
||||
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
//[Required]
|
||||
/// <summary>
|
||||
/// 应用名
|
||||
/// </summary>
|
||||
///
|
||||
[SugarColumn(ColumnDataType = "varchar(50)")]
|
||||
public string AppName { get; set; }
|
||||
/// <summary>
|
||||
/// 说明
|
||||
/// </summary>
|
||||
///
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable =true)]
|
||||
public string Desc { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
///
|
||||
|
||||
[SugarColumn(ColumnDataType = "datetime(3)")]
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
//[DefaultValue("0"), Range(0, 2)]
|
||||
public int IsValid { get; set; } = 0;
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
public int DowSum { get; set; } = 0;
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true,DefaultValue = "系统")]
|
||||
public string CreatedBy { get; set; } = "系统";
|
||||
|
||||
|
||||
//关联网址
|
||||
[SugarColumn(ColumnDataType = "varchar(120)", IsNullable = true)]
|
||||
|
||||
public string WebSite { get; set; } = null;
|
||||
//类型
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "int",IsNullable =true)]
|
||||
|
||||
public int AppType { get; set; } = 0;
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(120)", IsNullable = true)]
|
||||
|
||||
public string Version { get; set; } = null;
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(50)", IsNullable = true)]
|
||||
|
||||
public string Icon { get; set; } = null;
|
||||
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "datetime(3)",IsNullable =true)]
|
||||
public DateTime ReleaseDate { get; set; } = DateTime.Now;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
36
Models/ModelItems/AuthoRecord.cs
Normal file
36
Models/ModelItems/AuthoRecord.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
#region 授权记录表
|
||||
[Table("AuthoRecord")]
|
||||
public class AuthoRecord
|
||||
{
|
||||
//[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
|
||||
|
||||
public int Id { get; set; }
|
||||
//授权用户
|
||||
[SugarColumn(ColumnDataType ="int")]
|
||||
|
||||
public int Userid { get; set; }
|
||||
//本次授权Appid
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
public int AppId { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType = "datetime(3)", IsNullable = true)]
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
//本次授权数量
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
public int Count { get; set; }
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
45
Models/ModelItems/AuthoStatusType.cs
Normal file
45
Models/ModelItems/AuthoStatusType.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
#region 权限状态类型表
|
||||
[Table("AuthoStatusType")]
|
||||
public class AuthoStatusType
|
||||
{
|
||||
//[Key]
|
||||
//[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
/// <summary>
|
||||
/// 类型名称 0 超级管理员权限 1 查 2 查改 3 查增 4 查删 5 查 改删 6 查 增改 7 查 增删
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(255)")]
|
||||
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// 说明
|
||||
/// </summary>
|
||||
///
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable =true)]
|
||||
|
||||
public string Desc { get; set; }
|
||||
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "datetime(3)")]
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true,DefaultValue = "系统")]
|
||||
public string CreatedBy { get; set; } = "系统";
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
67
Models/ModelItems/Authority.cs
Normal file
67
Models/ModelItems/Authority.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
#region 权限表
|
||||
[Table("Authority")]
|
||||
public class Authority
|
||||
{
|
||||
//[Key]
|
||||
//[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
[Required]
|
||||
/// <summary>
|
||||
/// 权限名
|
||||
/// </summary>
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(255)")]
|
||||
|
||||
public string AuthorityName { get; set; }
|
||||
/// <summary>
|
||||
/// 说明
|
||||
/// </summary>
|
||||
///
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true)]
|
||||
|
||||
public string Desc { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
///
|
||||
|
||||
[SugarColumn(ColumnDataType = "datetime(3)")]
|
||||
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true,DefaultValue = "系统")]
|
||||
|
||||
public string CreatedBy { get; set; } = "系统";
|
||||
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "int",IsNullable =true)]
|
||||
/// <summary>
|
||||
/// 是否可用 0 可用 其他不可
|
||||
/// </summary>
|
||||
//[DefaultValue("0"), Range(0, 2)]
|
||||
public int? IsValid { get; set; } = 0;
|
||||
//状态下拉 集合
|
||||
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true)]
|
||||
public string AuthoStatusTypeId { get; set; }
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
44
Models/ModelItems/DbLog.cs
Normal file
44
Models/ModelItems/DbLog.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
[Table("DbLog")]
|
||||
public class DbLog
|
||||
{
|
||||
//[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true)]
|
||||
|
||||
public string Content { get; set; }
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true)]
|
||||
|
||||
public string Uid { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType = "datetime(3)")]
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
public int Type { get; set; }
|
||||
/// <param name="type"> 0 新增 1 更新 2 删除</param>
|
||||
///
|
||||
[SugarColumn(ColumnDataType = "varchar(50)", IsNullable = true)]
|
||||
|
||||
public string Ip { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true)]
|
||||
|
||||
public string Client { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(150)", IsNullable = true)]
|
||||
|
||||
public string location { get; set; }
|
||||
}
|
||||
}
|
||||
64
Models/ModelItems/ErrorInfo.cs
Normal file
64
Models/ModelItems/ErrorInfo.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
//微信小程序反馈错误表
|
||||
[Table("ErrorInfo")]
|
||||
public class ErrorInfo
|
||||
{
|
||||
//[Key]
|
||||
//[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(50)",IsNullable =true)]
|
||||
public string MAC { get; set; }
|
||||
//操作者用户ID
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
public int userid { get; set; }
|
||||
/// <summary>
|
||||
/// 0 房间被绑定 1 MAC被绑定
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "int", IsNullable = true)]
|
||||
|
||||
public int type { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 酒店ID
|
||||
/// </summary>
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
public int HotelID { get; set; }
|
||||
/// <summary>
|
||||
/// 房间号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(50)", IsNullable = true)]
|
||||
public string roomNumber { get; set; }
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
|
||||
//是否已经处理 0 未处理 1 已经处理
|
||||
[SugarColumn(ColumnDataType = "int", IsNullable = true)]
|
||||
public int status { get; set; } = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "datetime(3)", IsNullable = true , DefaultValue="current_timestamp(3)" )]
|
||||
public DateTime createtime { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
553
Models/ModelItems/Host.cs
Normal file
553
Models/ModelItems/Host.cs
Normal file
@@ -0,0 +1,553 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
|
||||
public class Host_
|
||||
{
|
||||
private DateTime registerDate = DateTime.Now;
|
||||
|
||||
private string subnetMask = "255.0.0.0";
|
||||
|
||||
private string gateway = "192.168.1.1";
|
||||
|
||||
private string dns = "114.114.114.114";
|
||||
|
||||
private int port = 3341;
|
||||
|
||||
private bool powerSupply = true;
|
||||
|
||||
private int authorizedHours = -1;
|
||||
|
||||
private int lockStatus = 2;//1锁开,2锁关
|
||||
|
||||
/// <summary>
|
||||
/// ID
|
||||
/// </summary>
|
||||
public virtual int ID
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 主机编号
|
||||
/// </summary>
|
||||
public virtual string HostNumber
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 房间号
|
||||
/// </summary>
|
||||
public virtual string RoomNumber
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// IP
|
||||
/// </summary>
|
||||
public virtual string IP
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 局域网IP
|
||||
/// </summary>
|
||||
public virtual string LanIP
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 子网掩码
|
||||
/// </summary>
|
||||
public virtual string SubnetMask
|
||||
{
|
||||
get { return this.subnetMask; }
|
||||
set
|
||||
{
|
||||
|
||||
|
||||
this.subnetMask = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 网关
|
||||
/// </summary>
|
||||
public virtual string Gateway
|
||||
{
|
||||
get { return this.gateway; }
|
||||
set
|
||||
{
|
||||
|
||||
this.gateway = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// DNS
|
||||
/// </summary>
|
||||
public virtual string DNS
|
||||
{
|
||||
get { return this.dns; }
|
||||
set
|
||||
{
|
||||
this.dns = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 端口
|
||||
/// </summary>
|
||||
public virtual int Port
|
||||
{
|
||||
get { return this.port; }
|
||||
set
|
||||
{
|
||||
|
||||
this.port = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 局域网端口
|
||||
/// </summary>
|
||||
public virtual int LanPort
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// MAC
|
||||
/// </summary>
|
||||
public virtual string MAC
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 状态 0:离线 1:在线
|
||||
/// </summary>
|
||||
public virtual bool Status
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 版本号
|
||||
/// </summary>
|
||||
public virtual string Version
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 配置数据版本号
|
||||
/// </summary>
|
||||
public virtual string ConfigVersion
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public virtual string Remark
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 注册日期
|
||||
/// </summary>
|
||||
public virtual DateTime RegisterDate
|
||||
{
|
||||
get { return this.registerDate; }
|
||||
set { this.registerDate = value; }
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
/// <summary>
|
||||
/// 请求服务
|
||||
/// </summary>
|
||||
public virtual bool RequestService
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求清理
|
||||
/// </summary>
|
||||
public virtual bool RequestClear
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 请勿打扰
|
||||
/// </summary>
|
||||
public virtual bool RequestDNDST
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 请求退房
|
||||
/// </summary>
|
||||
public virtual bool RequestCheckOut
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 求救
|
||||
/// </summary>
|
||||
public virtual bool SOS
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}*/
|
||||
|
||||
/// <summary>
|
||||
/// 门锁 True/开,False/关
|
||||
/// </summary>
|
||||
public virtual bool DoorLockStatus
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 房门状态更新时间
|
||||
/// </summary>
|
||||
public virtual DateTime? DoorLockStatusUpdateTime
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保险箱:0关,1开,2未接保险箱
|
||||
/// </summary>
|
||||
public virtual int SafeStatus
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/*
|
||||
/// <summary>
|
||||
/// 当前温度
|
||||
/// </summary>
|
||||
public virtual int CurrentTemp
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设定温度
|
||||
/// </summary>
|
||||
public virtual int SettingTemp
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 风速
|
||||
/// </summary>
|
||||
public virtual int Speed
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 辅助房态
|
||||
/// </summary>
|
||||
public virtual string RoomStatusAidIDs
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否连通房
|
||||
/// </summary>
|
||||
public virtual bool IsConnectingRoom
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 连通房ID,逗号隔开
|
||||
/// </summary>
|
||||
public virtual string ConnectingRooms
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}*/
|
||||
|
||||
/// <summary>
|
||||
/// 主机温度
|
||||
/// </summary>
|
||||
public virtual int HostTemp
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 客房电源
|
||||
/// </summary>
|
||||
public virtual bool PowerSupply
|
||||
{
|
||||
get { return this.powerSupply; }
|
||||
set { this.powerSupply = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 授权剩余小时
|
||||
/// </summary>
|
||||
public virtual int AuthorizedHours
|
||||
{
|
||||
get { return this.authorizedHours; }
|
||||
set { this.authorizedHours = value; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 锁状态:1开,2关
|
||||
/// </summary>
|
||||
public virtual int LockStatus
|
||||
{
|
||||
get { return this.lockStatus; }
|
||||
set { this.lockStatus = value; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 锁电压
|
||||
/// </summary>
|
||||
public virtual float LockVoltage
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 阿里云对接产品key
|
||||
/// </summary>
|
||||
public virtual string ProductKey
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 阿里云对接设备名称
|
||||
/// </summary>
|
||||
public virtual string DeviceName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 阿里云对接设备密钥
|
||||
/// </summary>
|
||||
public virtual string DeviceSecret
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 主机密钥
|
||||
/// </summary>
|
||||
public virtual string HostSecret
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 阿里云物联网平台为该设备颁发的设备ID,作为该设备的唯一标识符。
|
||||
/// </summary>
|
||||
public virtual string IotId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 是否下发密钥给主机
|
||||
/// </summary>
|
||||
public virtual bool IsPublish
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 若琪对接的webhook url,通知播放欢迎词使用
|
||||
/// </summary>
|
||||
public virtual string RokidWebhookUrl
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 绑定小度音箱的序列号
|
||||
/// </summary>
|
||||
public virtual string XiaoDuCUID
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// TCL电视序列号
|
||||
/// </summary>
|
||||
public virtual string TCLCUID
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 华为电视序列号
|
||||
/// </summary>
|
||||
public virtual string HuaWeiCUID
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 是否同步房号(生产工具同步)
|
||||
/// </summary>
|
||||
public virtual bool IsSyncRoomNumber
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 是否自动升级
|
||||
/// </summary>
|
||||
public virtual bool IsAutoUpdate
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// MAC绑定时间
|
||||
/// </summary>
|
||||
public virtual DateTime? MACBindDate
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// IP类型:1自动,2手动
|
||||
/// </summary>
|
||||
public virtual int IPType
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// rcu到期时间
|
||||
/// </summary>
|
||||
public virtual DateTime? ExpireTime
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// rcu运行时间
|
||||
/// </summary>
|
||||
public virtual DateTime? RunTime
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置rcu到期时间
|
||||
/// </summary>
|
||||
public virtual DateTime? SetExpireTime
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 是否锁定
|
||||
/// </summary>
|
||||
public virtual bool IsLock
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 季节
|
||||
/// </summary>
|
||||
public virtual string Season
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 服务器IP
|
||||
/// </summary>
|
||||
public virtual string ServerIP
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 服务器端口
|
||||
/// </summary>
|
||||
public virtual int ServerPort
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 最新更新日期
|
||||
/// </summary>
|
||||
public virtual DateTime? Last_Modified_Time
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 房型
|
||||
/// </summary>
|
||||
public virtual int RoomTypeID
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 酒店
|
||||
/// </summary>
|
||||
public virtual int HOTELID
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 房态
|
||||
/// </summary>
|
||||
public virtual int RoomStatusID
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public int IsDeleted { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
122
Models/ModelItems/Hosts.cs
Normal file
122
Models/ModelItems/Hosts.cs
Normal file
@@ -0,0 +1,122 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
[Table("Hosts")]
|
||||
//房间表 暂未使用
|
||||
public class Hosts
|
||||
{
|
||||
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
|
||||
|
||||
public int Id { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType ="int")]
|
||||
public int HotelID { get; set; }
|
||||
|
||||
public string HotelName { get; set; }
|
||||
public string RoomNumber { get; set; }
|
||||
public int Status { get; set; } = 0; // 0 离线 1 在线
|
||||
public int? RoomStatusID { get; set; }
|
||||
public string MAC { get; set; }
|
||||
public string Desc { get; set; }
|
||||
/// <summary>
|
||||
/// 人脸机sn
|
||||
/// </summary>
|
||||
public string FaceSN { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 人脸机在线
|
||||
/// </summary>
|
||||
public bool FaceStatus { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 维修状态 0 正常 1 维修
|
||||
/// </summary>
|
||||
public Nullable<int> maintainStatus { get; set; } = 0;
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class HostsAdd : Hosts
|
||||
{
|
||||
public int RoomTypeID { get; set; }
|
||||
}
|
||||
//public class HostsAsync
|
||||
//{
|
||||
// //ID(主机 ID)
|
||||
// // , HostNumber(主机编号)
|
||||
// // , RoomNumber(房号)
|
||||
// // , Status(状态:0 离线,1 在线)
|
||||
// // , RegisterDate(注册日期,如:2021-01-01)
|
||||
// // , RoomStatusID(房态 ID)
|
||||
// // RoomStatusName(房态名称),
|
||||
// // RoomTypeID(房型 ID)
|
||||
// // , RoomTypeName(房型名称)
|
||||
// // , MAC(主机 mac 地址,如:34-D0-B8-1F-02-15)
|
||||
// // , IP(主机 IP 地址), Remark(备注
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public int ID { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public int HotelID { get; set; }
|
||||
// /// <summary>
|
||||
// /// 默认酒店
|
||||
// /// </summary>
|
||||
// public string HotelName { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string HostNumber { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string RoomNumber { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public bool Status { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public DateTime RegisterDate { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public int RoomStatusID { get; set; }
|
||||
// /// <summary>
|
||||
// /// 空房
|
||||
// /// </summary>
|
||||
// public string RoomStatusName { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public int RoomTypeID { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string RoomTypeName { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string MAC { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string IP { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string Remark { get; set; }
|
||||
// }
|
||||
}
|
||||
42
Models/ModelItems/HotelGroups.cs
Normal file
42
Models/ModelItems/HotelGroups.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
//[Table("HotelGroups")]
|
||||
public class HotelGroups
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true, IsPrimaryKey = false)]
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "int",IsPrimaryKey = false)]
|
||||
|
||||
public int ParentId { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true, IsPrimaryKey = false)]
|
||||
|
||||
public string Desc { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "datetime(3)", IsNullable = true, IsPrimaryKey = false)]
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
|
||||
public int IsDel { get; set; } = 0;
|
||||
|
||||
|
||||
//public string ParenetName { get; set; }
|
||||
//public int Sort { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
122
Models/ModelItems/Hotels.cs
Normal file
122
Models/ModelItems/Hotels.cs
Normal file
@@ -0,0 +1,122 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
[Table("Hotels")]
|
||||
public class Hotels
|
||||
{
|
||||
//[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
|
||||
public int Id { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(60)")]
|
||||
|
||||
public string Name { get; set; }
|
||||
//public string TWName { get; set; }
|
||||
//public string EName { get; set; }
|
||||
//public string Contact { get; set; }
|
||||
//public string Phone { get; set; }
|
||||
//public string Address { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(60)",IsNullable =true)]
|
||||
|
||||
public string Desc { get; set; }
|
||||
//public string Remark { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
public int GroupId { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(60)", IsNullable = true)]
|
||||
|
||||
public string Code { get; set; }
|
||||
|
||||
//0正式运营,1批量安装,2样板间
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
public int Status { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
//0审批,1审批同过
|
||||
public int IsApprove { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType = "datetime(3)", IsNullable = true)]
|
||||
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
//public DateTime CreatDate { get; set; } = DateTime.Now;
|
||||
//public DateTime ValidateDate { get; set; } = DateTime.Now;
|
||||
}
|
||||
//public class HotelsAsync
|
||||
//{
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public int ID { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string Code { get; set; }
|
||||
// /// <summary>
|
||||
// /// 默认酒店
|
||||
// /// </summary>
|
||||
// public string Name { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string EName { get; set; }
|
||||
// /// <summary>
|
||||
// /// 默認酒店
|
||||
// /// </summary>
|
||||
// public string TWName { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string Contact { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string Phone { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string Address { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string ValidateDate { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public DateTime CreatDate { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string Remark { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public int Status { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public bool IsApprove { get; set; }
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public int SysHotelGroupID { get; set; }
|
||||
// /// <summary>
|
||||
// /// 宝来威
|
||||
// /// </summary>
|
||||
// public string SysHotelGroupName { get; set; }
|
||||
//}
|
||||
}
|
||||
96
Models/ModelItems/MACLogs.cs
Normal file
96
Models/ModelItems/MACLogs.cs
Normal file
@@ -0,0 +1,96 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
//微信小程序用户操作mac的日志表
|
||||
//[Table("MACLogs")]
|
||||
public class MACLogs
|
||||
{
|
||||
|
||||
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
/// <summary>
|
||||
/// 操作ID 同一次操作可能多次结果
|
||||
/// </summary>
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
public int ActionId { get; set; }
|
||||
/// <summary>
|
||||
/// 新的MAC
|
||||
/// </summary>
|
||||
///
|
||||
[SugarColumn(ColumnDataType = "varchar(50)",IsNullable =true)]
|
||||
public string MAC { get; set; }
|
||||
//操作者用户ID
|
||||
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
public int userid { get; set; }
|
||||
/// <summary>
|
||||
/// 操作日志 0 新增 1 解绑
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
public int type { get; set; }
|
||||
/// <summary>
|
||||
/// 地址
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(150)", IsNullable = true)]
|
||||
|
||||
public string location { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(100)", IsNullable = true)]
|
||||
|
||||
public string Ip { get; set; }
|
||||
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "datetime(3)")]
|
||||
|
||||
|
||||
public DateTime createtime { get; set; } = default;
|
||||
/// <summary>
|
||||
/// 酒店ID
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
public int HotelID { get; set; }
|
||||
/// <summary>
|
||||
/// 房间ID
|
||||
/// </summary>
|
||||
///
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(100)", IsNullable = true)]
|
||||
public string roomID { get; set; }
|
||||
/// <summary>
|
||||
/// 房间号
|
||||
/// </summary>
|
||||
///
|
||||
///
|
||||
[SugarColumn(ColumnDataType = "varchar(100)")]
|
||||
|
||||
public string roomNumber { get; set; }
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
///
|
||||
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
public int Status { get; set; } = 0;
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
public int AppType { get; set; } = 0;// 0 表示 rcu主机 1表示人脸机
|
||||
|
||||
}
|
||||
}
|
||||
80
Models/ModelItems/OrgAuthority.cs
Normal file
80
Models/ModelItems/OrgAuthority.cs
Normal file
@@ -0,0 +1,80 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
#region 用户组权限表
|
||||
//[Table("OrgAuthority")]
|
||||
public class OrgAuthority
|
||||
{
|
||||
|
||||
//[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
|
||||
|
||||
public int Id { get; set; }
|
||||
//[ForeignKey("OrgId")]
|
||||
//public Organization organization { get; set; }
|
||||
/// <summary>
|
||||
/// 用户组ID
|
||||
/// </summary>
|
||||
//[Key,Column(Order = 1)]
|
||||
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType ="int")]
|
||||
public int OrgId { get; set; }
|
||||
//[ForeignKey("AuthorityId")]
|
||||
|
||||
|
||||
|
||||
//public Authority authority { get; set; }
|
||||
/// <summary>
|
||||
/// 权限ID
|
||||
/// </summary>
|
||||
//[Key,Column(Order = 2)]
|
||||
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
public int AuthorityId { get; set; }
|
||||
//[ForeignKey("AuthotypeId")]
|
||||
//public AuthoStatusType authoStatusType { get; set; }
|
||||
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
/// <summary>
|
||||
/// 权限状态
|
||||
/// </summary>
|
||||
public int AuthotypeId { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
///
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "datetime(3)", IsNullable = true)]
|
||||
public DateTime? CreateTime { get; set; } = DateTime.Now;
|
||||
|
||||
|
||||
|
||||
//[Key, Column(Order = 3)]
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
|
||||
public int HotelId { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true)]
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
52
Models/ModelItems/OrgUsers.cs
Normal file
52
Models/ModelItems/OrgUsers.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
|
||||
//[Table("OrgUser")]
|
||||
public class OrgUsers
|
||||
{
|
||||
//[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
/// <summary>
|
||||
/// 用户组ID
|
||||
/// </summary>
|
||||
//[ForeignKey("OrgId")]
|
||||
//public Organization organization { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
public int OrgId { get; set; }
|
||||
//[ForeignKey("UserId")]
|
||||
//public UserInfo user { get; set; }
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
//[Key, Column(Order = 1)]
|
||||
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
public int UserId { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
///
|
||||
|
||||
[SugarColumn(ColumnDataType = "datetime(3)", IsNullable = true)]
|
||||
|
||||
public DateTime? CreateTime { get; set; } = DateTime.Now;
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true,DefaultValue = "系统")]
|
||||
|
||||
public string CreatedBy { get; set; } = "系统";
|
||||
|
||||
}
|
||||
}
|
||||
57
Models/ModelItems/Organization.cs
Normal file
57
Models/ModelItems/Organization.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
#region 用户组表
|
||||
[Table("Organization")]
|
||||
public class Organization
|
||||
{
|
||||
//[Key]
|
||||
//[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
|
||||
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
/// <summary>
|
||||
/// 用户组名
|
||||
/// </summary>
|
||||
///
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true)]
|
||||
|
||||
public string OrganizationName { get; set; }
|
||||
/// <summary>
|
||||
/// 说明
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true)]
|
||||
|
||||
public string Desc { get; set; }
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
public int IsDefault { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "datetime(3)", IsNullable = true)]
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true,DefaultValue = "系统")]
|
||||
|
||||
public string CreatedBy { get; set; } = "系统";
|
||||
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
public int IsValid { get; set; } = 0;
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
17
Models/ModelItems/QxIfo.cs
Normal file
17
Models/ModelItems/QxIfo.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
|
||||
public class QxIfo
|
||||
{
|
||||
public int uid { get; set; }
|
||||
public int id { get; set; } // 酒店id
|
||||
public int sum { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
52
Models/ModelItems/TBL_HOTEL_BASIC_INFO.cs
Normal file
52
Models/ModelItems/TBL_HOTEL_BASIC_INFO.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
public class TBL_HOTEL_BASIC_INFO
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public int HOTEL_ID { get; set; }
|
||||
public string PROJECT_NUMBER { get; set; } = string.Empty;
|
||||
public string HOTEL_NAME_CN { get; set; } = string.Empty;
|
||||
public string HOTEL_NAME_EN { get; set; } = string.Empty;
|
||||
public string HOTEL_NAME_TW { get; set; } = string.Empty;
|
||||
public string NATIONAL { get; set; } = string.Empty;
|
||||
public string PROVICE { get; set; } = string.Empty;
|
||||
public string CITY { get; set; } = string.Empty;
|
||||
public string TOWN { get; set; } = string.Empty;
|
||||
public string DETAIL_ADD { get; set; } = string.Empty;
|
||||
public string KEY_Name { get; set; } = string.Empty;
|
||||
public int KEY_ID { get; set; } = 0;
|
||||
public DateTime KEY_IN_DATETIME { get; set; } = DateTime.Now;
|
||||
public bool IsApprove { get; set; } = false;
|
||||
public int? APPROVE { get; set; }
|
||||
public DateTime? APPROVE_DATE { get; set; }
|
||||
public string HOTEL_BRAND { get; set; } = string.Empty;
|
||||
public int HOTEL_GROUP { get; set; } = 0;
|
||||
public string LOG_IMAGE { get; set; } = string.Empty;
|
||||
public DateTime? UPDATE_TIMEMARK { get; set; } = DateTime.Now;
|
||||
public DateTime? VALID_DATETIME { get; set; }
|
||||
public int VALID_STATUS { get; set; } = 0;
|
||||
public int STATUS { get; set; } = 0;
|
||||
public string SALES { get; set; } = string.Empty;
|
||||
public string SALES_PHONE { get; set; } = string.Empty;
|
||||
public string HOTEL_CONTACT { get; set; } = string.Empty;
|
||||
public string HOTEL_CONTACT_PHONE { get; set; } = string.Empty;
|
||||
public int SORT { get; set; } = 0;
|
||||
public string REMARK { get; set; } = String.Empty;
|
||||
public int IDOLD { get; set; } = 0;//酒店编号
|
||||
public string PASSWORD { get; set; } = "123456";// 房型编号
|
||||
public int IsDel { get; set; } = 0;
|
||||
public int HOTEL_OLD_GROUP { get; set; } = 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
31
Models/ModelItems/TBL_HOTEL_GROUP_INFO.cs
Normal file
31
Models/ModelItems/TBL_HOTEL_GROUP_INFO.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
public class TBL_HOTEL_GROUP_INFO
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public int HOTEL_GROUP_ID { get; set; }
|
||||
public string HOTEL_GROUP_NAME { get; set; }
|
||||
public int PARENT_ID { get; set; }
|
||||
public int SORT { get; set; }
|
||||
public int KEY_IN { get; set; }
|
||||
public DateTime KEY_IN_DATETIME { get; set; } = DateTime.Now;
|
||||
public int? APPROVE { get; set; }
|
||||
public DateTime? APPROVE_DATE { get; set; }
|
||||
public DateTime? UPDATE_TIMEMARK { get; set; } = DateTime.Now;
|
||||
public string REMARK { get; set; }
|
||||
public int IsDel { get; set; }
|
||||
public int HOTEL_GROUP_OLD_ID { get; set; }
|
||||
public int PARENT_OLD_ID { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
32
Models/ModelItems/TBL_HOTEL_SEASON.cs
Normal file
32
Models/ModelItems/TBL_HOTEL_SEASON.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
|
||||
public class TBL_HOTEL_SEASON
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public int ID { get; set; }
|
||||
public int HOTELID { get; set; }
|
||||
public int HOTELID_OLD { get; set; }
|
||||
public int MONTH1 { get; set; }
|
||||
public int MONTH2 { get; set; }
|
||||
public int MONTH3 { get; set; }
|
||||
public int MONTH4 { get; set; }
|
||||
public int MONTH5 { get; set; }
|
||||
public int MONTH6 { get; set; }
|
||||
public int MONTH7 { get; set; }
|
||||
public int MONTH8 { get; set; }
|
||||
public int MONTH9 { get; set; }
|
||||
public int MONTH10 { get; set; }
|
||||
public int MONTH11 { get; set; }
|
||||
public int MONTH12 { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
28
Models/ModelItems/TBL_RCU_BASIC_INFO.cs
Normal file
28
Models/ModelItems/TBL_RCU_BASIC_INFO.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
public class TBL_RCU_BASIC_INFO
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public int RCU_ID { get; set; }
|
||||
public string MAC { get; set; }
|
||||
public string UUID { get; set; }
|
||||
public string BRAND { get; set; }
|
||||
public string MODEL { get; set; }
|
||||
public string CORE_MODUEL { get; set; }
|
||||
public DateTime REGISTER_DATE { get; set; } = DateTime.Now;
|
||||
public int REGISTER_STATUS { get; set; } = 0;
|
||||
public string UDP_KEY { get; set; }
|
||||
public DateTime? UPDATE_TIMEMARK { get; set; } = DateTime.Now;
|
||||
public int IsImport { get; set; }
|
||||
public int ISREGISTRATION { get; set; }
|
||||
}
|
||||
}
|
||||
32
Models/ModelItems/TBL_ROOM_BASIC_INFO.cs
Normal file
32
Models/ModelItems/TBL_ROOM_BASIC_INFO.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
public class TBL_ROOM_BASIC_INFO
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public int ROOM_ID { get; set; }
|
||||
public int HOTEL_ID { get; set; }
|
||||
public int ROOM_TYPE_ID { get; set; }
|
||||
public string ROOM_NUMBER { get; set; }
|
||||
public string DESCRPTION { get; set; }
|
||||
public string MAC { get; set; }
|
||||
public DateTime? UPDATE_TIMEMARK { get; set; }
|
||||
public string REMARK { get; set; }
|
||||
public int ROOM_TYPE_OLD_ID { get; set; }
|
||||
public int RoomStatusID { get; set; }
|
||||
public int HOTEL_OLD_ID { get; set; }
|
||||
public int ROOM_OLD_ID { get; set; }
|
||||
public DateTime? AUTH_DATETIME { get; set; }
|
||||
|
||||
public int IsDel { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
61
Models/ModelItems/TBL_ROOM_SET_CONFIG.cs
Normal file
61
Models/ModelItems/TBL_ROOM_SET_CONFIG.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
public class TBL_ROOM_SET_CONFIG
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public int ID { get; set; }
|
||||
public int ROOM_ID { get; set; }
|
||||
public int ROOM_OLD_ID { get; set; }
|
||||
public string RCU_ROOM { get; set; }
|
||||
public string PRODUCT_CODE { get; set; }
|
||||
public int RCU_SEASON { get; set; }
|
||||
public DateTime? AUTH_DATETIME { get; set; }
|
||||
public int VALID_STATUS { get; set; }
|
||||
public string ROOM_DESCRIPTION { get; set; }
|
||||
public string FW_VER { get; set; }
|
||||
public string CONFIG_VER { get; set; }
|
||||
public int FW_AUTO_UPGRADE { get; set; }
|
||||
public int CFG_AUTO_UPDATE { get; set; }
|
||||
public string RCU_LOCAL_PORT { get; set; }
|
||||
public string RCU_LOCAL_IP { get; set; }
|
||||
public string RCU_SUB_MASK { get; set; }
|
||||
public string RCU_GETWAY { get; set; }
|
||||
public string RCU_DNS_SERVER { get; set; }
|
||||
public string RCU_CLOUD_SVR_IP { get; set; }
|
||||
public string RCU_CLOUD_SVR_URL { get; set; }
|
||||
public string RCU_CLOUD_SVR_PORT_MODE { get; set; }
|
||||
public string RCU_CLOUD_SVR_PORT { get; set; }
|
||||
public string RCU_SOCKET3_FUN { get; set; }
|
||||
public string RCU_LOCAL_SVR_IP { get; set; }
|
||||
public string RCU_LOCAL_SVR_PORT_MODE { get; set; }
|
||||
public string RCU_LOCAL_SVR_PORT { get; set; }
|
||||
public string RCU_MQTT_PRODUCT_SECRET { get; set; }
|
||||
public string RCU_MQTT_DEV_NAME { get; set; }
|
||||
public string RCU_MQTT_DEV_SECRET { get; set; }
|
||||
public string RCU_MQTT_PUB_TOPIC { get; set; }
|
||||
public string RCU_MQTT_SUB_TOPIC { get; set; }
|
||||
public int RCU_MQTT_KEEPALIVE { get; set; }
|
||||
public int RCU_HEARTBEAT_TIMEOUT { get; set; }
|
||||
public int RCU_HEARTBEAT_RETRY { get; set; }
|
||||
public int RCU_HEARTBEAT_FAIL_THD { get; set; }
|
||||
public string RCU_TFTP_LOG_SVR_IP { get; set; }
|
||||
public string RCU_TFTP_LOG_CFG { get; set; }
|
||||
public string RCU_TFTP_LOG_SVR_PORT { get; set; }
|
||||
public string RCU_SECRET_MODE { get; set; }
|
||||
public string CFG_MODIFIED_FLAG { get; set; }
|
||||
public string CFG_READY_FLAG { get; set; }
|
||||
public DateTime UPDATE_TIMEMARK { get; set; }
|
||||
public string REMARK { get; set; }
|
||||
public int IPType { get; set; }
|
||||
public int IsDel { get; set; }
|
||||
}
|
||||
}
|
||||
58
Models/ModelItems/TBL_ROOM_TYPE_LIST.cs
Normal file
58
Models/ModelItems/TBL_ROOM_TYPE_LIST.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
/// <summary>
|
||||
/// 房型表
|
||||
/// </summary>
|
||||
[Table("TBL_ROOM_TYPE_LIST")]
|
||||
public class TBL_ROOM_TYPE_LIST
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public int ROOM_TYPE_ID { get; set; }
|
||||
public int HOTEL_ID { get; set; }
|
||||
public string ROOM_TYPE_NAME { get; set; }
|
||||
public string DESCRIPTION { get; set; }
|
||||
public DateTime UPDATE_TIMEMARK { get; set; } = DateTime.Now;
|
||||
public string REMARK { get; set; }//备注
|
||||
public string CONFIG_XML { get; set; }//配置文件名
|
||||
public string CONFIG_BIN { get; set; }// 二进制配置数据
|
||||
public string CONFIG_BIN_MD5 { get; set; }// 二进制配置数据校验值
|
||||
public int ROOM_TYPE_OLD_ID { get; set; } // 房型编号
|
||||
public string PASSWORD { get; set; } = "123456";// 房型编号
|
||||
public int IsDel { get; set; }
|
||||
public int HOTEL_OLD_ID { get; set; } // 房型编号
|
||||
public int CFG_CURR_VER { get; set; } // CFG咕咕叫版本
|
||||
public string Firmware_FileName { get; set; } // 固件文件名
|
||||
public string Firmware_Version { get; set; }
|
||||
public string Firmware_MD5 { get; set; }
|
||||
public string Firmware_Approve { get; set; }
|
||||
public DateTime? Firmware_ApproveDate { get; set; }
|
||||
public string ConfigData_Approve { get; set; }
|
||||
public DateTime? ConfigData_ApproveDate { get; set; }
|
||||
public DateTime Creation_Time { get; set; } = DateTime.Now;
|
||||
public DateTime? ConfigUploadDateTime { get; set; }
|
||||
public DateTime? FirmwareUploadDateTime { get; set; }
|
||||
public string CONFIG_XML_MD5 { get; set; } = string.Empty;
|
||||
public string LUNCHER_HEX { get; set; } = string.Empty;
|
||||
public string LUNCHER_MD5 { get; set; } = string.Empty;
|
||||
public string Cfg_Type { get; set; } = string.Empty;
|
||||
public string App_Cfg_For_L4 { get; set; } = string.Empty;
|
||||
public string App_Cfg_For_L4_MD5 { get; set; } = string.Empty;
|
||||
public string App_Cfg_For_L2 { get; set; } = string.Empty;
|
||||
public string App_Cfg_For_L2_MD5 { get; set; } = string.Empty;
|
||||
public string Hex_Code_For_L4 { get; set; } = string.Empty;
|
||||
public string Hex_Code_For_L4_MD5 { get; set; } = string.Empty;
|
||||
public string Hex_Code_For_L2 { get; set; } = string.Empty;
|
||||
public string Hex_Code_For_L2_MD5 { get; set; } = string.Empty;
|
||||
public string Hex_Code_For_Model { get; set; } = string.Empty;
|
||||
public string APPTYPE { get; set; }
|
||||
}
|
||||
}
|
||||
20
Models/ModelItems/TBL_SEASON.cs
Normal file
20
Models/ModelItems/TBL_SEASON.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
public class TBL_SEASON
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public int ID { get; set; }
|
||||
public string NAME { get; set; }
|
||||
public string BeginDate { get; set; }
|
||||
public string EndDate { get; set; }
|
||||
}
|
||||
}
|
||||
60
Models/ModelItems/UserAuthoes.cs
Normal file
60
Models/ModelItems/UserAuthoes.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
//[Table("UserAutho")]
|
||||
public class UserAuthoes
|
||||
{
|
||||
//[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
//[ForeignKey("UserId")]
|
||||
//public UserInfo user { get; set; }
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
//[Key,Column(Order = 1)]
|
||||
[SugarColumn(ColumnDataType = "int", IndexGroupNameList = new[] { "UserId_key" }) ]
|
||||
public int UserId { get; set; }
|
||||
//[ForeignKey("AuthorityId")]
|
||||
//public Authority authority { get; set; }
|
||||
/// <summary>
|
||||
/// 权限ID
|
||||
/// </summary>
|
||||
//[Key,Column(Order =2)]
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
|
||||
public int AuthorityId { get; set; }
|
||||
//[ForeignKey("AuthotypeId")]
|
||||
//public AuthoStatusType authoStatusType { get; set; }
|
||||
/// <summary>
|
||||
/// 权限状态
|
||||
/// </summary>
|
||||
///
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
public int AuthotypeId { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
///
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(255)")]
|
||||
|
||||
public string CreateTime { get; set; } = DateTime.Now.ToString("g");
|
||||
//[Key,Column(Order = 3)]
|
||||
public int HotelId { get; set; }
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true, DefaultValue = "系统")]
|
||||
public string CreatedBy { get; set; } = "系统";
|
||||
}
|
||||
}
|
||||
203
Models/ModelItems/UserInfo.cs
Normal file
203
Models/ModelItems/UserInfo.cs
Normal file
@@ -0,0 +1,203 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Security;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
#region 用户表
|
||||
[Table("UserInfo")]
|
||||
public class UserInfo:ICloneable
|
||||
{
|
||||
//用户表 ID 密码 用户名 头像(有默认) 性别 年龄 说明 创建时间 到期时间 (默认2个月后) 所属酒店 所属酒店组
|
||||
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
/// <summary>
|
||||
/// 用户标识(账号)
|
||||
/// </summary>
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(50)", IndexGroupNameList = new[] { "Uid_key" }) ]
|
||||
public string Uid { get; set; }
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(50)")]
|
||||
public string Pwd { get; set; }
|
||||
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(255)",IsNullable =true)]
|
||||
|
||||
public string PwdSee { get; set; }
|
||||
/// <summary>
|
||||
/// 头像url
|
||||
/// </summary>
|
||||
///
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true, DefaultValue = "default.png")]
|
||||
|
||||
public string HeadImg { get; set; } = "defaultboy.png";
|
||||
/// <summary>
|
||||
/// 性别 0-3 0 男 1 女 2 未知 3 预留待定 默认0
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
public int? Sex { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 年龄 默认18
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "int", IsNullable = true, DefaultValue = "18")]
|
||||
public int? Age { get; set; } = 18;
|
||||
/// <summary>
|
||||
/// 是否可用 0 可用 1 不可 2管理
|
||||
/// </summary>
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "int", IsNullable = true)]
|
||||
public int? IsValid { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 说明
|
||||
/// </summary>
|
||||
///
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true)]
|
||||
|
||||
public string Desc { get; set; } = "";
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
///
|
||||
[SugarColumn(ColumnDataType = "datetime(3)", IsNullable = true)]
|
||||
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
|
||||
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "datetime(3)", IsNullable = true)]
|
||||
|
||||
public DateTime? EndTime { get; set; } = DateTime.Now.AddMonths(2);
|
||||
|
||||
|
||||
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return this.Clone();
|
||||
}
|
||||
public UserInfo Clones()
|
||||
{
|
||||
return (UserInfo)this.Clone();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true)]
|
||||
public string CreatedBy { get; set; } = "系统";
|
||||
/// <summary>
|
||||
/// 所属酒店
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "int", IsNullable = true)]
|
||||
|
||||
public int? HotelID { get; set; } = 0;
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "int", IsNullable = true)]
|
||||
|
||||
public int? HotelGroupID { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 是否导入 1 导入
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "int", IsNullable = true)]
|
||||
public int IsImport { get; set; } = 0;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 酒店数量
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "int", IsNullable = true)]
|
||||
public int Hotel_Count { get; set; } = 0;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 所有酒店
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "TEXT(21845)", IsNullable = true)]
|
||||
public string Hotel_Data { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 公司 0 宝来威 1 住好 2 卓豪
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "int", IsNullable = true)]
|
||||
|
||||
public int? Company { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "int", IsNullable = true)]
|
||||
|
||||
public int? OldId { get; set; } = 0;
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "int")]
|
||||
|
||||
//是否自动授权
|
||||
public int Autho { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
///
|
||||
[SugarColumn(ColumnDataType = "datetime(3)", IsNullable = true)]
|
||||
|
||||
public DateTime SyncTime { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// 计算密码 Hash值
|
||||
/// </summary>
|
||||
/// <param name="password"></param>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
public UserInfo ComputePasswordHash()
|
||||
{
|
||||
this.Pwd = HashCode(this.Uid.ToUpper() + this.Pwd + (this.CreateTime).ToString("yyyy-MM-dd HH:mm:ss"));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取MD5值
|
||||
/// </summary>
|
||||
/// <param name="key">加密的字符串</param>
|
||||
/// <returns>返回MD5值</returns>
|
||||
public string HashCode(string key)
|
||||
{
|
||||
return FormsAuthentication.HashPasswordForStoringInConfigFile(key, "MD5");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
20
Models/ModelItems/new_table_update_time_mark.cs
Normal file
20
Models/ModelItems/new_table_update_time_mark.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.ModelItems
|
||||
{
|
||||
//[Table("HotelGroups")]
|
||||
public class new_table_update_time_mark
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public int ID { get; set; }
|
||||
public string NEW_DB_TABLE_NAME { get; set; }
|
||||
public DateTime LAST_UPDATE_TIME { get; set; } = DateTime.Now;
|
||||
public DateTime LAST_LATESTREC_TIME { get; set; } = DateTime.Now;
|
||||
}
|
||||
}
|
||||
162
Models/Models.csproj
Normal file
162
Models/Models.csproj
Normal file
@@ -0,0 +1,162 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{8C60AE21-34FD-4C98-BC52-68CEEF63B5E1}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Models</RootNamespace>
|
||||
<AssemblyName>Models</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="BouncyCastle.Crypto, Version=1.8.5.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
|
||||
<HintPath>..\packages\BouncyCastle.1.8.5\lib\BouncyCastle.Crypto.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Google.Protobuf, Version=3.19.4.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="K4os.Compression.LZ4, Version=1.2.6.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="K4os.Compression.LZ4.Streams, Version=1.2.6.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\K4os.Compression.LZ4.Streams.1.2.6\lib\net46\K4os.Compression.LZ4.Streams.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="K4os.Hash.xxHash, Version=1.0.6.0, Culture=neutral, PublicKeyToken=32cd54395057cec3, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\K4os.Hash.xxHash.1.0.6\lib\net46\K4os.Hash.xxHash.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data, Version=8.0.29.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MySql.Data.8.0.29\lib\net452\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SqlSugar, Version=5.0.9.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SqlSugar.5.0.9\lib\SqlSugar.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Ubiety.Dns.Core, Version=2.2.1.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MySql.Data.8.0.29\lib\net452\Ubiety.Dns.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ZstdNet, Version=1.4.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MySql.Data.8.0.29\lib\net452\ZstdNet.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ApiModei\GsInfo.cs" />
|
||||
<Compile Include="ApiModei\HostsAsync.cs" />
|
||||
<Compile Include="ApiModei\HotelsAsync.cs" />
|
||||
<Compile Include="ApiModei\UserInfoAsync.cs" />
|
||||
<Compile Include="AuthorityDB.cs" />
|
||||
<Compile Include="DBHelper.cs" />
|
||||
<Compile Include="DBInit.cs" />
|
||||
<Compile Include="ModelItems\ErrorInfo.cs" />
|
||||
<Compile Include="ModelItems\Host.cs" />
|
||||
<Compile Include="ModelItems\TBL_HOTEL_GROUP_INFO.cs" />
|
||||
<Compile Include="ModelItems\TBL_HOTEL_BASIC_INFO.cs" />
|
||||
<Compile Include="ModelItems\new_table_update_time_mark.cs" />
|
||||
<Compile Include="ModelItems\MACLogs.cs" />
|
||||
<Compile Include="ModelItems\QxIfo.cs" />
|
||||
<Compile Include="ModelItems\AppAutho.cs" />
|
||||
<Compile Include="ModelItems\ApplicationDomain.cs" />
|
||||
<Compile Include="ModelItems\AuthoRecord.cs" />
|
||||
<Compile Include="ModelItems\Authority.cs" />
|
||||
<Compile Include="ModelItems\AuthoStatusType.cs" />
|
||||
<Compile Include="ModelItems\DbLog.cs" />
|
||||
<Compile Include="ModelItems\HotelGroups.cs" />
|
||||
<Compile Include="ModelItems\Hotels.cs" />
|
||||
<Compile Include="ModelItems\Organization.cs" />
|
||||
<Compile Include="ModelItems\OrgAuthority.cs" />
|
||||
<Compile Include="ModelItems\OrgUsers.cs" />
|
||||
<Compile Include="ModelItems\TBL_HOTEL_SEASON.cs" />
|
||||
<Compile Include="ModelItems\TBL_RCU_BASIC_INFO.cs" />
|
||||
<Compile Include="ModelItems\TBL_ROOM_BASIC_INFO.cs" />
|
||||
<Compile Include="ModelItems\TBL_ROOM_SET_CONFIG.cs" />
|
||||
<Compile Include="ModelItems\TBL_ROOM_TYPE_LIST.cs" />
|
||||
<Compile Include="ModelItems\TBL_SEASON.cs" />
|
||||
<Compile Include="ModelItems\UserAuthoes.cs" />
|
||||
<Compile Include="ModelItems\UserInfo.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SqlSugarBase.cs" />
|
||||
<Compile Include="Test_Feac.cs" />
|
||||
<Compile Include="ViewMessageModel.cs" />
|
||||
<Compile Include="ModelItems\Hosts.cs" />
|
||||
<Compile Include="View\ViewInit.cs" />
|
||||
<Compile Include="View\View_MAClog.cs" />
|
||||
<Compile Include="View\View_UA.cs" />
|
||||
<Compile Include="View\View_AppAutho.cs" />
|
||||
<Compile Include="View\View_UOA.cs" />
|
||||
<Compile Include="View\View_UserInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="packages.config">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="SQLQuery1.sql" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
36
Models/Properties/AssemblyInfo.cs
Normal file
36
Models/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("Models")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("Models")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("8c60ae21-34fd-4c98-bc52-68ceef63b5e1")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
130
Models/SQLQuery1.sql
Normal file
130
Models/SQLQuery1.sql
Normal file
@@ -0,0 +1,130 @@
|
||||
|
||||
|
||||
--<EFBFBD>û<EFBFBD><EFBFBD>鴥<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
exec ('
|
||||
if exists(select * from sys.triggers where name=''trigger_OrgAuthority_update'')
|
||||
--ɾ<><C9BE>DML<4D><4C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
begin
|
||||
drop trigger trigger_OrgAuthority_update;
|
||||
end
|
||||
')
|
||||
exec ('
|
||||
--<2D>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8> ------------------------<2D><>
|
||||
create trigger trigger_OrgAuthority_update
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>on OrgAuthority
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>for update
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>as
|
||||
declare @AuthotypeIdnew int; --<2D><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Inserted<65><64>¼<EFBFBD>µ<EFBFBD>ID
|
||||
declare @AuthotypeIdold int; --<2D><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Delete<74><65>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD>ɵ<EFBFBD>ID
|
||||
declare @AuthoId int; --<2D><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Inserted<65><64>¼Ȩ<C2BC><C8A8>ID
|
||||
declare @OrgId int; --<2D><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Inserted<65><64>¼<EFBFBD>û<EFBFBD><C3BB><EFBFBD>ID
|
||||
declare @HotelId int;
|
||||
select @AuthotypeIdold = AuthotypeId
|
||||
from deleted;
|
||||
select @AuthotypeIdnew = AuthotypeId,@AuthoId = AuthorityId,@OrgId = OrgId,@HotelId = HotelId
|
||||
from inserted;
|
||||
if update(AuthotypeId)
|
||||
begin
|
||||
update UserAuthoes set AuthotypeId = @AuthotypeIdnew where HotelId = @HotelId and AuthorityId = @AuthoId and AuthotypeId = @AuthotypeIdold and UserId in (select UserId from OrgUsers where OrgId = @OrgId)
|
||||
end;
|
||||
')
|
||||
exec('
|
||||
if exists(select * from sys.triggers where name=''trigger_OrgAuthority_del'')
|
||||
begin
|
||||
drop trigger trigger_OrgAuthority_del;
|
||||
end
|
||||
')
|
||||
exec('
|
||||
--<2D>û<EFBFBD><C3BB><EFBFBD>Ȩ<EFBFBD><C8A8>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ------------------------<2D><>
|
||||
create trigger trigger_OrgAuthority_del
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>on OrgAuthority
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>for delete
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>as
|
||||
declare @AuthotypeIdold int; --<2D><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Delete<74><65>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD>ɵ<EFBFBD>ID
|
||||
declare @AuthoId int; --<2D><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Inserted<65><64>¼Ȩ<C2BC><C8A8>ID
|
||||
declare @OrgId int; --<2D><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Inserted<65><64>¼<EFBFBD>û<EFBFBD><C3BB><EFBFBD>ID
|
||||
declare @HotelId int;
|
||||
select @AuthotypeIdold = AuthotypeId, @AuthoId = AuthorityId,@OrgId = OrgId,@HotelId = HotelId
|
||||
from deleted;
|
||||
delete UserAuthoes where HotelId = @HotelId and AuthorityId = @AuthoId and AuthotypeId = @AuthotypeIdold and UserId in (select UserId from OrgUsers where OrgId = @OrgId)
|
||||
')
|
||||
exec('
|
||||
--<2D>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8> ------------------------<2D><>
|
||||
if exists(select * from sys.triggers where name=''trigger_OrgAuthority_Insert'')
|
||||
begin
|
||||
drop trigger trigger_OrgAuthority_Insert;
|
||||
end
|
||||
')
|
||||
exec('
|
||||
create trigger trigger_OrgAuthority_Insert --- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ---------------------------- <20>û<EFBFBD>δ<EFBFBD><CEB4><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ѹ<EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>on OrgAuthority
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>for insert
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>as
|
||||
declare @AuthotypeIdnew int; --<2D><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Inserted<65><64>¼<EFBFBD>µ<EFBFBD>ID
|
||||
declare @AuthoId int; --<2D><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Inserted<65><64>¼Ȩ<C2BC><C8A8>ID
|
||||
declare @OrgId int; --<2D><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Inserted<65><64>¼<EFBFBD>û<EFBFBD><C3BB><EFBFBD>ID
|
||||
declare @HotelId int;
|
||||
select @AuthotypeIdnew = AuthotypeId,@AuthoId = AuthorityId,@OrgId = OrgId,@HotelId = HotelId
|
||||
from inserted;
|
||||
insert into UserAuthoes(AuthorityId,AuthotypeId,UserId, HotelId) select @AuthoId,@AuthotypeIdnew,UserId,@HotelId from OrgUsers where OrgId = @OrgId and (select count(*) from UserAuthoes where UserId = OrgUsers.UserId and AuthorityId = @AuthoId and HotelId = @HotelId)<0
|
||||
')
|
||||
exec('
|
||||
--<2D>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD> <20>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>ʱ<EFBFBD><CAB1>ѡ<EFBFBD><D1A1>Ȩ<EFBFBD><C8A8> <20><><EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD>ֵ
|
||||
if exists(select * from sys.triggers where name=''trigger_Orguserinfo_Insert'')
|
||||
begin
|
||||
drop trigger trigger_Orguserinfo_Insert
|
||||
end
|
||||
')
|
||||
exec('
|
||||
create trigger trigger_Orguserinfo_Insert ------------------------<2D><>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>on OrgUsers
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>for insert
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>as
|
||||
declare @userid int; --<2D><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Inserted <20><>¼<EFBFBD>û<EFBFBD>id
|
||||
declare @OrgId int; --<2D><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Inserted<65><64>¼<EFBFBD>û<EFBFBD><C3BB><EFBFBD>ID
|
||||
select @userid = UserId,@OrgId = OrgId
|
||||
from inserted;
|
||||
--<2D><><EFBFBD><EFBFBD>û<EFBFBD>е<EFBFBD>Ȩ<EFBFBD><C8A8>
|
||||
insert into UserAuthoes(AuthorityId,AuthotypeId,UserId,HotelId)
|
||||
select AuthorityId,AuthotypeId,@userid,HotelId from OrgAuthority
|
||||
where OrgId = @OrgId and
|
||||
(select count(*) from UserAuthoes where UserId = @userid and AuthorityId = OrgAuthority.AuthorityId and HotelId = OrgAuthority.HotelId) = 0
|
||||
')
|
||||
|
||||
|
||||
|
||||
--select * from View_UOA
|
||||
--<EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>ʱ<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD>ֵ
|
||||
exec('
|
||||
if exists(select * from sys.triggers where name=''trigger_Orguserinfo_Updata'')
|
||||
begin
|
||||
drop trigger trigger_Orguserinfo_Updata
|
||||
end
|
||||
')
|
||||
exec('
|
||||
create trigger trigger_Orguserinfo_Updata
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>on OrgUsers
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>for update
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>as
|
||||
declare @userid int; --<2D><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Inserted <20><>¼<EFBFBD>û<EFBFBD>id
|
||||
declare @OrgId int; --<2D><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Inserted<65><64>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>ID
|
||||
declare @oldOrgId int; --<2D><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Inserted<65><64>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>ID
|
||||
select @userid = UserId,@OrgId = OrgId
|
||||
from inserted;
|
||||
select @oldOrgId = OrgId
|
||||
from deleted;
|
||||
--ɾ<><C9BE><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8>
|
||||
delete UserAuthoes where (
|
||||
select count(*) from OrgAuthority where UserAuthoes.UserId = @userid
|
||||
and UserAuthoes.HotelId = HotelId
|
||||
and UserAuthoes.AuthotypeId = AuthotypeId
|
||||
and UserAuthoes.AuthorityId = AuthorityId
|
||||
)>0
|
||||
--<2D><><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8>
|
||||
insert into UserAuthoes(AuthorityId,AuthotypeId,UserId,HotelId)
|
||||
select AuthorityId,AuthotypeId,@userid,HotelId from OrgAuthority
|
||||
where OrgId = @OrgId and
|
||||
(select count(*) from UserAuthoes where UserId = @userid and AuthorityId = OrgAuthority.AuthorityId and HotelId = OrgAuthority.HotelId) = 0
|
||||
')
|
||||
insert into OrgUsers(OrgId,UserId,CreateTime) select 1,Id,GETDATE() from UserInfo where id not in (select UserId from OrgUsers)
|
||||
|
||||
80
Models/SqlSugarBase.cs
Normal file
80
Models/SqlSugarBase.cs
Normal file
@@ -0,0 +1,80 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models
|
||||
{
|
||||
public static class SqlSugarBase
|
||||
{
|
||||
public static object S = new object();
|
||||
public static string sql = "Server=blv-cloud-db.mysql.rds.aliyuncs.com;Database=AuthorityDB;Uid=blv_rcu;Pwd=fnadiaJDIJ7546;charset=utf8;port=3307;AllowLoadLocalInfile=true;";
|
||||
public static SqlSugarScope Db = new SqlSugarScope(new ConnectionConfig()
|
||||
{
|
||||
DbType = SqlSugar.DbType.MySql,
|
||||
ConnectionString = sql,
|
||||
IsAutoCloseConnection = true
|
||||
},
|
||||
db =>
|
||||
{
|
||||
lock (S)
|
||||
{
|
||||
|
||||
//string s3 = AppDomain.CurrentDomain.BaseDirectory;
|
||||
//db.DbMaintenance.CreateDatabase(); //个别数据库不支持
|
||||
//Type[] types = Assembly
|
||||
//.LoadFrom($@"{s3}\bin\Models.dll")//如果 .dll报错,可以换成 xxx.exe 有些生成的是exe
|
||||
//.GetTypes().Where(it => it.FullName.Contains("Models.ModelItems."))//命名空间过滤,当然你也可以写其他条件过滤
|
||||
//.ToArray();//断点调试一下是不是需要的Type,不是需要的在进行过滤
|
||||
//db.CodeFirst.SetStringDefaultLength(200).InitTables(types);//根据types创建表
|
||||
db.Aop.OnLogExecuting = (s, p) =>
|
||||
{
|
||||
Debug.WriteLine(s);
|
||||
};
|
||||
}
|
||||
//string ret = $"{s3}\\App_Data\\configs\\sqlView.txt";
|
||||
//string ret1 = $"{s3}\\App_Data\\configs\\ccgc.txt";
|
||||
//string url = File.ReadAllText(ret, Encoding.UTF8);
|
||||
//string url1 = File.ReadAllText(ret1, Encoding.UTF8);
|
||||
//Db.Ado.ExecuteCommand(url);
|
||||
//Db.Ado.ExecuteCommand(url1);
|
||||
});
|
||||
|
||||
public static string sqlRcu = "Server=blv-cloud-db.mysql.rds.aliyuncs.com;Database=blv_rcu_db;Uid=blv_rcu;Pwd=fnadiaJDIJ7546;charset=utf8;port=3307;AllowLoadLocalInfile=true;";
|
||||
public static SqlSugarScope RcuDb = new SqlSugarScope(new ConnectionConfig()
|
||||
{
|
||||
DbType = SqlSugar.DbType.MySql,
|
||||
ConnectionString = sqlRcu,
|
||||
IsAutoCloseConnection = true
|
||||
},
|
||||
db =>
|
||||
{
|
||||
lock (S)
|
||||
{
|
||||
|
||||
//string s3 = AppDomain.CurrentDomain.BaseDirectory;
|
||||
//db.DbMaintenance.CreateDatabase(); //个别数据库不支持
|
||||
//Type[] types = Assembly
|
||||
//.LoadFrom($@"{s3}\bin\Models.dll")//如果 .dll报错,可以换成 xxx.exe 有些生成的是exe
|
||||
//.GetTypes().Where(it => it.FullName.Contains("Models.ModelItems."))//命名空间过滤,当然你也可以写其他条件过滤
|
||||
//.ToArray();//断点调试一下是不是需要的Type,不是需要的在进行过滤
|
||||
//db.CodeFirst.SetStringDefaultLength(200).InitTables(types);//根据types创建表
|
||||
db.Aop.OnLogExecuting = (s, p) =>
|
||||
{
|
||||
Debug.WriteLine(s);
|
||||
};
|
||||
}
|
||||
//string ret = $"{s3}\\App_Data\\configs\\sqlView.txt";
|
||||
//string ret1 = $"{s3}\\App_Data\\configs\\ccgc.txt";
|
||||
//string url = File.ReadAllText(ret, Encoding.UTF8);
|
||||
//string url1 = File.ReadAllText(ret1, Encoding.UTF8);
|
||||
//Db.Ado.ExecuteCommand(url);
|
||||
//Db.Ado.ExecuteCommand(url1);
|
||||
});
|
||||
}
|
||||
}
|
||||
29
Models/Test_Feac.cs
Normal file
29
Models/Test_Feac.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using SqlSugar;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace UI.Lib
|
||||
{
|
||||
public class Test_Feac
|
||||
{
|
||||
public static SqlSugarScope Db = new SqlSugarScope(new ConnectionConfig()
|
||||
{
|
||||
DbType = SqlSugar.DbType.MySql,
|
||||
ConnectionString = "Server=blv-cloud-db.mysql.rds.aliyuncs.com;Database=Face;Uid=blv_rcu;Pwd=fnadiaJDIJ7546;charset=utf8;port=3307;",
|
||||
IsAutoCloseConnection = true
|
||||
},
|
||||
db =>
|
||||
{
|
||||
//db.DbMaintenance.CreateDatabase(); //个别数据库不支持
|
||||
//Type[] types = Assembly
|
||||
//.LoadFrom($@"D:\BLV_SYNC\RD_WEB\SynologyDrive\欧阳磊\Faces\Face.Web\bin\Face.Domain.dll")//如果 .dll报错,可以换成 xxx.exe 有些生成的是exe
|
||||
//.GetTypes().Where(it => it.FullName.Contains("Face.Domain.Application.FaceAll."))//命名空间过滤,当然你也可以写其他条件过滤
|
||||
//.ToArray();//断点调试一下是不是需要的Type,不是需要的在进行过滤
|
||||
// db.CodeFirst.SetStringDefaultLength(200).InitTables(types);//根据types创建表
|
||||
//单例参数配置,所有上下文生效
|
||||
db.Aop.OnLogExecuting = (s, p) =>
|
||||
{
|
||||
Debug.WriteLine(s);
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
196
Models/View/ViewInit.cs
Normal file
196
Models/View/ViewInit.cs
Normal file
@@ -0,0 +1,196 @@
|
||||
using Models.ModelItems;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.View
|
||||
{
|
||||
public class ViewInit
|
||||
{
|
||||
#region 用户基本信息视图 userinfo
|
||||
static readonly string userinfo = @"
|
||||
create view View_UserInfo
|
||||
as
|
||||
select a.*,d.OrganizationName,c.OrgId,Authoncount = (select count(*) from UserAuthoes where UserAuthoes.UserId = a.Id) from UserInfo a
|
||||
left join
|
||||
OrgUsers c
|
||||
on c.UserId = a.Id
|
||||
left join
|
||||
Organization d
|
||||
on
|
||||
c.OrgId = d.Id --WHERE a.Id IS NOT NULL and d.Id is not null";
|
||||
#endregion
|
||||
#region 用户-用户组权限信息 view_uoa
|
||||
static readonly string view_uoa = @"
|
||||
create view View_UOA
|
||||
as
|
||||
select distinct u.Id,u.Uid ,HotelId,
|
||||
OrgId = o.id,
|
||||
o.OrganizationName,
|
||||
Orgdesc = o.[Desc] ,
|
||||
AppId = app.id,
|
||||
app.AppName,
|
||||
AppDesc = app.[Desc],
|
||||
AuthorityId =a.Id,
|
||||
a.AuthorityName,
|
||||
AuthDesc = a.[Desc] ,
|
||||
oa.AuthotypeId,
|
||||
AstName = ast.Name,
|
||||
AstDesc = ast.[Desc],
|
||||
Sfjc = (select count(*) from UserAuthoes where UserId = u.Id and AuthorityId = a.Id and AuthotypeId = oa.AuthotypeId and HotelId = oa.HotelId)
|
||||
from UserInfo u
|
||||
left join OrgUsers ou
|
||||
on u.id = ou.UserId
|
||||
left join Organization o
|
||||
on ou.OrgId = o.Id
|
||||
left join OrgAuthority oa
|
||||
on o.Id = oa.OrgId
|
||||
left join Authority a
|
||||
on a.Id = oa.AuthorityId
|
||||
left join AppAutho aa
|
||||
on a.Id = aa.AuthorityId
|
||||
left join ApplicationDomain app
|
||||
on aa.AppId = app.Id
|
||||
left join AuthoStatusType ast
|
||||
on oa.AuthotypeId = ast.Id
|
||||
where ou.OrgId is not null
|
||||
and oa.AuthorityId is not null
|
||||
";
|
||||
#endregion
|
||||
# region 用户权限基本信息 view_ua
|
||||
static readonly string view_ua = @"
|
||||
create view View_UA
|
||||
as
|
||||
select Id = ui.id ,HotelId,
|
||||
Uid ,
|
||||
AppId = app.id,
|
||||
app.AppName,
|
||||
a.AuthorityName,
|
||||
AppDesc = app.[Desc],
|
||||
AuthorityId = a.Id,
|
||||
AuthDesc = a.[Desc] ,
|
||||
ua.AuthotypeId,
|
||||
AstName = ast.Name,
|
||||
AstDesc = ast.[Desc]
|
||||
from UserInfo ui
|
||||
left join
|
||||
UserAuthoes ua
|
||||
on ui.id = ua.UserId
|
||||
left join AppAutho aa
|
||||
on ua.AuthorityId = aa.AuthorityId
|
||||
left join ApplicationDomain app
|
||||
on aa.AppId = app.Id
|
||||
left join Authority a
|
||||
on a.Id = ua.AuthorityId
|
||||
left join AuthoStatusType ast
|
||||
on ua.AuthotypeId = ast.Id
|
||||
where ua.UserId is not null";
|
||||
#endregion
|
||||
#region 应用权限 view_AppAutho
|
||||
static readonly string view_AppAutho = @"
|
||||
create view View_AppAutho
|
||||
as
|
||||
select AppId = APP.Id,
|
||||
AppName = app.AppName,
|
||||
AppDesc = app.[Desc],
|
||||
AuthorityId,
|
||||
AuthorityName,
|
||||
IsValid,
|
||||
AuthorityDesc = auth.[Desc]
|
||||
from ApplicationDomain app left join AppAutho aa on app.Id = aa.AppId left join Authority auth on aa.AuthorityId = auth.id where aa.AuthorityId is not null
|
||||
";
|
||||
#endregion
|
||||
#region 触发器
|
||||
static readonly string org = @"if exists(select * from sys.triggers where name='trigger_OrgAuthority_update')
|
||||
--删除DML触发器
|
||||
begin
|
||||
drop trigger trigger_OrgAuthority_update;
|
||||
end
|
||||
go
|
||||
--用户组更改权限
|
||||
create trigger trigger_OrgAuthority_update
|
||||
on OrgAuthority
|
||||
for update
|
||||
as
|
||||
declare @AuthotypeIdnew int; --从临时表Inserted记录新的ID
|
||||
declare @AuthotypeIdold int; --从临时表Delete记录更新以前旧的ID
|
||||
declare @AuthoId int; --从临时表Inserted记录权限ID
|
||||
declare @OrgId int; --从临时表Inserted记录用户组ID
|
||||
select @AuthotypeIdold = AuthotypeId
|
||||
from deleted;
|
||||
select @AuthotypeIdnew = AuthotypeId,@AuthoId = AuthorityId,@OrgId = OrgId
|
||||
from inserted;
|
||||
if update(AuthotypeId)
|
||||
begin
|
||||
update UserAuthoes set AuthotypeId = @AuthotypeIdnew where AuthorityId = @AuthoId and AuthotypeId = @AuthotypeIdold and UserId in (select UserId from OrgUsers where OrgId = @OrgId)
|
||||
print @@ROWCOUNT
|
||||
end;
|
||||
go
|
||||
if exists(select * from sys.triggers where name='trigger_OrgAuthority_del')
|
||||
begin
|
||||
drop trigger trigger_OrgAuthority_del;
|
||||
end
|
||||
go
|
||||
--用户组权限删除触发器
|
||||
create trigger trigger_OrgAuthority_del
|
||||
on OrgAuthority
|
||||
for delete
|
||||
as
|
||||
declare @AuthotypeIdold int; --从临时表Delete记录更新以前旧的ID
|
||||
declare @AuthoId int; --从临时表Inserted记录权限ID
|
||||
declare @OrgId int; --从临时表Inserted记录用户组ID
|
||||
select @AuthotypeIdold = AuthotypeId, @AuthoId = AuthorityId,@OrgId = OrgId
|
||||
from deleted;
|
||||
delete UserAuthoes where AuthorityId = @AuthoId and AuthotypeId = @AuthotypeIdold and UserId in (select UserId from OrgUsers where OrgId = @OrgId)
|
||||
print @@ROWCOUNT
|
||||
go
|
||||
--用户组新增权限
|
||||
if exists(select * from sys.triggers where name='trigger_OrgAuthority_Insert')
|
||||
begin
|
||||
drop trigger trigger_OrgAuthority_Insert;
|
||||
end
|
||||
go
|
||||
create trigger trigger_OrgAuthority_Insert
|
||||
on OrgAuthority
|
||||
for insert
|
||||
as
|
||||
declare @AuthotypeIdnew int; --从临时表Inserted记录新的ID
|
||||
declare @AuthoId int; --从临时表Inserted记录权限ID
|
||||
declare @OrgId int; --从临时表Inserted记录用户组ID
|
||||
select @AuthotypeIdnew = AuthotypeId,@AuthoId = AuthorityId,@OrgId = OrgId
|
||||
from inserted;
|
||||
insert into UserAuthoes(AuthorityId,AuthotypeId,UserId) select @AuthoId,@AuthotypeIdnew,UserId from OrgUsers where OrgId = @OrgId
|
||||
print @@ROWCOUNT
|
||||
go
|
||||
";
|
||||
#endregion
|
||||
public static void Init(AuthorityDB dB)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (dB.OrgUsers.Count() > 0)
|
||||
return;
|
||||
var context = dB;
|
||||
|
||||
string drop = @"Drop Table View_UserInfo;
|
||||
Drop Table View_UOA;
|
||||
Drop Table View_AppAutho;
|
||||
Drop Table View_UA;";
|
||||
dB.Database.ExecuteSqlCommand(drop);
|
||||
dB.Database.ExecuteSqlCommand(userinfo);
|
||||
dB.Database.ExecuteSqlCommand(view_ua);
|
||||
dB.Database.ExecuteSqlCommand(view_uoa);
|
||||
dB.Database.ExecuteSqlCommand(view_AppAutho);
|
||||
//dB.Database.ExecuteSqlCommand(org);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
File.AppendAllText(AppContext.BaseDirectory+"\\view.txt", ex.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
18
Models/View/View_AppAutho.cs
Normal file
18
Models/View/View_AppAutho.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Models.View
|
||||
{
|
||||
[Table("View_AppAutho")]
|
||||
public class View_AppAutho
|
||||
{
|
||||
[Key]
|
||||
public int AppId { get; set; }
|
||||
public string AppName { get; set; }
|
||||
public string AppDesc { get; set; }
|
||||
public int AuthorityId { get; set; }
|
||||
public string AuthorityName { get; set; }
|
||||
public string AuthorityDesc { get; set; }
|
||||
public int IsValid { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
61
Models/View/View_MAClog.cs
Normal file
61
Models/View/View_MAClog.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.View
|
||||
{
|
||||
public class View_MAClog
|
||||
{
|
||||
public int Id { get; set; }
|
||||
/// <summary>
|
||||
/// 酒店ID
|
||||
/// </summary>
|
||||
public int HotelID { get; set; }
|
||||
/// <summary>
|
||||
/// 房间号
|
||||
/// </summary>
|
||||
public string roomNumber { get; set; }
|
||||
public string roomID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public int Status { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 操作ID 同一次操作可能多次结果
|
||||
/// </summary>
|
||||
public int ActionId { get; set; }
|
||||
/// <summary>
|
||||
/// 新的MAC
|
||||
/// </summary>
|
||||
public string MAC { get; set; }
|
||||
//操作者用户ID
|
||||
public int userid { get; set; }
|
||||
/// <summary>
|
||||
/// 用户昵称
|
||||
/// </summary>
|
||||
public string uid { get; set; }
|
||||
/// <summary>
|
||||
/// 酒店名
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// 酒店id
|
||||
/// </summary>
|
||||
public int Hotelsid { get; set; }
|
||||
/// <summary>
|
||||
/// 操作日志 0 新增 1 解绑
|
||||
/// </summary>
|
||||
public int type { get; set; }
|
||||
/// <summary>
|
||||
/// 地址
|
||||
/// </summary>
|
||||
public string location { get; set; }
|
||||
public string Ip { get; set; }
|
||||
public DateTime createtime { get; set; } = default;
|
||||
public int AppType { get; set; } = 0; // 0 表示 rcu主机 1表示人脸机
|
||||
|
||||
}
|
||||
}
|
||||
22
Models/View/View_UA.cs
Normal file
22
Models/View/View_UA.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Models.View
|
||||
{
|
||||
[Table("View_UA")]
|
||||
public class View_UA
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Uid { get; set; }
|
||||
public int AppId { get; set; }
|
||||
public string AppName { get; set; }
|
||||
public string AppDesc { get; set; }
|
||||
public int AuthorityId { get; set; }
|
||||
public string AuthorityName { get; set; } = "";
|
||||
public string AuthDesc { get; set; }
|
||||
public int AuthotypeId { get; set; }
|
||||
public string AstName { get; set; }
|
||||
public string AstDesc { get; set; }
|
||||
public int HotelId { get; set; }
|
||||
public int IsValid { get; set; }
|
||||
}
|
||||
}
|
||||
26
Models/View/View_UOA.cs
Normal file
26
Models/View/View_UOA.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Models.View
|
||||
{
|
||||
[Table("View_UOA")]
|
||||
public class View_UOA
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Uid { get; set; }
|
||||
public int OrgId { get; set; }
|
||||
public string OrganizationName { get; set; } = "";
|
||||
public string Orgdesc { get; set; }
|
||||
public int AppId { get; set; }
|
||||
public string AppName { get; set; }
|
||||
public string AppDesc { get; set; }
|
||||
public int AuthorityId { get; set; }
|
||||
public string AuthorityName { get; set; }
|
||||
public string AuthDesc { get; set; }
|
||||
public int AuthotypeId { get; set; }
|
||||
public string AstName { get; set; }
|
||||
public string AstDesc { get; set; }
|
||||
public int Sfjc { get; set; }
|
||||
public int HotelId { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
71
Models/View/View_UserInfo.cs
Normal file
71
Models/View/View_UserInfo.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models.View
|
||||
{
|
||||
[Table("View_UserInfo")]
|
||||
public class View_UserInfo
|
||||
{
|
||||
public int Id { get; set; }
|
||||
/// <summary>
|
||||
/// 用户标识(账号)
|
||||
/// </summary>
|
||||
public string Uid { get; set; }
|
||||
|
||||
public string Hotel_Data { get; set; }
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
public string Pwd { get; set; }
|
||||
/// <summary>
|
||||
/// 性别 0-3 0 男 1 女 2 未知 3 预留待定 默认0
|
||||
/// </summary>
|
||||
public int Sex { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 年龄 默认18
|
||||
/// </summary>
|
||||
public int? Age { get; set; } = 18;
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
public string CreatedBy { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 是否可用 0 可用 其他不可
|
||||
/// </summary>
|
||||
public int IsValid { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 用户用户组
|
||||
/// </summary>
|
||||
public string OrganizationName { get; set; }
|
||||
/// <summary>
|
||||
/// 权限数量
|
||||
/// </summary>
|
||||
public int Authoncount { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public DateTime? EndTime { get; set; } = DateTime.Now.AddMonths(2);
|
||||
|
||||
/// <summary>
|
||||
/// 说明
|
||||
/// </summary>
|
||||
public string Desc { get; set; }
|
||||
public string HeadImg { get; set; } = "default.png";
|
||||
public DateTime CreateTime { get; set; }
|
||||
public int? OrgId { get; set; }
|
||||
public int? HotelID { get; set; } = 0;
|
||||
public int? HotelGroupID { get; set; } = 0;
|
||||
public int IsImport { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 公司 0 宝来威 1 住好 2 卓豪
|
||||
/// </summary>
|
||||
public int? Company { get; set; }
|
||||
public int Autho { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
74
Models/ViewMessageModel.cs
Normal file
74
Models/ViewMessageModel.cs
Normal file
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Models
|
||||
{
|
||||
public class ReturnResult
|
||||
{
|
||||
public int Status { get; set; }
|
||||
public dynamic Message { get; set; }
|
||||
}
|
||||
public class ReturnResult<TData> : ReturnResult
|
||||
{
|
||||
public TData Data { get; set; }
|
||||
}
|
||||
public class Search
|
||||
{
|
||||
public string value { get; set; }
|
||||
//public dynamic Message { get; set; }
|
||||
}
|
||||
public partial class DeviceManage
|
||||
{
|
||||
/// <summary>
|
||||
/// id
|
||||
/// </summary>
|
||||
public int Facelid { get; set; }
|
||||
/// <summary>
|
||||
/// sn号
|
||||
/// </summary>
|
||||
public string SerialNo { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public Nullable<System.DateTime> CreatedDate { get; set; }
|
||||
/// <summary>
|
||||
/// 酒店id
|
||||
/// </summary>
|
||||
public string HotelCode { get; set; }
|
||||
/// <summary>
|
||||
/// 房间ID
|
||||
/// </summary>
|
||||
public Nullable<int> RoomId { get; set; }
|
||||
/// <summary>
|
||||
/// 人脸机厂家
|
||||
/// </summary>
|
||||
public string Factory { get; set; }
|
||||
/// <summary>
|
||||
/// 人脸机状态
|
||||
/// </summary>
|
||||
public bool Status { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 绑定时间
|
||||
/// </summary>
|
||||
public Nullable<System.DateTime> bindingDate { get; set; }
|
||||
/// <summary>
|
||||
/// 绑定状态
|
||||
/// </summary>
|
||||
public bool bindingStatus { get; set; }
|
||||
/// <summary>
|
||||
/// ip地址
|
||||
/// </summary>
|
||||
public string faceIp { get; set; }
|
||||
/// <summary>
|
||||
/// 地理位置
|
||||
/// </summary>
|
||||
public string faceAddress { get; set; }
|
||||
/// <summary>
|
||||
/// 维修状态
|
||||
/// </summary>
|
||||
public Nullable<int> maintainStatus { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
16
Models/packages.config
Normal file
16
Models/packages.config
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="BouncyCastle" version="1.8.5" targetFramework="net461" />
|
||||
<package id="EntityFramework" version="6.2.0" targetFramework="net461" />
|
||||
<package id="EntityFramework.zh-Hans" version="6.2.0" targetFramework="net461" />
|
||||
<package id="Google.Protobuf" version="3.19.4" targetFramework="net461" />
|
||||
<package id="K4os.Compression.LZ4" version="1.2.6" targetFramework="net461" />
|
||||
<package id="K4os.Compression.LZ4.Streams" version="1.2.6" targetFramework="net461" />
|
||||
<package id="K4os.Hash.xxHash" version="1.0.6" targetFramework="net461" />
|
||||
<package id="MySql.Data" version="8.0.29" targetFramework="net461" requireReinstallation="true" />
|
||||
<package id="SqlSugar" version="5.0.9" targetFramework="net461" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net461" />
|
||||
<package id="System.Memory" version="4.5.4" targetFramework="net461" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net461" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user