rewrite number whatever to .net and blazor.
This commit is contained in:
31
Models/ContactMessage.cs
Normal file
31
Models/ContactMessage.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace landing.Models;
|
||||
|
||||
[Table("contact_messages")]
|
||||
public class ContactMessage
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[Column("email")]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[Column("subject")]
|
||||
public string Subject { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[Column("message")]
|
||||
public string Message { get; set; } = string.Empty;
|
||||
|
||||
[Column("created_at")]
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
23
Models/Newsletter.cs
Normal file
23
Models/Newsletter.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace landing.Models;
|
||||
|
||||
[Table("newsletters")]
|
||||
public class Newsletter
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("subject")]
|
||||
public string Subject { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[Column("body")]
|
||||
public string Body { get; set; } = string.Empty;
|
||||
|
||||
[Column("sent_at")]
|
||||
public DateTime SentAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
16
Models/Subscriber.cs
Normal file
16
Models/Subscriber.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace landing.Models;
|
||||
|
||||
[Table("subscribers")]
|
||||
public class Subscriber
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("email")]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
}
|
||||
Reference in New Issue
Block a user