-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94dda59
commit 3c13713
Showing
10 changed files
with
5,962 additions
and
5,761 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
Wordle.Api/Wordle.Api/Migrations/20240430231124_WordOfTheDay.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
Wordle.Api/Wordle.Api/Migrations/20240430231124_WordOfTheDay.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace Wordle.Api.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class WordOfTheDay : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "WordOfTheDay", | ||
columns: table => new | ||
{ | ||
WordOfTheDayId = table.Column<int>(type: "int", nullable: false) | ||
.Annotation("SqlServer:Identity", "1, 1"), | ||
Word = table.Column<string>(type: "nvarchar(max)", nullable: false), | ||
Date = table.Column<DateOnly>(type: "date", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_WordOfTheDay", x => x.WordOfTheDayId); | ||
}); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "WordOfTheDay"); | ||
} | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
Wordle.Api/Wordle.Api/Migrations/WordleDbContextModelSnapshot.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// <auto-generated /> | ||
using System; | ||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore.Infrastructure; | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | ||
using Wordle.Api.Models; | ||
|
||
#nullable disable | ||
|
||
namespace Wordle.Api.Migrations | ||
{ | ||
[DbContext(typeof(WordleDbContext))] | ||
partial class WordleDbContextModelSnapshot : ModelSnapshot | ||
{ | ||
protected override void BuildModel(ModelBuilder modelBuilder) | ||
{ | ||
#pragma warning disable 612, 618 | ||
modelBuilder | ||
.HasAnnotation("ProductVersion", "8.0.4") | ||
.HasAnnotation("Relational:MaxIdentifierLength", 128); | ||
|
||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); | ||
|
||
modelBuilder.Entity("Wordle.Api.Models.WordOfTheDay", b => | ||
{ | ||
b.Property<int>("WordOfTheDayId") | ||
.ValueGeneratedOnAdd() | ||
.HasColumnType("int"); | ||
|
||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("WordOfTheDayId")); | ||
|
||
b.Property<DateOnly>("Date") | ||
.HasColumnType("date"); | ||
|
||
b.Property<string>("Word") | ||
.IsRequired() | ||
.HasColumnType("nvarchar(max)"); | ||
|
||
b.HasKey("WordOfTheDayId"); | ||
|
||
b.ToTable("WordOfTheDay"); | ||
}); | ||
#pragma warning restore 612, 618 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using System.ComponentModel.DataAnnotations.Schema; | ||
|
||
namespace Wordle.Api.Models | ||
{ | ||
[Table("WordOfTheDay")] | ||
public class WordOfTheDay | ||
{ | ||
public int WordOfTheDayId { get; set; } | ||
public string Word { get; set; } = null!; | ||
public DateOnly Date { get; set; } | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Microsoft.EntityFrameworkCore; | ||
|
||
namespace Wordle.Api.Models | ||
{ | ||
|
||
public class WordleDbContext:DbContext | ||
{ | ||
public DbSet<WordOfTheDay> WordsOfTheDays { get; set; } | ||
|
||
public WordleDbContext(DbContextOptions<WordleDbContext> options) | ||
: base(options) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.