Add prompt marketplace interactions and profile prompt tabs

This commit is contained in:
nachbaisabel committed 2026-05-30 21:13:25 +02:00
1 parent 691bc72681
commit c95319b1fe
20 files changed
+734 -146

No files matched your search

@@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace OnlyPrompt.Backend.Database.Models
{
public class PromptLikeModel
{
[ForeignKey(nameof(Prompt))]
public Guid PromptId { get; set; }
public virtual PromptModel Prompt { get; set; }
[ForeignKey(nameof(User))]
public Guid UserId { get; set; }
public virtual UserModel User { get; set; }
}
}
@@ -25,13 +25,11 @@ namespace OnlyPrompt.Backend.Database.Models
[MaxLength(200)]
public required string Title { get; set; }
[MaxLength(4000)]
public required string Prompt { get; set; }
[MaxLength(1000)]
public required string Description { get; set; }
[MaxLength(4000)]
public string? ExampleOutput { get; set; }
public string? ExampleImageUrl { get; set; }
@@ -48,5 +46,7 @@ namespace OnlyPrompt.Backend.Database.Models
[DeleteBehavior(DeleteBehavior.SetNull)]
public virtual SubscriptionTierModel? SubscriptionTier { get; set; }
public virtual IList<ReviewModel> Reviews { get; set; } = new List<ReviewModel>();
public virtual IList<PromptLikeModel> Likes { get; set; } = new List<PromptLikeModel>();
public virtual IList<PromptSaveModel> Saves { get; set; } = new List<PromptSaveModel>();
}
}
@@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace OnlyPrompt.Backend.Database.Models
{
public class PromptSaveModel
{
[ForeignKey(nameof(Prompt))]
public Guid PromptId { get; set; }
public virtual PromptModel Prompt { get; set; }
[ForeignKey(nameof(User))]
public Guid UserId { get; set; }
public virtual UserModel User { get; set; }
}
}