新增 蓝鲸字库 订阅节点接口

调整 Core项目的枚举路径
This commit is contained in:
小肥羊 2025-03-05 16:31:28 +08:00
parent 977faaef75
commit 1e4d7ac5f6
40 changed files with 484 additions and 328 deletions

View File

@ -1,12 +1,13 @@
@page "/"
@using AntDesign
@using AntDesign.TableModels
@using System.ComponentModel.DataAnnotations
@using Learn.VideoAnalysis.Controllers.Dto
@using SqlSugar
@using VideoAnalysisCore.Model
@using VideoAnalysisCore.Model.Dto
@using VideoAnalysisCore.Enum
@ using AntDesign
@ using AntDesign.TableModels
@ using System.ComponentModel.DataAnnotations
@ using Learn.VideoAnalysis.Controllers.Dto
@ using SqlSugar
@ using VideoAnalysisCore.Model
@ using VideoAnalysisCore.Model.Dto
@ using VideoAnalysisCore.Enum;
using VideoAnalysisCore.Model.Enum
<Table @ref="_table" Loading="tableLoading" TItem="VideoTaskDto" ScrollY="600px" PageSize="10" Total="_total" DataSource="_dataSource"
OnRowClick="(r)=>r.Expanded = !r.Expanded"

View File

@ -9,9 +9,9 @@ using SqlSugar;
using System.Linq.Expressions;
using System.Threading.Tasks;
using VideoAnalysisCore.Common;
using VideoAnalysisCore.Enum;
using VideoAnalysisCore.Model;
using VideoAnalysisCore.Model.Dto;
using VideoAnalysisCore.Model.Enum;
namespace Learn.VideoAnalysis.Components.Pages
{

View File

@ -9,6 +9,7 @@ using UserCenter.Model.Enum;
using VideoAnalysisCore.AICore.GPT.ChatGPT;
using VideoAnalysisCore.AICore.GPT;
using System.Text.Json;
using VideoAnalysisCore.Model.Enum;
namespace Learn.VideoAnalysis.Controllers
{
@ -83,7 +84,7 @@ namespace Learn.VideoAnalysis.Controllers
/// <param name="path">路径</param>
/// <returns></returns>
[HttpGet(Name = "fts_data")]
public async Task<IActionResult> FTS_Data(string path= "itn_subject_sx.fst")
public async Task<IActionResult> FTS_Data(string path = "itn_subject_sx.fst")
{
var hotwords = JsonSerializer
.Deserialize<HotwordMode[]>(System.IO.File.ReadAllText(Path.Combine(AppCommon.AIModelFile, "Hotwords.json")));
@ -134,7 +135,7 @@ namespace Learn.VideoAnalysis.Controllers
/// <param name="msg"></param>
/// <returns></returns>
[HttpPost(Name = "TestInsertChannel")]
public IActionResult TestInsertChannel(int @enum=1, string msg= "1")
public IActionResult TestInsertChannel(int @enum = 1, string msg = "1")
{
RedisExpand.InsertChannel(@enum.ToEnum<RedisChannelEnum>().Value
, msg);
@ -151,7 +152,7 @@ namespace Learn.VideoAnalysis.Controllers
{
if (!ModelState.IsValid) return BadRequest(ModelState);
if(await videoTaskDB.IsAnyAsync(s=>s.TagId == req.TagId) )
if (await videoTaskDB.IsAnyAsync(s => s.TagId == req.TagId))
return BadRequest("重复添加");
// 自动映射属性到哈希
var task = new VideoTask()
@ -176,26 +177,6 @@ namespace Learn.VideoAnalysis.Controllers
}
/// <summary>
/// 蓝鲸智库_添加文件节点监控
/// </summary>
/// <param name="req">请求体</param>
/// <returns></returns>
[HttpPost(Name = "ZY_NodeMonitoring")]
public async Task<IActionResult> ZY_NodeMonitoring(NodeMonitoringReq req)
{
//if (!ModelState.IsValid) return BadRequest(ModelState);
//入库
//task.Id = await videoTaskDB.InsertReturnBigIdentityAsync(task);
//var hashEntries = task.GetType()
// .GetProperties(BindingFlags.Public | BindingFlags.Instance)
// .ToDictionary(s => s.Name, s => s.GetValue(task));
//RedisExpand.Redis.HMSet(RedisExpandKey.Task(task.Id), hashEntries);
//RedisExpand.Redis.LPush(RedisExpandKey.ChannelKey, task.Id);
return Ok();
}

View File

@ -3,7 +3,7 @@ using SqlSugar;
using System.ComponentModel.DataAnnotations;
using UserCenter.Model.Enum;
using VideoAnalysisCore.AICore.GPT.Dto;
using VideoAnalysisCore.Enum;
using VideoAnalysisCore.Model.Enum;
namespace Learn.VideoAnalysis.Controllers.Dto
{
@ -16,15 +16,11 @@ namespace Learn.VideoAnalysis.Controllers.Dto
/// 媒体路径
/// </summary>
[Required(ErrorMessage = "文件节点ID是必填项")]
public string NodeId { get; set; } = string.Empty;
public long NodeId { get; set; }
/// <summary>
/// 任务类型
/// </summary>
public TaskTypeEnum? Type { get; set; }
/// <summary>
/// 自定义值 任务完成后附带通知
/// </summary>
public string Tag { get; set; } = string.Empty;
}
/// <summary>

View File

@ -0,0 +1,74 @@
using VideoAnalysisCore.Common;
using Microsoft.AspNetCore.Mvc;
using System.Reflection;
using MapsterMapper;
using Mapster;
using VideoAnalysisCore.AICore.SherpaOnnx;
using UserCenter.Model.Enum;
using VideoAnalysisCore.AICore.GPT.ChatGPT;
using VideoAnalysisCore.AICore.GPT;
using System.Text.Json;
using Microsoft.AspNetCore.Authorization;
using VideoAnalysisCore.Model.Enum;
namespace Learn.VideoAnalysis.Controllers
{
/// <summary>
/// 蓝鲸字库接口
/// </summary>
[ApiController]
[Route("LJZK/[action]")]
public class LJZK_Controller : ControllerBase
{
private readonly ILogger<LJZK_Controller> _logger;
private readonly IMapper mp;
private readonly Repository<NodeSubscription> nodesubscriptionDB;
private readonly IBserGPT chatGPT;
public LJZK_Controller(ILogger<LJZK_Controller> logger,
IMapper mp, IBserGPT chatGPT, Repository<NodeSubscription> nodesubscriptionDB)
{
_logger = logger;
this.mp = mp;
this.chatGPT = chatGPT;
this.nodesubscriptionDB = nodesubscriptionDB;
}
/// <summary>
/// 蓝鲸智库_添加文件节点监控
/// </summary>
/// <param name="req">请求体</param>
/// <returns></returns>
[HttpPost(Name = "NodeSubscription")]
public async Task<IActionResult> NodeSubscription(NodeMonitoringReq req)
{
if (nodesubscriptionDB.IsAny(s => s.NodeId == req.NodeId))
return BadRequest("重复添加了节点监控任务" + req.NodeId);
var res = await nodesubscriptionDB.InsertReturnEntityAsync(new NodeSubscription()
{
NodeId = req.NodeId,
TaskType = req.Type ?? default
});
return Ok(res);
}
/// <summary>
/// 获取任务类型
/// </summary>
/// <returns></returns>
[HttpGet(Name = "TaskTypList")]
public IActionResult TaskType()
{
Type type = typeof(TaskTypeEnum);
return Ok(Enum.GetValues(type).Cast<object>()
.Select(s => new { Text = s.ToString(), Value = (int)s }));
}
}
}

View File

@ -43,7 +43,7 @@
"DB": {
"ConnectionString": "AllowLoadLocalInfile=true;Server=192.168.2.9;User ID=root;Password=qwe123!@#;Port=3306;Database=learn.videoanalysis;CharSet=utf8mb4;pooling=true;SslMode=None",
"SqlType": "MySql",
"UpdateTable": false
"UpdateTable": true
},
"OtherDBArr": [
{

View File

@ -8,6 +8,7 @@ using System.Xml.Linq;
using System.Runtime.InteropServices;
using SqlSugar.IOC;
using VideoAnalysisCore.Model;
using VideoAnalysisCore.Model.Enum;
namespace VideoAnalysisCore.AICore.FFMPGE
{
@ -85,7 +86,7 @@ namespace VideoAnalysisCore.AICore.FFMPGE
{
Console.WriteLine("转换完成=>" + e.Output.Name);
//加入下一队列
RedisExpand.InsertChannel(Enum.RedisChannelEnum.ParsingCaptions, Task);
RedisExpand.InsertChannel(RedisChannelEnum.ParsingCaptions, Task);
}
}
}

View File

@ -3,7 +3,6 @@ using System.Text.Json;
using VideoAnalysisCore.Model;
using System.Text;
using System.ComponentModel.DataAnnotations;
using VideoAnalysisCore.Enum;
using System.Reflection;
using VideoAnalysisCore.Model.Dto;
using VideoAnalysisCore.AICore.GPT.Dto;
@ -11,6 +10,7 @@ using VideoAnalysisCore.AICore.GPT;
using System.Threading.Tasks;
using VideoAnalysisCore.AICore.SherpaOnnx;
using VideoAnalysisCore.Model.;
using VideoAnalysisCore.Model.Enum;
namespace VideoAnalysisCore.AICore.GPT.ChatGPT
{

View File

@ -3,7 +3,6 @@ using System.Text.Json;
using VideoAnalysisCore.Model;
using System.Text;
using System.ComponentModel.DataAnnotations;
using VideoAnalysisCore.Enum;
using System.Reflection;
using VideoAnalysisCore.Model.Dto;
using VideoAnalysisCore.AICore.GPT.Dto;
@ -11,6 +10,7 @@ using System.Threading.Tasks;
using VideoAnalysisCore.AICore.GPT.ChatGPT;
using VideoAnalysisCore.AICore.SherpaOnnx;
using VideoAnalysisCore.Model.;
using VideoAnalysisCore.Model.Enum;
namespace VideoAnalysisCore.AICore.GPT.DeepSeek
{

View File

@ -4,8 +4,8 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VideoAnalysisCore.Enum;
using VideoAnalysisCore.Model.Dto;
using VideoAnalysisCore.Model.Enum;
namespace VideoAnalysisCore.AICore.GPT.Dto
{

View File

@ -8,7 +8,6 @@ using System.Text;
using FFmpeg.NET.Services;
using Microsoft.Extensions.Primitives;
using System.ComponentModel.DataAnnotations;
using VideoAnalysisCore.Enum;
using System.Reflection;
using FreeRedis;
using VideoAnalysisCore.Model.Dto;
@ -17,6 +16,7 @@ using SqlSugar.IOC;
using VideoAnalysisCore.AICore.GPT.Dto;
using VideoAnalysisCore.AICore.GPT;
using VideoAnalysisCore.AICore.GPT.ChatGPT;
using VideoAnalysisCore.Model.Enum;
namespace VideoAnalysisCore.AICore.GPT.KIMI
{

View File

@ -12,6 +12,7 @@ using System.Text.RegularExpressions;
using System.Threading.Tasks;
using VideoAnalysisCore.Common;
using VideoAnalysisCore.Model;
using VideoAnalysisCore.Model.Enum;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace VideoAnalysisCore.AICore.SherpaOnnx
@ -267,7 +268,7 @@ namespace VideoAnalysisCore.AICore.SherpaOnnx
.Where(it => it.Id == long.Parse(task));
await RedisExpand.Redis.HMSetAsync(RedisExpandKey.Task(task), "Captions", res);
//RedisExpand.InsertChannel(Enum.RedisChannelEnum.ParsingSpeaker, task);
RedisExpand.InsertChannel(Enum.RedisChannelEnum.ChatModelAnalysis, task);
RedisExpand.InsertChannel(RedisChannelEnum.ChatModelAnalysis, task);
}
}

View File

@ -7,6 +7,7 @@ using SherpaOnnx;
using SqlSugar.IOC;
using VideoAnalysisCore.Model;
using System.Text.Json;
using VideoAnalysisCore.Model.Enum;
namespace VideoAnalysisCore.AICore.SherpaOnnx
{
@ -81,7 +82,7 @@ namespace VideoAnalysisCore.AICore.SherpaOnnx
.SetColumns(it => it.Speaker == speakerStr)
.Where(it => it.Id == long.Parse(task));
//加入下一队列
RedisExpand.InsertChannel(Enum.RedisChannelEnum.ChatModelAnalysis, task);
RedisExpand.InsertChannel(RedisChannelEnum.ChatModelAnalysis, task);
}
}

View File

@ -4,6 +4,7 @@ using System.Linq;
using Whisper.net;
using Whisper.net.Ggml;
using Whisper.net.Wave;
using VideoAnalysisCore.Model.Enum;
namespace VideoAnalysisCore.AICore.Whisper
{
@ -45,7 +46,7 @@ namespace VideoAnalysisCore.AICore.Whisper
res.Add(new WhisperResDto(segment));
}
RedisExpand.Redis.HMSet(RedisExpandKey.Task(task), "Captions", res);
RedisExpand.InsertChannel(Enum.RedisChannelEnum.ParsingSpeaker, task);
RedisExpand.InsertChannel(RedisChannelEnum.ParsingSpeaker, task);
}
/// <summary>
/// 检测语言的方法

View File

@ -15,10 +15,9 @@ using System.Text.RegularExpressions;
using System.Threading.Tasks;
using UserCenter.Model.Interface;
using VideoAnalysisCore.AICore.SherpaOnnx;
using VideoAnalysisCore.Enum;
using VideoAnalysisCore.Interface;
using VideoAnalysisCore.Model;
using VideoAnalysisCore.Model.Dto;
using VideoAnalysisCore.Model.Enum;
using VideoAnalysisCore.Model.Interface;
namespace VideoAnalysisCore.Common
{
@ -406,7 +405,9 @@ namespace VideoAnalysisCore.Common
/// 数据库配置
/// </summary>
public DBConfig DB { get; set; } = new DBConfig();
/// <summary>
/// 其他数据库配置
/// </summary>
public DBConfig[] OtherDBArr { get; set; } = Array.Empty<DBConfig>();
}

View File

@ -17,14 +17,14 @@ namespace VideoAnalysisCore.Common
{
service.AddScheduler();
service.AddTransient<UnprocessedVideoJob>();
service.AddTransient<NodeSubscriptionJob>();
}
public static void Run(IServiceProvider provider)
{
provider.UseScheduler(scheduler =>
{
//每5分钟执行一次 未处理视频扫描
scheduler.Schedule<UnprocessedVideoJob>().EveryFiveMinutes();
scheduler.Schedule<NodeSubscriptionJob>().EveryFiveMinutes();
});
}
}

View File

@ -8,6 +8,7 @@ using System.IO;
using System.Net;
using System.Threading.Tasks;
using VideoAnalysisCore.Model;
using VideoAnalysisCore.Model.Enum;
namespace VideoAnalysisCore.Common
{
@ -153,7 +154,7 @@ namespace VideoAnalysisCore.Common
else if (download.Status == DownloadStatus.Completed)
{
//加入下一队列
RedisExpand.InsertChannel(Enum.RedisChannelEnum.SeparateAudio, task);
RedisExpand.InsertChannel(RedisChannelEnum.SeparateAudio, task);
return;
}

View File

@ -17,9 +17,9 @@ using VideoAnalysisCore.AICore.GPT.Dto;
//using VideoAnalysisCore.AICore.FFMPGE;
using VideoAnalysisCore.AICore.SherpaOnnx;
using VideoAnalysisCore.AICore.Whisper;
using VideoAnalysisCore.Enum;
using VideoAnalysisCore.Model;
using VideoAnalysisCore.Model.Dto;
using VideoAnalysisCore.Model.Enum;
namespace VideoAnalysisCore.Common
{

View File

@ -1,13 +0,0 @@
namespace VideoAnalysisCore.Enum
{
/// <summary>
/// 得分类型
/// </summary>
public enum ScoreTypeEnum
{
=75,
=50,
=25,
=0,
}
}

View File

@ -0,0 +1,68 @@
using Coravel.Invocable;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VideoAnalysisCore.Common;
using VideoAnalysisCore.Model;
using VideoAnalysisCore.Model.;
namespace VideoAnalysisCore.Job
{
/// <summary>
/// [蓝鲸智库] 查找未处理的视频
/// </summary>
public class NodeSubscriptionJob : IInvocable
{
private readonly Repository<NodeSubscription> nodesubscriptionDB;
private readonly Repository<Attachments> attachmentsDB;
public NodeSubscriptionJob(Repository<Attachments> videoTaskDB, Repository<NodeSubscription> nodesubscriptionDB)
{
this.attachmentsDB = videoTaskDB;
this.nodesubscriptionDB = nodesubscriptionDB;
}
public async Task Invoke()
{
Console.WriteLine($"{DateTime.Now} Invoke=>{this.GetType().FullName}");
var tasks = await nodesubscriptionDB.GetListAsync(s => s.Enable);
foreach (var item in tasks)
{
var fileNodeId = item.NodeId;
var data = attachmentsDB.Context.Ado
.SqlQuery<Attachments>($"""
SELECT
*
FROM
Attachments
WHERE
Id IN (
SELECT
AttachmentsId
FROM
Material
WHERE
id IN (
SELECT
MaterialId
FROM
FileContentMaterial
WHERE
FileContentId IN ( SELECT id FROM FileContent WHERE BagId IN ( SELECT Id FROM FileDirectory WHERE Id={fileNodeId} AND types = 1 AND DeleteState = 0 ) )
AND DeleteState = 0
AND ( MaterialName NOT LIKE '%PPT%' OR MaterialName NOT LIKE '%ppt%' )
)
)
AND Type = ''
AND (
NAME NOT LIKE '%PPT%'
OR NAME NOT LIKE '%ppt%'
)
""");
}
}
}
}

View File

@ -1,28 +0,0 @@
using Coravel.Invocable;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VideoAnalysisCore.Common;
using VideoAnalysisCore.Model;
namespace VideoAnalysisCore.Job
{
/// <summary>
/// 查找未处理的视频
/// </summary>
public class UnprocessedVideoJob : IInvocable
{
private readonly Repository<VideoTask> videoTaskDB;
public UnprocessedVideoJob(Repository<VideoTask> videoTaskDB)
{
this.videoTaskDB = videoTaskDB;
}
public async Task Invoke()
{
}
}
}

View File

@ -6,7 +6,7 @@ using System.Net;
using UserCenter.Model.Enum;
using VideoAnalysisCore.AICore.SherpaOnnx;
using VideoAnalysisCore.Enum;
using VideoAnalysisCore.Interface;
using VideoAnalysisCore.Model.Interface;
using Whisper.net;
namespace VideoAnalysisCore.Model

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VideoAnalysisCore.Model
namespace VideoAnalysisCore.Model.Dto
{
public class HotwordMode
{

View File

@ -1,6 +1,6 @@
using AntDesign;
using VideoAnalysisCore.AICore.GPT.Dto;
using VideoAnalysisCore.Enum;
using VideoAnalysisCore.Model.Enum;
namespace VideoAnalysisCore.Model.Dto
{

View File

@ -6,9 +6,9 @@ using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VideoAnalysisCore.Enum;
using System.Text.Json;
using UserCenter.Model.Enum;
using VideoAnalysisCore.Model.Enum;
namespace VideoAnalysisCore.Model.Dto
{

View File

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VideoAnalysisCore.Enum
namespace VideoAnalysisCore.Model.Enum
{
public enum QuestionTypeEnum
{

View File

@ -1,4 +1,4 @@
namespace VideoAnalysisCore.Enum
namespace VideoAnalysisCore.Model.Enum
{
/// <summary>
/// redis 频道

View File

@ -0,0 +1,13 @@
namespace VideoAnalysisCore.Model.Enum
{
/// <summary>
/// 得分类型
/// </summary>
public enum ScoreTypeEnum
{
= 75,
= 50,
= 25,
= 0,
}
}

View File

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VideoAnalysisCore.Enum
namespace VideoAnalysisCore.Model.Enum
{
public enum TaskTypeEnum
{

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VideoAnalysisCore.Enum
namespace VideoAnalysisCore.Model.Enum
{
public enum TeacherAnswerTypeEnum
{

View File

@ -1,4 +1,4 @@
namespace VideoAnalysisCore.Enum
namespace VideoAnalysisCore.Model.Enum
{
/// <summary>
/// 时间线类型

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VideoAnalysisCore.Interface
namespace VideoAnalysisCore.Model.Interface
{
/// <summary>
/// 表属于IDB

View File

@ -0,0 +1,55 @@
using AntDesign;
using SqlSugar;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Net;
using UserCenter.Model.Enum;
using VideoAnalysisCore.AICore.SherpaOnnx;
using VideoAnalysisCore.Model.Enum;
using VideoAnalysisCore.Model.Interface;
using Whisper.net;
namespace VideoAnalysisCore.Model
{
/// <summary>
/// [蓝鲸智库]文件节点订阅
/// </summary>
[SugarTable("nodesubscription")]
public class NodeSubscription: IDB
{
/// <summary>
/// Id
/// </summary>
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
[DisplayName("编号")]
public long Id { get; set; }
/// <summary>
/// 文件节点Id
/// </summary>
[DisplayName("文件节点Id"), Required]
public long NodeId { get; set; }
/// <summary>
/// 绑定学科
/// </summary>
[DisplayName("绑定学科")]
public TaskTypeEnum TaskType { get; set; }
/// <summary>
/// 是否启用
/// </summary>
[DisplayName("是否启用")]
public bool Enable { get; set; } = true;
/// <summary>
/// 最后执行的id值
/// </summary>
[DisplayName("最后执行的id值")]
public long LastId { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[DisplayName("创建时间")]
public DateTime CreateTime { get; set; } =DateTime.Now;
}
}

View File

@ -6,7 +6,7 @@ using UserCenter.Model.Enum;
using VideoAnalysisCore.AICore.GPT.Dto;
using VideoAnalysisCore.AICore.SherpaOnnx;
using VideoAnalysisCore.Enum;
using VideoAnalysisCore.Interface;
using VideoAnalysisCore.Model.Interface;
using Whisper.net;
namespace VideoAnalysisCore.Model

View File

@ -5,8 +5,8 @@ using System.Text.Json;
using UserCenter.Model.Enum;
using VideoAnalysisCore.AICore.GPT.Dto;
using VideoAnalysisCore.AICore.SherpaOnnx;
using VideoAnalysisCore.Enum;
using VideoAnalysisCore.Interface;
using VideoAnalysisCore.Model.Enum;
using VideoAnalysisCore.Model.Interface;
using Whisper.net;
namespace VideoAnalysisCore.Model

View File

@ -4,7 +4,7 @@ using System.Text;
using SqlSugar;
using VideoAnalysisCore.Interface;
namespace App.Model
namespace VideoAnalysisCore.Model.
{
///<summary>
///文件附件
@ -16,10 +16,10 @@ namespace App.Model
public Attachments()
{
this.SchoolId = Convert.ToInt64("0");
this.Sort = Convert.ToInt32("0");
this.CreateTime = DateTime.Now;
this.DeleteState = false;
SchoolId = Convert.ToInt64("0");
Sort = Convert.ToInt32("0");
CreateTime = DateTime.Now;
DeleteState = false;
}
/// <summary>

View File

@ -4,7 +4,7 @@ using System.Text;
using SqlSugar;
using VideoAnalysisCore.Interface;
namespace App.Model
namespace VideoAnalysisCore.Model.
{
///<summary>
/// 文件内容表
@ -13,16 +13,17 @@ namespace App.Model
[Tenant("1002")]
public partial class FileContent
{
public FileContent(){
public FileContent()
{
this.Sort =Convert.ToInt32("0");
this.CreateTime =DateTime.Now;
this.DeleteState =false;
Sort = Convert.ToInt32("0");
CreateTime = DateTime.Now;
DeleteState = false;
}
[SugarColumn(IsPrimaryKey=true,IsIdentity=true)]
public long Id {get;set;}
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public long Id { get; set; }
/// <summary>
/// Desc:内容名称
@ -30,7 +31,7 @@ namespace App.Model
/// Nullable:False
/// </summary>
[SugarColumn(ColumnDescription = "内容名称", ColumnDataType = "nvarchar(500)", IsNullable = false)]
public string FileName {get;set;}
public string FileName { get; set; }
/// <summary>
/// Desc:
@ -38,7 +39,7 @@ namespace App.Model
/// Nullable:True
/// </summary>
[SugarColumn(ColumnDescription = "学校id", IsNullable = true)]
public long? SchoolId {get;set;}
public long? SchoolId { get; set; }
/// <summary>
/// Desc:
@ -46,7 +47,7 @@ namespace App.Model
/// Nullable:True
/// </summary>
[SugarColumn(ColumnDescription = "学校名称", ColumnDataType = "nvarchar(100)", IsNullable = true)]
public string SchoolName {get;set;}
public string SchoolName { get; set; }
/// <summary>
/// Desc:年级
@ -54,7 +55,7 @@ namespace App.Model
/// Nullable:True
/// </summary>
[SugarColumn(ColumnDescription = "年级", ColumnDataType = "nvarchar(30)", IsNullable = true)]
public string GradeName {get;set;}
public string GradeName { get; set; }
/// <summary>
/// Desc:科目
@ -63,7 +64,7 @@ namespace App.Model
/// </summary>
[SugarColumn(ColumnDescription = "科目", IsNullable = true)]
public int? SubjectId {get;set;}
public int? SubjectId { get; set; }
/// <summary>
/// Desc:
@ -71,7 +72,7 @@ namespace App.Model
/// Nullable:True
/// </summary>
[SugarColumn(ColumnDescription = "科目名称", ColumnDataType = "nvarchar(50)", IsNullable = true)]
public string SubjectName {get;set;}
public string SubjectName { get; set; }
/// <summary>
/// Desc:文件系统目录id
@ -79,7 +80,7 @@ namespace App.Model
/// Nullable:False
/// </summary>
[SugarColumn(ColumnDescription = "件系统目录id", IsNullable = false)]
public long FileDirectoryId {get;set;}
public long FileDirectoryId { get; set; }
/// <summary>
/// Desc:
@ -87,12 +88,12 @@ namespace App.Model
/// Nullable:False
/// </summary>
[SugarColumn(ColumnDescription = "排序", IsNullable = false, DefaultValue = "0")]
public int Sort {get;set;}
public int Sort { get; set; }
public DateTime CreateTime {get;set;}
public DateTime CreateTime { get; set; }
public bool DeleteState {get;set;}
public bool DeleteState { get; set; }
/// <summary>
/// Desc:文件包Id
@ -100,7 +101,7 @@ namespace App.Model
/// Nullable:False
/// </summary>
[SugarColumn(ColumnDescription = "文件包id", IsNullable = false)]
public long BagId {get;set;}
public long BagId { get; set; }
/// <summary>
/// Desc:作者
@ -108,7 +109,7 @@ namespace App.Model
/// Nullable:True
/// </summary>
[SugarColumn(ColumnDescription = "作者", ColumnDataType = "nvarchar(200)", IsNullable = true)]
public string Author {get;set;}
public string Author { get; set; }
/// <summary>
/// 是否可以下载

View File

@ -4,7 +4,7 @@ using System.Text;
using SqlSugar;
using VideoAnalysisCore.Interface;
namespace App.Model
namespace VideoAnalysisCore.Model.
{
///<summary>
///
@ -13,10 +13,11 @@ namespace App.Model
[Tenant("1002")]
public partial class FileContentMaterial
{
public FileContentMaterial(){
public FileContentMaterial()
{
this.CreateTime =DateTime.Now;
this.DeleteState =false;
CreateTime = DateTime.Now;
DeleteState = false;
}
/// <summary>
@ -24,36 +25,36 @@ namespace App.Model
/// Default:
/// Nullable:False
/// </summary>
[SugarColumn(IsPrimaryKey=true,IsIdentity=true)]
public long Id {get;set;}
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public long Id { get; set; }
/// <summary>
/// Desc:文件系统内容
/// Default:
/// Nullable:False
/// </summary>
public long FileContentId {get;set;}
public long FileContentId { get; set; }
/// <summary>
/// Desc:素材id
/// Default:
/// Nullable:False
/// </summary>
public long MaterialId {get;set;}
public long MaterialId { get; set; }
/// <summary>
/// Desc:
/// Default:DateTime.Now
/// Nullable:False
/// </summary>
public DateTime CreateTime {get;set;}
public DateTime CreateTime { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:False
/// </summary>
public bool DeleteState {get;set;}
public bool DeleteState { get; set; }
public int Sort { get; set; }

View File

@ -4,7 +4,7 @@ using System.Text;
using SqlSugar;
using VideoAnalysisCore.Interface;
namespace App.Model
namespace VideoAnalysisCore.Model.
{
///<summary>
/// 文件目录表
@ -13,22 +13,23 @@ namespace App.Model
[Tenant("1002")]
public partial class FileDirectory
{
public FileDirectory(){
public FileDirectory()
{
this.State =Convert.ToInt32("1");
this.IsCheckedSelect =true;
this.IsLastNode =false;
this.ParentId =Convert.ToInt64("0");
this.CreateTime =DateTime.Now;
this.DeleteState =false;
this.AliasName =Convert.ToString("");
this.IsPublic =false;
this.Types =Convert.ToInt32("-1");
this.Code =Convert.ToString("");
State = Convert.ToInt32("1");
IsCheckedSelect = true;
IsLastNode = false;
ParentId = Convert.ToInt64("0");
CreateTime = DateTime.Now;
DeleteState = false;
AliasName = Convert.ToString("");
IsPublic = false;
Types = Convert.ToInt32("-1");
Code = Convert.ToString("");
}
[SugarColumn(IsPrimaryKey=true,IsIdentity=true)]
public long Id {get;set;}
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public long Id { get; set; }
/// <summary>
/// Desc:名称
@ -36,7 +37,7 @@ namespace App.Model
/// Nullable:False
/// </summary>
[SugarColumn(ColumnDescription = "名称", ColumnDataType = "nvarchar(50)", IsNullable = false)]
public string Name {get;set;}
public string Name { get; set; }
/// <summary>
/// Desc:排序
@ -44,15 +45,15 @@ namespace App.Model
/// Nullable:False
/// </summary>
[SugarColumn(ColumnDescription = "排序", IsNullable = false)]
public int Sort {get;set;}
public int Sort { get; set; }
/// <summary>
/// Desc:结构状态 1=显示
/// Default:1
/// Nullable:False
/// </summary>
[SugarColumn(ColumnDescription = "结构状态 1=显示", IsNullable = false,DefaultValue ="1")]
public int State {get;set;}
[SugarColumn(ColumnDescription = "结构状态 1=显示", IsNullable = false, DefaultValue = "1")]
public int State { get; set; }
/// <summary>
/// Desc:是否自动授权
@ -60,7 +61,7 @@ namespace App.Model
/// Nullable:False
/// </summary>
[SugarColumn(ColumnDescription = "是否自动授权", IsNullable = false, DefaultValue = "1")]
public bool IsCheckedSelect {get;set;}
public bool IsCheckedSelect { get; set; }
/// <summary>
/// Desc:是否最后一级节点
@ -68,7 +69,7 @@ namespace App.Model
/// Nullable:False
/// </summary>
[SugarColumn(ColumnDescription = "是否最后一级节点", IsNullable = false, DefaultValue = "0")]
public bool IsLastNode {get;set;}
public bool IsLastNode { get; set; }
/// <summary>
/// Desc:上级id
@ -76,12 +77,12 @@ namespace App.Model
/// Nullable:False
/// </summary>
[SugarColumn(ColumnDescription = "上级id", IsNullable = false, DefaultValue = "0")]
public long ParentId {get;set;}
public long ParentId { get; set; }
public DateTime CreateTime {get;set;}
public DateTime CreateTime { get; set; }
public bool DeleteState {get;set;}
public bool DeleteState { get; set; }
/// <summary>
/// Desc:别名
@ -89,7 +90,7 @@ namespace App.Model
/// Nullable:False
/// </summary>
[SugarColumn(ColumnDescription = "别名", ColumnDataType = "nvarchar(50)", IsNullable = false)]
public string AliasName {get;set;}
public string AliasName { get; set; }
/// <summary>
/// Desc:是否公开
@ -97,7 +98,7 @@ namespace App.Model
/// Nullable:True
/// </summary>
[SugarColumn(ColumnDescription = "是否公开", IsNullable = true, DefaultValue = "0")]
public bool? IsPublic {get;set;}
public bool? IsPublic { get; set; }
/// <summary>
/// Desc:其他=-1目录=0,课程=1,章=2,节=3
@ -105,7 +106,7 @@ namespace App.Model
/// Nullable:True
/// </summary>
[SugarColumn(ColumnDescription = "其他=-1目录=0,课程=1,章=2,节=3", IsNullable = true, DefaultValue = "-1")]
public int? Types {get;set;}
public int? Types { get; set; }
/// <summary>
/// Desc:
@ -113,7 +114,7 @@ namespace App.Model
/// Nullable:True
/// </summary>
[SugarColumn(ColumnDescription = "更新时间", IsNullable = true)]
public DateTime? UpdateTime {get;set;}
public DateTime? UpdateTime { get; set; }
/// <summary>
/// Desc:课程id来源courseinfo
@ -121,7 +122,7 @@ namespace App.Model
/// Nullable:True
/// </summary>
[SugarColumn(ColumnDescription = "课程id来源courseinfo", IsNullable = true)]
public long? CourseId {get;set;}
public long? CourseId { get; set; }
/// <summary>
/// Desc:教材版本id来源 textboox_versions
@ -129,7 +130,7 @@ namespace App.Model
/// Nullable:True
/// </summary>
[SugarColumn(ColumnDescription = "教材版本id来源 textboox_versions", IsNullable = true)]
public long? VersionsId {get;set;}
public long? VersionsId { get; set; }
/// <summary>
/// Desc:
@ -137,7 +138,7 @@ namespace App.Model
/// Nullable:True
/// </summary>
[SugarColumn(ColumnDescription = "", ColumnDataType = "nvarchar(50)", IsNullable = true)]
public string Code {get;set;}
public string Code { get; set; }
/// <summary>
/// Desc:根节点id
@ -145,7 +146,7 @@ namespace App.Model
/// Nullable:True
/// </summary>
[SugarColumn(ColumnDescription = "根节点id", IsNullable = true)]
public long? RootId {get;set;}
public long? RootId { get; set; }
/// <summary>
/// 管理员id
/// </summary>

View File

@ -4,7 +4,7 @@ using System.Text;
using SqlSugar;
using VideoAnalysisCore.Interface;
namespace App.Model
namespace VideoAnalysisCore.Model.
{
///<summary>
///素材表
@ -16,10 +16,10 @@ namespace App.Model
public Material()
{
this.TagId = Convert.ToInt64("0");
this.CreateTime = DateTime.Now;
this.DeleteState = false;
this.DownState = false;
TagId = Convert.ToInt64("0");
CreateTime = DateTime.Now;
DeleteState = false;
DownState = false;
}
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
@ -46,7 +46,7 @@ namespace App.Model
/// Default:0
/// Nullable:False
/// </summary>
[SugarColumn(ColumnDescription = "素标签Id", IsNullable = false,DefaultValue ="0")]
[SugarColumn(ColumnDescription = "素标签Id", IsNullable = false, DefaultValue = "0")]
public long TagId { get; set; }
/// <summary>
@ -62,7 +62,7 @@ namespace App.Model
/// Default:
/// Nullable:False
/// </summary>
[SugarColumn(ColumnDescription = "附件id",IsNullable = false)]
[SugarColumn(ColumnDescription = "附件id", IsNullable = false)]
public long AttachmentsId { get; set; }
/// <summary>
@ -88,10 +88,10 @@ namespace App.Model
/// Default:
/// Nullable:False
/// </summary>
[SugarColumn(ColumnDescription = "新增用户名称",ColumnDataType = "nvarchar(50)")]
[SugarColumn(ColumnDescription = "新增用户名称", ColumnDataType = "nvarchar(50)")]
public string CreateUserName { get; set; }
[SugarColumn(ColumnDescription = "学校id",IsNullable =true)]
[SugarColumn(ColumnDescription = "学校id", IsNullable = true)]
public long SchoolId { get; set; }
[SugarColumn(ColumnDescription = "学校名称", ColumnDataType = "nvarchar(50)", IsNullable = true)]
@ -99,12 +99,12 @@ namespace App.Model
/// <summary>
/// 是否可以下载
/// </summary>
[SugarColumn(ColumnDescription = "是否可以下载", DefaultValue ="0")]
[SugarColumn(ColumnDescription = "是否可以下载", DefaultValue = "0")]
public bool DownState { get; set; }
/// <summary>
/// 新增用户角色id
/// </summary>
[SugarColumn(ColumnDescription = "新增用户角色id",IsNullable =true)]
[SugarColumn(ColumnDescription = "新增用户角色id", IsNullable = true)]
public long AdminRoleId { get; set; }
}
}