mirror of
https://github.com/Jetsparrow/karmabot.git
synced 2026-01-21 00:56:09 +03:00
Switch awardtypeid to int + fix /at help
This commit is contained in:
parent
b0632cf3b7
commit
3942b17c64
@ -91,7 +91,7 @@ namespace JetKarmaBot.Commands
|
|||||||
|
|
||||||
var text = args.Message.Text;
|
var text = args.Message.Text;
|
||||||
string awardTypeAcc, awardTypeSym;
|
string awardTypeAcc, awardTypeSym;
|
||||||
sbyte? awardTypeId;
|
int? awardTypeId;
|
||||||
if (awardTypeText == null || awardTypeText == "star")
|
if (awardTypeText == null || awardTypeText == "star")
|
||||||
{
|
{
|
||||||
awardTypeAcc = currentLocale["jetkarmabot.star.accusative"];
|
awardTypeAcc = currentLocale["jetkarmabot.star.accusative"];
|
||||||
|
|||||||
@ -30,7 +30,7 @@ namespace JetKarmaBot.Commands
|
|||||||
VerbRouter.Add(C.GetInstance<AwardTypeManage.CreateCommand>());
|
VerbRouter.Add(C.GetInstance<AwardTypeManage.CreateCommand>());
|
||||||
VerbRouter.Add(C.GetInstance<AwardTypeManage.RemoveCommand>());
|
VerbRouter.Add(C.GetInstance<AwardTypeManage.RemoveCommand>());
|
||||||
VerbRouter.Add(C.GetInstance<AwardTypeManage.SetParameterCommand>());
|
VerbRouter.Add(C.GetInstance<AwardTypeManage.SetParameterCommand>());
|
||||||
VerbRouter.Add(C.GetInstance<HelpCommand>());
|
VerbRouter.Add(C.ResolveObject(new HelpCommand()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public IReadOnlyCollection<ChatCommandArgument> Arguments => new[] {
|
public IReadOnlyCollection<ChatCommandArgument> Arguments => new[] {
|
||||||
|
|||||||
@ -28,7 +28,7 @@ namespace JetKarmaBot.Commands
|
|||||||
string response;
|
string response;
|
||||||
|
|
||||||
string awardTypeSym;
|
string awardTypeSym;
|
||||||
sbyte? awardTypeId;
|
int? awardTypeId;
|
||||||
if (string.IsNullOrWhiteSpace(awardTypeName) || awardTypeName == "star")
|
if (string.IsNullOrWhiteSpace(awardTypeName) || awardTypeName == "star")
|
||||||
{
|
{
|
||||||
awardTypeId = null;
|
awardTypeId = null;
|
||||||
|
|||||||
@ -54,7 +54,7 @@ namespace JetKarmaBot.Commands
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sbyte? awardTypeId;
|
int? awardTypeId;
|
||||||
string awardTypeSym;
|
string awardTypeSym;
|
||||||
if (awardTypeName == "star")
|
if (awardTypeName == "star")
|
||||||
{
|
{
|
||||||
|
|||||||
@ -10,7 +10,7 @@ namespace JetKarmaBot.Models
|
|||||||
public long ChatId { get; set; }
|
public long ChatId { get; set; }
|
||||||
public int FromId { get; set; }
|
public int FromId { get; set; }
|
||||||
public int ToId { get; set; }
|
public int ToId { get; set; }
|
||||||
public sbyte? AwardTypeId { get; set; }
|
public int? AwardTypeId { get; set; }
|
||||||
public sbyte Amount { get; set; }
|
public sbyte Amount { get; set; }
|
||||||
public DateTime Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
[ForeignKey("AwardTypeId")]
|
[ForeignKey("AwardTypeId")]
|
||||||
|
|||||||
@ -11,7 +11,7 @@ namespace JetKarmaBot.Models
|
|||||||
Awards = new HashSet<Award>();
|
Awards = new HashSet<Award>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public sbyte AwardTypeId { get; set; }
|
public int AwardTypeId { get; set; }
|
||||||
public string CommandName { get; set; }
|
public string CommandName { get; set; }
|
||||||
public long ChatId { get; set; }
|
public long ChatId { get; set; }
|
||||||
public string NominativeName { get; set; }
|
public string NominativeName { get; set; }
|
||||||
|
|||||||
@ -60,7 +60,7 @@ namespace JetKarmaBot.Models
|
|||||||
|
|
||||||
entity.Property(e => e.AwardTypeId)
|
entity.Property(e => e.AwardTypeId)
|
||||||
.HasColumnName("awardtypeid")
|
.HasColumnName("awardtypeid")
|
||||||
.HasColumnType("tinyint(3)");
|
.HasColumnType("int(11)");
|
||||||
|
|
||||||
entity.Property(e => e.ChatId)
|
entity.Property(e => e.ChatId)
|
||||||
.HasColumnName("chatid")
|
.HasColumnName("chatid")
|
||||||
@ -118,7 +118,7 @@ namespace JetKarmaBot.Models
|
|||||||
|
|
||||||
entity.Property(e => e.AwardTypeId)
|
entity.Property(e => e.AwardTypeId)
|
||||||
.HasColumnName("awardtypeid")
|
.HasColumnName("awardtypeid")
|
||||||
.HasColumnType("tinyint(3)");
|
.HasColumnType("int(11)");
|
||||||
|
|
||||||
entity.Property(e => e.CommandName)
|
entity.Property(e => e.CommandName)
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user