Implement media storage and processing features: update configuration in .env.example and appsettings files, enhance Docker setup for media storage, and add media-related services and database entities. Include ffmpeg for media handling and adjust Kestrel settings for large file uploads.
This commit is contained in:
@@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using TeleWave.Application.Common.Interfaces;
|
||||
using TeleWave.Domain.Auth;
|
||||
using TeleWave.Domain.Media;
|
||||
using TeleWave.Infrastructure.Identity;
|
||||
|
||||
namespace TeleWave.Infrastructure.Persistence;
|
||||
@@ -15,6 +16,7 @@ public class AppDbContext(DbContextOptions<AppDbContext> options)
|
||||
IAppDbContext
|
||||
{
|
||||
public DbSet<RefreshToken> RefreshTokens => Set<RefreshToken>();
|
||||
public DbSet<MediaAsset> MediaAssets => Set<MediaAsset>();
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using TeleWave.Domain.Media;
|
||||
|
||||
namespace TeleWave.Infrastructure.Persistence.Configurations;
|
||||
|
||||
public class MediaAssetConfiguration : IEntityTypeConfiguration<MediaAsset>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<MediaAsset> builder)
|
||||
{
|
||||
builder.Property(x => x.OriginalFileName).IsRequired().HasMaxLength(512);
|
||||
builder.Property(x => x.OriginalExtension).IsRequired().HasMaxLength(16);
|
||||
builder.Property(x => x.VideoCodec).HasMaxLength(32);
|
||||
builder.Property(x => x.AudioCodec).HasMaxLength(32);
|
||||
builder.Property(x => x.RelativePath).HasMaxLength(256);
|
||||
builder.Property(x => x.ErrorMessage).HasMaxLength(2048);
|
||||
|
||||
builder.HasIndex(x => x.Status);
|
||||
builder.HasIndex(x => x.CreatedAt);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user