cf3209e1d0
Quick fix for PowerShell IE use Makes date readable for target player Resolved translation string inconsistencies Minor code cleanups Initial commit from review Cleaned up code & amended a few checks Comment typo Fix infinite unmuting Removed unnecessary checks (Unmuting an already unmuted player will not trigger MuteStateMeta creation (if already doesn't exist)) Resolved !listmutes showing expired mutes Committing before refactor Refactor from review Removed reference to AdditionalProperty Fix check for meta state when unmuting Continued request solves main problem Handle potential failed command execution Missed CommandExecuted onJoin Fix another PS Reference to Invoke-WebRequest Fixes review issues & Cleaned up code Adds support for Intercepting Commands via Plugin (Credit: @RaidMax) Comparing Revert formatting changes Removing MuteList for Penalty Added Mute, TempMute & Unmute Penalty Fixed reference in Mute.csproj & Removed ListMutesCommand.cs
52 lines
1.3 KiB
C#
52 lines
1.3 KiB
C#
using Data.Models.Client;
|
|
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Data.Models
|
|
{
|
|
public class EFPenalty : SharedEntity
|
|
{
|
|
public enum PenaltyType
|
|
{
|
|
Report,
|
|
Warning,
|
|
Flag,
|
|
Kick,
|
|
TempBan,
|
|
Ban,
|
|
Unban,
|
|
Any,
|
|
Unflag,
|
|
Mute,
|
|
TempMute,
|
|
Unmute,
|
|
Other = 100
|
|
}
|
|
|
|
[Key]
|
|
public int PenaltyId { get; set; }
|
|
public int? LinkId { get; set; }
|
|
[ForeignKey("LinkId")]
|
|
public virtual EFAliasLink Link { get; set; }
|
|
[Required]
|
|
public int OffenderId { get; set; }
|
|
[ForeignKey("OffenderId")]
|
|
public virtual EFClient Offender { get; set; }
|
|
[Required]
|
|
public int PunisherId { get; set; }
|
|
[ForeignKey("PunisherId")]
|
|
public virtual EFClient Punisher { get; set; }
|
|
[Required]
|
|
public DateTime When { get; set; }
|
|
[Required]
|
|
public DateTime? Expires { get; set; }
|
|
[Required]
|
|
public string Offense { get; set; }
|
|
public string AutomatedOffense { get; set; }
|
|
[Required]
|
|
public bool IsEvadedOffense { get; set; }
|
|
public PenaltyType Type { get; set; }
|
|
}
|
|
}
|