FileShare/FileShare-EFCore/Migrations/SQLite/20260522082814_AutoMigration_20260522162758.cs
luoqian 2c20f9bb54 feat: 视频缩略图生成、最近文件面板与前端视图重构
- 新增 VideoThumbnailService,基于 ffmpeg 截取视频缩略图,ffprobe 提取时长
  - 新增 ManagedThumbnailMap 模型及多数据库迁移,存储缩略图元数据
  - 新增 /api/thumbnails/{id} 缩略图流端点
  - 新增最近添加/最近播放 API 与前端面板,支持列表/网格双视图切换
  - FileRecordDto 扩展 thumbnailUrl、videoDuration、lastPlayedAt 字段
  - 前端新增文件库 Tab 导航、卡片网格视图、视频海报与时长信息栏
  - 添加文件库目录不再同步全量扫描,改为后台异步自动扫描
2026-05-22 17:01:49 +08:00

60 lines
1.8 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FileShare_EFCore.Migrations.SQLite
{
/// <inheritdoc />
public partial class AutoMigration_20260522162758 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "last-played-at",
table: "managed-file-record",
type: "TEXT",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "thumbnail-path",
table: "managed-file-record",
type: "TEXT",
maxLength: 512,
nullable: true);
migrationBuilder.AddColumn<double>(
name: "video-duration",
table: "managed-file-record",
type: "REAL",
nullable: true);
migrationBuilder.CreateIndex(
name: "idx-managed-file-record-last-played-at",
table: "managed-file-record",
column: "last-played-at");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "idx-managed-file-record-last-played-at",
table: "managed-file-record");
migrationBuilder.DropColumn(
name: "last-played-at",
table: "managed-file-record");
migrationBuilder.DropColumn(
name: "thumbnail-path",
table: "managed-file-record");
migrationBuilder.DropColumn(
name: "video-duration",
table: "managed-file-record");
}
}
}