Compare commits
No commits in common. "1f0c002ca4e6329a41d82c5e36ea8e27978b506f" and "520aaac302bcdaaa2f0de299f98fe887f795923d" have entirely different histories.
1f0c002ca4
...
520aaac302
|
|
@ -92,8 +92,6 @@ namespace WGShare.API.Controllers
|
|||
btnAutn.Add(new Claim("account", user.Account));
|
||||
btnAutn.Add(new Claim("uname", user.UserName));
|
||||
btnAutn.Add(new Claim("ssid", user.ScreenShareId));
|
||||
btnAutn.Add(new Claim("year", user.Year.ToString()));
|
||||
btnAutn.Add(new Claim("subject", ((int)user.Subject).ToString()));
|
||||
|
||||
// 获取已登录的token
|
||||
var tokens = RedisHelper.Instance.Get<AccessAndRefreshToken>(RedisKeyConstant.Data.GetAccessTokenKey(user.Id));
|
||||
|
|
@ -167,8 +165,6 @@ namespace WGShare.API.Controllers
|
|||
btnAutn.Add(new Claim("account", user.Account));
|
||||
btnAutn.Add(new Claim("uname", user.UserName));
|
||||
btnAutn.Add(new Claim("ssid", user.ScreenShareId));
|
||||
btnAutn.Add(new Claim("year", user.Year.ToString()));
|
||||
btnAutn.Add(new Claim("subject", ((int)user.Subject).ToString()));
|
||||
|
||||
var accessToken = _jwtHelper.CreateToken(user.Id, btnAutn);
|
||||
var refreshTokenNew = Guid.NewGuid().ToString();
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ using WGShare.API.Controllers.Basic;
|
|||
using WGShare.API.Helpers;
|
||||
using WGShare.Domain.DTOs.User;
|
||||
using WGShare.Domain.Entities;
|
||||
using WGShare.Domain.Enums;
|
||||
using WGShare.Domain.FriendlyException;
|
||||
using WGShare.Domain.GeneralModel;
|
||||
using Yitter.IdGenerator;
|
||||
|
|
@ -194,14 +193,7 @@ namespace WGShare.API.Controllers.Backend
|
|||
x.Pwd = x.Pwd.MDString();
|
||||
x.ScreenShareId = UserShareIdHelper.GenerateUnique8DigitNumber();
|
||||
x.TenantId = tenantId;
|
||||
|
||||
var roleId = "2";
|
||||
if (x.RoleId == "管理员")
|
||||
roleId = "1";
|
||||
else if (x.RoleId == "房间管理员")
|
||||
roleId = "3";
|
||||
x.RoleId = roleId;
|
||||
x.Subject = x.SubjectName.GetEnumValueFromDescription<SubjectType>();
|
||||
x.RoleId = x.RoleId == "管理员" ? "1" : "2";
|
||||
});
|
||||
|
||||
await _sqlSugar.Insertable(users).ExecuteCommandAsync();
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ namespace WGShare.API.Controllers.Basic
|
|||
{
|
||||
throw Oops.Oh("用户信息有误,请重新登录");
|
||||
}
|
||||
|
||||
|
||||
return (RoleEnums)role;
|
||||
}
|
||||
}
|
||||
|
|
@ -111,43 +111,6 @@ namespace WGShare.API.Controllers.Basic
|
|||
}
|
||||
}
|
||||
|
||||
private int year = -1;
|
||||
public int Year
|
||||
{
|
||||
get
|
||||
{
|
||||
if (year >= 0)
|
||||
{
|
||||
return year;
|
||||
}
|
||||
|
||||
var year_str = HttpContext.User.Claims.FirstOrDefault(x => x.Type == "year").Value;
|
||||
if (string.IsNullOrWhiteSpace(year_str) || !int.TryParse(year_str, out year))
|
||||
{
|
||||
throw Oops.Oh("用户信息有误,请重新登录");
|
||||
}
|
||||
return year;
|
||||
}
|
||||
}
|
||||
|
||||
private int subject = -1;
|
||||
public SubjectType Subject
|
||||
{
|
||||
get
|
||||
{
|
||||
if (subject >= 0)
|
||||
{
|
||||
return (SubjectType)subject;
|
||||
}
|
||||
|
||||
var subject_str = HttpContext.User.Claims.FirstOrDefault(x => x.Type == "subject").Value;
|
||||
if (string.IsNullOrWhiteSpace(subject_str) || !int.TryParse(subject_str, out subject))
|
||||
{
|
||||
throw Oops.Oh("用户信息有误,请重新登录");
|
||||
}
|
||||
return (SubjectType)subject;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,8 +63,6 @@ namespace WGShare.API.Controllers.Frontend
|
|||
|
||||
var list = await _sqlSugar.Queryable<Room>()
|
||||
.Where(x => x.TenantId == TenantId && x.IsDelete == false)
|
||||
.WhereIF(Year > 0 && RoleId == RoleEnums.User, x => x.Year == Year || x.Year == 0)
|
||||
.WhereIF(Subject > 0 && RoleId == RoleEnums.User, x => x.Subject == Subject || x.Subject == 0)
|
||||
.OrderBy(x => x.Id, OrderByType.Desc)
|
||||
.ToPageListAsync(dto.PageIndex, dto.PageSize, total);
|
||||
|
||||
|
|
@ -109,19 +107,6 @@ namespace WGShare.API.Controllers.Frontend
|
|||
return await _sqlSugar.Insertable(entity).ExecuteCommandAsync() > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新会议室信息
|
||||
/// </summary>
|
||||
/// <param name="inputDTO"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut("room-info")]
|
||||
public async Task<bool> ModifyRoom([FromBody] RoomInfoInputDTO inputDTO)
|
||||
{
|
||||
var entity = inputDTO.Adapt<Room>();
|
||||
return await _sqlSugar.Updateable(entity)
|
||||
.UpdateColumns(x => new { x.Year, x.Subject })
|
||||
.ExecuteCommandHasChangeAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除会议室
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ using WGShare.Domain.Entities;
|
|||
using WGShare.Domain.FriendlyException;
|
||||
using WGShare.Domain.GeneralModel;
|
||||
using Yitter.IdGenerator;
|
||||
using WGShare.Domain.Enums;
|
||||
|
||||
namespace WGShare.API.Controllers.Frontend
|
||||
{
|
||||
|
|
@ -62,9 +61,7 @@ namespace WGShare.API.Controllers.Frontend
|
|||
Account = u.Account,
|
||||
RoleId = r.Id,
|
||||
RoleName = r.RoleName,
|
||||
ScreenShareId = u.ScreenShareId,
|
||||
Subject = u.Subject,
|
||||
Year = u.Year,
|
||||
ScreenShareId = u.ScreenShareId
|
||||
})
|
||||
.ToPageListAsync(pagedBaseDto.PageIndex, pagedBaseDto.PageSize, total);
|
||||
|
||||
|
|
@ -112,7 +109,7 @@ namespace WGShare.API.Controllers.Frontend
|
|||
}
|
||||
|
||||
return await _sqlSugar.Updateable(entity)
|
||||
.UpdateColumns(x => new { x.Account, x.UserName, x.RoleId, x.Year, x.Subject }).ExecuteCommandAsync() > 0;
|
||||
.UpdateColumns(x => new { x.Account, x.UserName, x.RoleId }).ExecuteCommandAsync() > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -129,21 +126,6 @@ namespace WGShare.API.Controllers.Frontend
|
|||
.UpdateColumns(x => new { x.Pwd }).ExecuteCommandAsync() > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量修改用户信息
|
||||
/// </summary>
|
||||
/// <param name="inputDTO"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut("bth")]
|
||||
public async Task<bool> BatchModifyUsers([FromBody] List<UserBatchUpdateDTO> updateDTOs)
|
||||
{
|
||||
var entity = updateDTOs.Adapt<List<User>>();
|
||||
|
||||
return await _sqlSugar.Updateable(entity)
|
||||
.UpdateColumns(x => new { x.Subject, x.Year }).ExecuteCommandAsync() > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除用户
|
||||
/// </summary>
|
||||
|
|
@ -231,7 +213,7 @@ namespace WGShare.API.Controllers.Frontend
|
|||
else if (x.RoleId == "房间管理员")
|
||||
roleId = "3";
|
||||
x.RoleId = roleId;
|
||||
x.Subject = x.SubjectName.GetEnumValueFromDescription<SubjectType>();
|
||||
|
||||
});
|
||||
|
||||
await _sqlSugar.Insertable(users).ExecuteCommandAsync();
|
||||
|
|
@ -239,7 +221,5 @@ namespace WGShare.API.Controllers.Frontend
|
|||
return Ok((isSuccess: true, url: "", msg: "导入成功"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using MiniExcelLibs;
|
||||
using SqlSugar;
|
||||
using System.ComponentModel;
|
||||
using System.Configuration;
|
||||
using System.Reflection;
|
||||
using System.Security.Claims;
|
||||
using System.Text.RegularExpressions;
|
||||
using WGShare.API.Controllers.Basic;
|
||||
|
|
@ -13,7 +11,6 @@ using WGShare.API.Helpers;
|
|||
using WGShare.Domain.DTOs.Login;
|
||||
using WGShare.Domain.DTOs.User;
|
||||
using WGShare.Domain.Entities;
|
||||
using WGShare.Domain.Enums;
|
||||
using WGShare.Domain.FriendlyException;
|
||||
|
||||
namespace WGShare.API.Controllers
|
||||
|
|
@ -41,33 +38,5 @@ namespace WGShare.API.Controllers
|
|||
{
|
||||
return await _sqlSugar.Queryable<Role>().Where(x => x.IsDelete == false).ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 科目列表下拉框
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("sub-dp-list"), AllowAnonymous]
|
||||
public async Task<List<SubjectInfo>> GetSubjectDropDownList()
|
||||
{
|
||||
var list = new List<SubjectInfo>();
|
||||
foreach (SubjectType subject in Enum.GetValues(typeof(SubjectType)))
|
||||
{
|
||||
var description = GetEnumDescription(subject);
|
||||
list.Add(new SubjectInfo { Value = (int)subject, Name = description });
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
private string GetEnumDescription(Enum value)
|
||||
{
|
||||
FieldInfo fi = value.GetType().GetField(value.ToString());
|
||||
DescriptionAttribute[] attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false);
|
||||
|
||||
if (attributes != null && attributes.Length > 0)
|
||||
return attributes[0].Description;
|
||||
else
|
||||
return value.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
using System.ComponentModel;
|
||||
using System.Reflection;
|
||||
using WGShare.Domain.DTOs.User;
|
||||
using WGShare.Domain.Enums;
|
||||
|
||||
namespace WGShare.API.Helpers
|
||||
{
|
||||
|
|
@ -13,38 +10,5 @@ namespace WGShare.API.Helpers
|
|||
var customAttribute = Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute));
|
||||
return customAttribute == null ? val.ToString() : ((DescriptionAttribute)customAttribute).Description;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据描述获取枚举
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="description"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="ArgumentException"></exception>
|
||||
public static T GetEnumValueFromDescription<T>(this string description) where T : Enum
|
||||
{
|
||||
description = description.Trim();
|
||||
foreach (var field in typeof(T).GetFields())
|
||||
{
|
||||
if (Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute)) is DescriptionAttribute attribute)
|
||||
{
|
||||
if (attribute.Description == description)
|
||||
{
|
||||
return (T)field.GetValue(null);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (field.Name == description)
|
||||
{
|
||||
return (T)field.GetValue(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new ArgumentException($"No matching enum value found for description: {description}", nameof(description));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,13 +102,6 @@
|
|||
<param name="inputDTO"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WGShare.API.Controllers.Frontend.HomeController.ModifyRoom(WGShare.Domain.DTOs.Room.RoomInfoInputDTO)">
|
||||
<summary>
|
||||
更新会议室信息
|
||||
</summary>
|
||||
<param name="inputDTO"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WGShare.API.Controllers.Frontend.HomeController.DeleteRoom(System.String)">
|
||||
<summary>
|
||||
删除会议室
|
||||
|
|
@ -322,13 +315,6 @@
|
|||
<param name="inputDTO"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WGShare.API.Controllers.Frontend.UserController.BatchModifyUsers(System.Collections.Generic.List{WGShare.Domain.DTOs.User.UserBatchUpdateDTO})">
|
||||
<summary>
|
||||
批量修改用户信息
|
||||
</summary>
|
||||
<param name="inputDTO"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WGShare.API.Controllers.Frontend.UserController.Delete(System.String[])">
|
||||
<summary>
|
||||
删除用户
|
||||
|
|
@ -354,12 +340,6 @@
|
|||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WGShare.API.Controllers.PublicController.GetSubjectDropDownList">
|
||||
<summary>
|
||||
科目列表下拉框
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="F:WGShare.API.Helpers.AgoraHelper.Constant.REDIS_CHANNEL_USERCOUNT">
|
||||
<summary>
|
||||
Redis 键,hash ,每个频道用户数量
|
||||
|
|
@ -414,15 +394,6 @@
|
|||
<param name="jsTimestamp">JavaScript 时间戳(以秒为单位)。</param>
|
||||
<returns>对应的本地时间的 DateTime 对象。</returns>
|
||||
</member>
|
||||
<member name="M:WGShare.API.Helpers.EnumExtensions.GetEnumValueFromDescription``1(System.String)">
|
||||
<summary>
|
||||
根据描述获取枚举
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="description"></param>
|
||||
<returns></returns>
|
||||
<exception cref="T:System.ArgumentException"></exception>
|
||||
</member>
|
||||
<member name="M:WGShare.API.Helpers.OssHelper.GetUploadUrl(System.String,System.String,System.UInt32)">
|
||||
<summary>
|
||||
获取上传url
|
||||
|
|
|
|||
|
|
@ -4,48 +4,21 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WGShare.Domain.Enums;
|
||||
using Yitter.IdGenerator;
|
||||
|
||||
namespace WGShare.Domain.DTOs.Room
|
||||
{
|
||||
public class RoomInputDTO : RoomInfoInputDTO
|
||||
{
|
||||
public class RoomInputDTO
|
||||
{
|
||||
/// <summary>
|
||||
/// 会议室名称
|
||||
///</summary>
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "room_name")]
|
||||
public string RoomName { get; set; }
|
||||
/// <summary>
|
||||
/// 会议号
|
||||
///</summary>
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "room_num")]
|
||||
public string RoomNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 届
|
||||
///</summary>
|
||||
public int Year { get; set; }
|
||||
/// <summary>
|
||||
/// 科目
|
||||
///</summary>
|
||||
public SubjectType Subject { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class RoomInfoInputDTO
|
||||
{
|
||||
public string Id { get; set; }
|
||||
/// <summary>
|
||||
/// 届
|
||||
///</summary>
|
||||
public int Year { get; set; }
|
||||
/// <summary>
|
||||
/// 科目
|
||||
///</summary>
|
||||
public SubjectType Subject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 会议室名称
|
||||
/// </summary>
|
||||
public string RoomName { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WGShare.Domain.Enums;
|
||||
using Yitter.IdGenerator;
|
||||
|
||||
namespace WGShare.Domain.DTOs.Room
|
||||
|
|
@ -25,14 +24,5 @@ namespace WGShare.Domain.DTOs.Room
|
|||
/// 在线人数
|
||||
/// </summary>
|
||||
public long OnlineUserCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 届
|
||||
///</summary>
|
||||
public int Year { get; set; }
|
||||
/// <summary>
|
||||
/// 科目
|
||||
///</summary>
|
||||
public SubjectType Subject { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WGShare.Domain.DTOs.User
|
||||
{
|
||||
public class SubjectInfo
|
||||
{
|
||||
public int Value { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WGShare.Domain.Entities;
|
||||
using WGShare.Domain.Enums;
|
||||
|
||||
namespace WGShare.Domain.DTOs.User
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户批量修改信息
|
||||
/// </summary>
|
||||
public class UserBatchUpdateDTO
|
||||
{
|
||||
public string Id { get; set; }
|
||||
|
||||
public int Year { get; set; }
|
||||
public SubjectType Subject { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -29,16 +29,6 @@ namespace WGShare.Domain.DTOs.User
|
|||
///</summary>
|
||||
[ExcelColumnName("角色")]
|
||||
public string RoleId{ get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[ExcelColumnName("届")]
|
||||
public int Year { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[ExcelColumnName("科目")]
|
||||
public string SubjectName { get; set; }
|
||||
|
||||
|
||||
[ExcelColumnName("导入结果")]
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WGShare.Domain.Enums;
|
||||
|
||||
namespace WGShare.Domain.DTOs.User
|
||||
{
|
||||
|
|
@ -32,15 +31,5 @@ namespace WGShare.Domain.DTOs.User
|
|||
/// 租户id
|
||||
///</summary>
|
||||
public string? TenantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 届
|
||||
/// </summary>
|
||||
public int Year { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 科目
|
||||
/// </summary>
|
||||
public SubjectType Subject { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WGShare.Domain.Enums;
|
||||
|
||||
namespace WGShare.Domain.DTOs.User
|
||||
{
|
||||
|
|
@ -30,15 +29,5 @@ namespace WGShare.Domain.DTOs.User
|
|||
/// 共享屏幕ID
|
||||
/// </summary>
|
||||
public string ScreenShareId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 届
|
||||
/// </summary>
|
||||
public int Year { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 科目
|
||||
/// </summary>
|
||||
public SubjectType Subject { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using SqlSugar;
|
||||
using WGShare.Domain.Enums;
|
||||
using Yitter.IdGenerator;
|
||||
namespace WGShare.Domain.Entities
|
||||
{
|
||||
|
|
@ -50,17 +49,5 @@ namespace WGShare.Domain.Entities
|
|||
///</summary>
|
||||
[SugarColumn(ColumnName = "room_num")]
|
||||
public string RoomNum { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 届
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "year")]
|
||||
public int Year { get; set; }
|
||||
/// <summary>
|
||||
/// 科目
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "subject")]
|
||||
public SubjectType Subject { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using SqlSugar;
|
||||
using WGShare.Domain.Enums;
|
||||
using Yitter.IdGenerator;
|
||||
namespace WGShare.Domain.Entities
|
||||
{
|
||||
|
|
@ -70,22 +69,6 @@ namespace WGShare.Domain.Entities
|
|||
[SugarColumn(ColumnName = "screen_share_id", IsOnlyIgnoreUpdate = true)]
|
||||
public string ScreenShareId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 届
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "year")]
|
||||
public int Year { get; set; }
|
||||
/// <summary>
|
||||
/// 科目
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "subject")]
|
||||
public SubjectType Subject { get; set; }
|
||||
/// <summary>
|
||||
/// 科目名称
|
||||
///</summary>
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string SubjectName { get; set; }
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string RoleName { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,68 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WGShare.Domain.Enums
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum SubjectType
|
||||
{
|
||||
/// <summary>
|
||||
/// 全部科目
|
||||
/// </summary>
|
||||
[Description("全部科目")]
|
||||
All = 0,
|
||||
/// <summary>
|
||||
/// 语文
|
||||
/// </summary>
|
||||
[Description("语文")]
|
||||
Chinese = 1,
|
||||
/// <summary>
|
||||
/// 数学
|
||||
/// </summary>
|
||||
[Description("数学")]
|
||||
Math = 2,
|
||||
/// <summary>
|
||||
/// 英语
|
||||
/// </summary>
|
||||
[Description("英语")]
|
||||
English = 3,
|
||||
/// <summary>
|
||||
/// 物理
|
||||
/// </summary>
|
||||
[Description("物理")]
|
||||
Physical = 4,
|
||||
/// <summary>
|
||||
/// 化学
|
||||
/// </summary>
|
||||
[Description("化学")]
|
||||
Chemical = 5,
|
||||
/// <summary>
|
||||
/// 生物
|
||||
/// </summary>
|
||||
[Description("生物")]
|
||||
Biological = 6,
|
||||
/// <summary>
|
||||
/// 政治
|
||||
/// </summary>
|
||||
[Description("政治")]
|
||||
Political = 7,
|
||||
/// <summary>
|
||||
/// 历史
|
||||
/// </summary>
|
||||
[Description("历史")]
|
||||
History = 8,
|
||||
/// <summary>
|
||||
/// 地理
|
||||
/// </summary>
|
||||
[Description("地理")]
|
||||
Geographic = 9
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue