添加项目文件。
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoRepository;
|
||||
using MongoRepository.Attributes;
|
||||
using MongoRepository.Config;
|
||||
|
||||
namespace Domain.Admin.Admin
|
||||
{
|
||||
[BsonCollection("admin_operation_log", ServiceDatabases.Admin)]
|
||||
[BsonIgnoreExtraElements]
|
||||
public class AdminOperationLog : MongoBaseEntity
|
||||
{
|
||||
[BsonElement("adminid")]
|
||||
public string? AdminId { get; set; }
|
||||
|
||||
[BsonElement("adminname")]
|
||||
public string? AdminName { get; set; }
|
||||
|
||||
[BsonElement("module")]
|
||||
public int Module { get; set; }
|
||||
|
||||
[BsonElement("actiontype")]
|
||||
public string? ActionType { get; set; }
|
||||
|
||||
[BsonElement("description")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
[BsonElement("httpmethod")]
|
||||
public string? HttpMethod { get; set; }
|
||||
|
||||
[BsonElement("requestpath")]
|
||||
public string? RequestPath { get; set; }
|
||||
|
||||
[BsonElement("requestparams")]
|
||||
public string? RequestParams { get; set; }
|
||||
|
||||
[BsonElement("response")]
|
||||
public string? Response { get; set; }
|
||||
|
||||
[BsonElement("ip")]
|
||||
public string? Ip { get; set; }
|
||||
|
||||
[BsonElement("status")]
|
||||
public int Status { get; set; } = 1;
|
||||
|
||||
[BsonElement("operatetime")]
|
||||
[BsonDateTimeOptions(Kind = DateTimeKind.Local, DateOnly = false)]
|
||||
public DateTime OperateTime { get; set; } = DateTime.Now;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Domain.Admin.Admin.ENum
|
||||
{
|
||||
public enum EnumNavigationCategory
|
||||
{
|
||||
[Description("后台菜单")]
|
||||
System,
|
||||
|
||||
[Description("前台菜单")]
|
||||
Customer
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Domain.Admin.Admin.ENum
|
||||
{
|
||||
public enum EnumOperationModule
|
||||
{
|
||||
[Description("用户管理")]
|
||||
User = 1,
|
||||
|
||||
[Description("系统用户")]
|
||||
SystemUser = 2,
|
||||
|
||||
[Description("角色管理")]
|
||||
Role = 3,
|
||||
|
||||
[Description("菜单管理")]
|
||||
Navigation = 4,
|
||||
|
||||
[Description("字典管理")]
|
||||
Dictionary = 5,
|
||||
|
||||
[Description("游戏配置")]
|
||||
GameConfig = 6,
|
||||
|
||||
[Description("房间管理")]
|
||||
Room = 7,
|
||||
|
||||
[Description("客服管理")]
|
||||
Customer = 8,
|
||||
|
||||
[Description("靓号管理")]
|
||||
BeautifulNumber = 9,
|
||||
|
||||
[Description("公告管理")]
|
||||
Notice = 10,
|
||||
|
||||
[Description("任务管理")]
|
||||
Task = 11,
|
||||
|
||||
[Description("其他")]
|
||||
Other = 99
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Domain.Admin.Admin.ENum
|
||||
{
|
||||
|
||||
public enum EnumResource
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Description("菜单")]
|
||||
Navigation,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Description("资源")]
|
||||
Resource,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Description("代码块")]
|
||||
Block
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Domain.Admin.Admin;
|
||||
|
||||
namespace Domain.Admin.Admin
|
||||
{
|
||||
public interface IAdminOperationLogService
|
||||
{
|
||||
Task<bool> AddLog(AdminOperationLog log);
|
||||
|
||||
Task<(List<AdminOperationLog> list, long count)> QueryPage(Param.OperationLogQueryParam param);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
namespace Domain.Admin.Admin.Param
|
||||
{
|
||||
public class OperationLogQueryParam
|
||||
{
|
||||
public int PageIndex { get; set; } = 1;
|
||||
|
||||
public int PageSize { get; set; } = 20;
|
||||
|
||||
public string? AdminId { get; set; }
|
||||
|
||||
public string? AdminName { get; set; }
|
||||
|
||||
public int? Module { get; set; }
|
||||
|
||||
public DateTime? StartTime { get; set; }
|
||||
|
||||
public DateTime? EndTime { get; set; }
|
||||
|
||||
public int? Status { get; set; }
|
||||
}
|
||||
|
||||
public class AddOperationLogParam
|
||||
{
|
||||
public string? AdminId { get; set; }
|
||||
|
||||
public string? AdminName { get; set; }
|
||||
|
||||
public int Module { get; set; }
|
||||
|
||||
public string? ActionType { get; set; }
|
||||
|
||||
public string? Description { get; set; }
|
||||
|
||||
public string? HttpMethod { get; set; }
|
||||
|
||||
public string? RequestPath { get; set; }
|
||||
|
||||
public string? RequestParams { get; set; }
|
||||
|
||||
public string? Response { get; set; }
|
||||
|
||||
public string? Ip { get; set; }
|
||||
|
||||
public int Status { get; set; } = 1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoRepository;
|
||||
using MongoRepository.Attributes;
|
||||
using MongoRepository.Config;
|
||||
|
||||
namespace Domain.Admin.Admin
|
||||
{
|
||||
[BsonCollection("system_user_dic", ServiceDatabases.Admin)]
|
||||
[BsonIgnoreExtraElements]
|
||||
public class SystemDic :MongoBaseEntity
|
||||
{
|
||||
|
||||
public string ParentId { set; get; } = "";
|
||||
|
||||
[BsonElement("rolename")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
[BsonElement("order")]
|
||||
public int Order { get; set; }
|
||||
|
||||
[BsonElement("icon")]
|
||||
public string? Icon { get; set; }
|
||||
|
||||
[BsonElement("value")]
|
||||
public string? Value { get; set; }
|
||||
[BsonElement("code")]
|
||||
public string? Code { get; set; }
|
||||
|
||||
[BsonElement("remark")]
|
||||
public string? Remark { get; set; }
|
||||
|
||||
|
||||
|
||||
[BsonElement("remark1")]
|
||||
public string? Remark1 { get; set; }
|
||||
|
||||
public void Init()
|
||||
{
|
||||
Id = ObjectId.GenerateNewId().ToString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using Domain.Admin.Admin.ENum;
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoRepository;
|
||||
using MongoRepository.Attributes;
|
||||
using MongoRepository.Config;
|
||||
|
||||
namespace Domain.Admin.Admin
|
||||
{
|
||||
[BsonCollection("system_user_nav", ServiceDatabases.Admin)]
|
||||
[BsonIgnoreExtraElements]
|
||||
public class SystemNavigation :MongoBaseEntity
|
||||
{
|
||||
|
||||
[BsonElement("parentId")]
|
||||
public string ParentId { set; get; } = "";
|
||||
|
||||
[BsonElement("name")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
[BsonElement("order")]
|
||||
public int Order { get; set; }
|
||||
|
||||
[BsonElement("icon")]
|
||||
public string? Icon { get; set; }
|
||||
|
||||
[BsonElement("url")]
|
||||
public string? Url { get; set; }
|
||||
|
||||
[BsonElement("category")]
|
||||
public EnumNavigationCategory Category { get; set; }
|
||||
|
||||
[BsonElement("target")]
|
||||
public string? Target { get; set; }
|
||||
|
||||
[BsonElement("isresource")]
|
||||
public EnumResource IsResource { get; set; }
|
||||
public void Init()
|
||||
{
|
||||
Id = ObjectId.GenerateNewId().ToString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using Common.CommonModel;
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoRepository;
|
||||
using MongoRepository.Attributes;
|
||||
using MongoRepository.Config;
|
||||
|
||||
namespace Domain.Admin.Admin
|
||||
{
|
||||
[BsonCollection("system_user", ServiceDatabases.Admin)]
|
||||
[BsonIgnoreExtraElements]
|
||||
public class SystemUser:MongoBaseEntity
|
||||
{
|
||||
[BsonElement("username")]
|
||||
public string? UserName { get; set; }
|
||||
|
||||
|
||||
[BsonElement("displayname")]
|
||||
public string? DisplayName { get; set; }
|
||||
|
||||
[BsonElement("icon")]
|
||||
public string? Icon { get; set; }
|
||||
|
||||
[BsonElement("password")]
|
||||
public string? Password { get; set; }
|
||||
|
||||
|
||||
[BsonElement("registertime")]
|
||||
[BsonDateTimeOptions(Kind = DateTimeKind.Local, DateOnly = false)]
|
||||
public DateTime RegisterTime { get; set; } = DateTime.Now;
|
||||
|
||||
[BsonElement("state")]
|
||||
public int State { get; set; } = 1;
|
||||
|
||||
[BsonElement("systemrole")]
|
||||
public BaseIdName SystemRole { get; set; }
|
||||
|
||||
|
||||
public void Init()
|
||||
{
|
||||
Id = ObjectId.GenerateNewId().ToString();
|
||||
State = 1;
|
||||
RegisterTime=DateTime.Now;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoRepository;
|
||||
using MongoRepository.Attributes;
|
||||
using MongoRepository.Config;
|
||||
|
||||
namespace Domain.Admin.Admin
|
||||
{
|
||||
[BsonCollection("system_user_role", ServiceDatabases.Admin)]
|
||||
[BsonIgnoreExtraElements]
|
||||
public class SystemUserRole:MongoBaseEntity
|
||||
{
|
||||
[BsonElement("rolename")]
|
||||
public string? RoleName { get; set; }
|
||||
|
||||
[BsonElement("description")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
|
||||
[BsonElement("navIds")]
|
||||
public List<string> NavIds { get; set; } = new List<string>();
|
||||
|
||||
public void Init()
|
||||
{
|
||||
Id = ObjectId.GenerateNewId().ToString();
|
||||
NavIds = new List<string>();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user