Initial commit

This commit is contained in:
GeNii96 committed 2026-05-27 12:47:16 +02:00
commit 63ee71a19b
123 files changed
+11268

No files matched your search

@@ -0,0 +1,30 @@
using Microsoft.EntityFrameworkCore;
using OnlyPrompt.Backend.Database.Core;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace OnlyPrompt.Backend.Database.Models
{
[Index(nameof(Level), nameof(UserId), IsUnique = true)]
public class SubscriptionTierModel : EntityBase
{
[Required]
public required string Name { get; set; }
[MaxLength(1000)]
public string? Description { get; set; }
[Required]
[ForeignKey(nameof(User))]
public Guid UserId { get; set; }
[DeleteBehavior(DeleteBehavior.Cascade)]
public virtual UserModel User { get; set; }
public decimal MonthlyPrice { get; set; }
public int Level { get; set; }
public virtual IList<PromptModel> Prompts { get; set; } = new List<PromptModel>();
public virtual IList<SubscriptionModel> Subscriptions { get; set; } = new List<SubscriptionModel>();
}
}