New: DB-Migration / Repositories und Models für den Premiumbereich
This commit is contained in:
37
Shared/Models/EngineerApplication.cs
Normal file
37
Shared/Models/EngineerApplication.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Oqtane.Models;
|
||||
|
||||
namespace SZUAbsolventenverein.Module.PremiumArea.Models
|
||||
{
|
||||
[Table("SZUAbsolventenvereinEngineerApplications")]
|
||||
public class EngineerApplication : ModelBase
|
||||
{
|
||||
[Key]
|
||||
public int ApplicationId { get; set; }
|
||||
public int UserId { get; set; }
|
||||
public int ModuleId { get; set; } // Context context
|
||||
|
||||
[Required]
|
||||
public int? FileId { get; set; }
|
||||
|
||||
[StringLength(256)]
|
||||
public string PdfFileName { get; set; }
|
||||
|
||||
public bool IsReported { get; set; }
|
||||
public string ReportReason { get; set; }
|
||||
public int ReportCount { get; set; }
|
||||
|
||||
// Status: "Draft", "Submitted", "Approved", "Rejected"
|
||||
[StringLength(50)]
|
||||
public string Status { get; set; }
|
||||
|
||||
public int? AdminReviewedBy { get; set; }
|
||||
public DateTime? AdminReviewedAt { get; set; }
|
||||
public string AdminNote { get; set; }
|
||||
|
||||
public DateTime? SubmittedOn { get; set; }
|
||||
public DateTime? ApprovedOn { get; set; }
|
||||
}
|
||||
}
|
||||
23
Shared/Models/PremiumEvent.cs
Normal file
23
Shared/Models/PremiumEvent.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Oqtane.Models;
|
||||
|
||||
namespace SZUAbsolventenverein.Module.PremiumArea.Models
|
||||
{
|
||||
[Table("SZUAbsolventenvereinPremiumEvents")]
|
||||
public class PremiumEvent : ModelBase
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
public int UserId { get; set; }
|
||||
|
||||
public int DeltaDays { get; set; } // +365, etc.
|
||||
|
||||
[StringLength(50)]
|
||||
public string Source { get; set; }
|
||||
|
||||
public string ReferenceId { get; set; } // e.g. "AppId:12"
|
||||
}
|
||||
}
|
||||
21
Shared/Models/UserPremium.cs
Normal file
21
Shared/Models/UserPremium.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Oqtane.Models;
|
||||
|
||||
namespace SZUAbsolventenverein.Module.PremiumArea.Models
|
||||
{
|
||||
[Table("SZUAbsolventenvereinUserPremium")]
|
||||
public class UserPremium : ModelBase
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
public int UserId { get; set; }
|
||||
|
||||
public DateTime? PremiumUntil { get; set; }
|
||||
|
||||
[StringLength(50)]
|
||||
public string Source { get; set; } // "paid", "promo_engineer_application", "admin"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user