Use a local SQLite3 backend instead of PostgreSQL Docker container.
* The provided SQLite3 database contains the required schemas, but no data and can be reset to if required. * Remove all references to PostgreSQL in documentation and configuration. * Replace native sqlite3 command with a console app to remove dependency on SQLite3 installation.
This commit is contained in:
24
show-posts/Post.cs
Normal file
24
show-posts/Post.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
[Table("posts")]
|
||||
public class Post
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("user_id")]
|
||||
public int UserId { get; set; }
|
||||
|
||||
[Column("title")]
|
||||
[Required]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
[Column("body")]
|
||||
[Required]
|
||||
public string Body { get; set; } = string.Empty;
|
||||
|
||||
[Column("updated_at")]
|
||||
public DateTimeOffset UpdatedAt { get; set; } = DateTimeOffset.Parse("1970-01-01T00:00:00Z"); // TODO: Remove the default value in Phase 3.
|
||||
}
|
||||
Reference in New Issue
Block a user