* Extended functionalities
* Added different UIs
This commit is contained in:
45
MealPlan.Api/Models/RecipeGeneratorSession.cs
Normal file
45
MealPlan.Api/Models/RecipeGeneratorSession.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace MealPlan.Api.Models;
|
||||
|
||||
[Table("RecipeGeneratorSessions")]
|
||||
public class RecipeGeneratorSession
|
||||
{
|
||||
[Column("Id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("UserId")]
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
[Column("Status")]
|
||||
[MaxLength(32)]
|
||||
public string Status { get; set; } = RecipeGeneratorStatuses.Draft;
|
||||
|
||||
[Column("ConstraintsJson")]
|
||||
public string ConstraintsJson { get; set; } = "{}";
|
||||
|
||||
[Column("DraftJson")]
|
||||
public string? DraftJson { get; set; }
|
||||
|
||||
[Column("SavedRecipeId")]
|
||||
public int? SavedRecipeId { get; set; }
|
||||
|
||||
[Column("GenerationVersion")]
|
||||
public int GenerationVersion { get; set; } = 1;
|
||||
|
||||
[Column("CreatedAt")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
[Column("UpdatedAt")]
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
|
||||
public Recipe? SavedRecipe { get; set; }
|
||||
}
|
||||
|
||||
public static class RecipeGeneratorStatuses
|
||||
{
|
||||
public const string Draft = "draft";
|
||||
public const string Saved = "saved";
|
||||
public const string Abandoned = "abandoned";
|
||||
}
|
||||
Reference in New Issue
Block a user