Initial exercise setup.
Additions * Instructions for manually starting the database. * Each phase now has a success criteria with how to verify. * Troubleshooting section for working with the Docker DB container. * All phases of the exercise are described in README.md (with as little advanced hints as possible). * DFD to illustrate phase 1 * Debugging starts the database container and applies schema migrations (no setup required). * Launch settings for VS Code, VS 2022 and Rider (IntelliJ IDEA). * Swagger UI is available at <http://localhost:8080/swagger/index.html> for testing.
This commit is contained in:
27
service/Post.cs
Normal file
27
service/Post.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace service;
|
||||
|
||||
[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; }
|
||||
|
||||
[Column("body")]
|
||||
[Required]
|
||||
public string Body { get; set; }
|
||||
|
||||
[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