Adding DateTime field of LastUpdated

This commit is contained in:
Sean "Solao Bajiuik" Stoves 2020-08-08 23:33:48 -04:00
parent 1abfb39aac
commit 1b4f4cc1c0
2 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore.Metadata;
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
namespace ChaosBot.Migrations
@ -15,7 +16,8 @@ namespace ChaosBot.Migrations
{
DiscordGuildId = table.Column<ulong>(nullable: false),
DiscordUserId = table.Column<ulong>(nullable: false),
Amount = table.Column<ulong>(nullable: false, defaultValue: 0)
Amount = table.Column<ulong>(nullable: false, defaultValue: 0),
lastUpdated = table.Column<DateTime>(nullable:false, defaultValue: "0000-00-00 00:00:00")
},
constraints: table =>
{

View File

@ -1,3 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace ChaosBot.Models
@ -10,6 +11,7 @@ namespace ChaosBot.Models
[Required]
public ulong DiscordGuildId { get; set; }
public ulong Amount { get; set; }
public DateTime LastUpdated { get; set; }
}
#endregion
}