- Improved .curtrs (It will now have a lot more useful data in the database, show Tx ids, and be partially localized)

- Added .curtr command which lets you see full information about one of your own transactions with the specified id
- Added .WithAuthor(IUser) extension for embedbuilder
This commit is contained in:
Kwoth
2022-01-25 05:55:38 +01:00
parent 81533b7f69
commit 3910dc7499
18 changed files with 3077 additions and 70 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,94 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NadekoBot.Migrations
{
public partial class curtrsreworkdiscorduserdefaults : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "Reason",
table: "CurrencyTransactions",
newName: "Note");
migrationBuilder.AlterColumn<int>(
name: "TotalXp",
table: "DiscordUser",
type: "INTEGER",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "INTEGER");
migrationBuilder.AlterColumn<long>(
name: "CurrencyAmount",
table: "DiscordUser",
type: "INTEGER",
nullable: false,
defaultValue: 0L,
oldClrType: typeof(long),
oldType: "INTEGER");
migrationBuilder.AddColumn<string>(
name: "Extra",
table: "CurrencyTransactions",
type: "TEXT",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<ulong>(
name: "OtherId",
table: "CurrencyTransactions",
type: "INTEGER",
nullable: true,
defaultValueSql: "NULL");
migrationBuilder.AddColumn<string>(
name: "Type",
table: "CurrencyTransactions",
type: "TEXT",
nullable: false,
defaultValue: "");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Extra",
table: "CurrencyTransactions");
migrationBuilder.DropColumn(
name: "OtherId",
table: "CurrencyTransactions");
migrationBuilder.DropColumn(
name: "Type",
table: "CurrencyTransactions");
migrationBuilder.RenameColumn(
name: "Note",
table: "CurrencyTransactions",
newName: "Reason");
migrationBuilder.AlterColumn<int>(
name: "TotalXp",
table: "DiscordUser",
type: "INTEGER",
nullable: false,
oldClrType: typeof(int),
oldType: "INTEGER",
oldDefaultValue: 0);
migrationBuilder.AlterColumn<long>(
name: "CurrencyAmount",
table: "DiscordUser",
type: "INTEGER",
nullable: false,
oldClrType: typeof(long),
oldType: "INTEGER",
oldDefaultValue: 0L);
}
}
}

View File

@@ -102,7 +102,9 @@ namespace NadekoBot.Migrations
.HasColumnType("INTEGER");
b.Property<long>("CurrencyAmount")
.HasColumnType("INTEGER");
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(0L);
b.Property<DateTime?>("DateAdded")
.HasColumnType("TEXT");
@@ -131,7 +133,9 @@ namespace NadekoBot.Migrations
.HasDefaultValue(0);
b.Property<int>("TotalXp")
.HasColumnType("INTEGER");
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(0);
b.Property<ulong>("UserId")
.HasColumnType("INTEGER");
@@ -502,7 +506,20 @@ namespace NadekoBot.Migrations
b.Property<DateTime?>("DateAdded")
.HasColumnType("TEXT");
b.Property<string>("Reason")
b.Property<string>("Extra")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Note")
.HasColumnType("TEXT");
b.Property<ulong?>("OtherId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValueSql("NULL");
b.Property<string>("Type")
.IsRequired()
.HasColumnType("TEXT");
b.Property<ulong>("UserId")