feat(data): rename *.Services projects, lift TrackEntity onto BlazorBlocks data layer, regenerate initial Postgres migration
DeepDrftWeb.Services → DeepDrftData; DeepDrftContent.Services → DeepDrftContent.Data. TrackEntity:BaseEntity, TrackRepository:Repository<>, TrackManager:Manager<>+ITrackService. Drops DeepDrftModels PagingParameters/PagedResult in favour of Models.Common.* from BlazorBlocks. InitialCreate migration captures full schema including is_deleted index.
This commit is contained in:
@@ -1,13 +1,21 @@
|
||||
namespace DeepDrftModels.DTOs;
|
||||
using Models.Models;
|
||||
|
||||
public class TrackDto
|
||||
namespace DeepDrftModels.DTOs;
|
||||
|
||||
// Inherits Id, CreatedAt, UpdatedAt from BaseModel (Cerebellum.BlazorBlocks.Models).
|
||||
// BlazorBlocks's Manager<> generic constraint requires `new()` on the model type, which
|
||||
// disqualifies `required` properties (the `new()` constraint and required members do not
|
||||
// compose). EntryKey/TrackName/Artist therefore drop `required` here — the TrackEntity
|
||||
// side remains required, and TrackConverter assigns every field on the round-trip so an
|
||||
// empty default is never observable in production code paths.
|
||||
public class TrackDto : BaseModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public required string EntryKey { get; set; }
|
||||
public required string TrackName { get; set; }
|
||||
public required string Artist { get; set; }
|
||||
public string EntryKey { get; set; } = string.Empty;
|
||||
public string TrackName { get; set; } = string.Empty;
|
||||
public string Artist { get; set; } = string.Empty;
|
||||
public string? Album { get; set; }
|
||||
public string? Genre { get; set; }
|
||||
public DateOnly? ReleaseDate { get; set; }
|
||||
public string? ImagePath { get; set; }
|
||||
}
|
||||
public long? CreatedByUserId { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user