Class DutyStatusViolation
- Namespace
- Geotab.Checkmate.ObjectModel
- Assembly
- Geotab.Checkmate.ObjectModel.dll
A DutyStatusLog violation for a User.
[ReportClass]
public class DutyStatusViolation : EntityWithVersion, IEntity, IComparable, IIdentifiable, IVersion
- Inheritance
-
DutyStatusViolation
- Implements
- Inherited Members
Constructors
DutyStatusViolation()
Initializes a new instance of the DutyStatusViolation class.
public DutyStatusViolation()
DutyStatusViolation(Id?, long?, DutyStatusViolationType?, User?, DateTime?, DateTime?, TimeSpan?, int?, int?, int?, Id?)
Initializes a new instance of the DutyStatusViolation class.
public DutyStatusViolation(Id? id, long? version, DutyStatusViolationType? type, User? driver, DateTime? fromDate, DateTime? toDate, TimeSpan? drivingDuration, int? hoursLimit, int? daysLimit, int? periodsLimit, Id? logId)
Parameters
idIdThe identifier.
versionlong?The version.
typeDutyStatusViolationType?driverUserThe User.
fromDateDateTime?From date.
toDateDateTime?To date.
drivingDurationTimeSpan?Duration of the driving.
hoursLimitint?Maximum/minimum hours limit.
daysLimitint?Maximum/minimum days limit.
periodsLimitint?Maximum/minimum days limit for Cycle Rest violation.
logIdIdThe DutyStatusLog Id that caused the violation.
DutyStatusViolation(User, DutyStatusViolationType?, DateTime?, DateTime?, in TimeSpan, int?, int?, int?)
Initializes a new instance of the DutyStatusViolation class.
[Obsolete("Deprecating. Use other constructor.")]
public DutyStatusViolation(User driver, DutyStatusViolationType? type, DateTime? fromDate, DateTime? toDate, in TimeSpan drivingDuration, int? hoursLimit, int? daysLimit, int? periodsLimit)
Parameters
driverUserThe driver.
typeDutyStatusViolationType?The type.
fromDateDateTime?From date.
toDateDateTime?To date.
drivingDurationTimeSpanDuration of the driving.
hoursLimitint?Maximum/minimum hours limit.
daysLimitint?Maximum/minimum days limit.
periodsLimitint?Maximum/minimum days limit for Cycle Rest violation.
DutyStatusViolation(User, DutyStatusViolationType?, DateTime?, DateTime?, in TimeSpan, int?, int?, int?, Id)
Initializes a new instance of the DutyStatusViolation class.
[Obsolete("Deprecating. Use other constructor.")]
public DutyStatusViolation(User driver, DutyStatusViolationType? type, DateTime? fromDate, DateTime? toDate, in TimeSpan drivingDuration, int? hoursLimit, int? daysLimit, int? periodsLimit, Id logId)
Parameters
driverUserThe driver.
typeDutyStatusViolationType?The type.
fromDateDateTime?From date.
toDateDateTime?To date.
drivingDurationTimeSpanDuration of the driving.
hoursLimitint?Maximum/minimum hours limit.
daysLimitint?Maximum/minimum days limit.
periodsLimitint?Maximum/minimum days limit for Cycle Rest violation.
logIdIdThe DutyStatusLog that caused the violation.
DutyStatusViolation(User, DutyStatusViolationType?, DateTime?, DateTime?, in TimeSpan, string)
Initializes a new instance of the DutyStatusViolation class.
[Obsolete("Deprecating. Use other constructor.")]
public DutyStatusViolation(User driver, DutyStatusViolationType? type, DateTime? fromDate, DateTime? toDate, in TimeSpan drivingDuration, string reason)
Parameters
driverUserThe driver.
typeDutyStatusViolationType?The type.
fromDateDateTime?From date.
toDateDateTime?To date.
drivingDurationTimeSpanDuration of the driving.
reasonstringThe reason.
Properties
DaysLimit
Gets or sets the maximum or minimum days limit of the duty status violation.
[ExcelColumnHeader(new ReportHeading[] { ReportHeading.HosViolationDaysLimit })]
public int? DaysLimit { get; set; }
Property Value
Driver
Gets or sets the User associated with the duty status violation.
public User? Driver { get; set; }
Property Value
DrivingDuration
Gets or sets the driving duration of the duty status violation.
[ExcelColumnHeader(new ReportHeading[] { ReportHeading.HosViolationDrivingDuration })]
public TimeSpan? DrivingDuration { get; set; }
Property Value
FromDate
Gets or sets the date and time that the duty status violation started.
[ExcelColumnHeader(new ReportHeading[] { ReportHeading.HosViolationStartDateTime })]
public DateTime? FromDate { get; set; }
Property Value
HoursLimit
Gets or sets the maximum or minimum hours limit of the duty status violation.
[ExcelColumnHeader(new ReportHeading[] { ReportHeading.HosViolationHoursLimit })]
public int? HoursLimit { get; set; }
Property Value
LogId
Gets or sets the log Id.
public Id? LogId { get; set; }
Property Value
- Id
The log Id.
Remarks
Stub for strict mode in debug.
PeriodsLimit
Gets or sets the maximum or minimum hours limit of the duty status Cycle Rest violation.
[ExcelColumnHeader(new ReportHeading[] { ReportHeading.HosViolationPeriodsLimit })]
public int? PeriodsLimit { get; set; }
Property Value
Reason
Gets or sets the stated reason why the duty status violation occurred.
[Obsolete("Deprecated. Will be removed in a future version. The data in the 'Reason' property string is now provided as 'DaysLimit' and 'HoursLimit' for better programmatic access.")]
[ExcelColumnHeader(new ReportHeading[] { ReportHeading.HosViolationReason })]
public string? Reason { get; set; }
Property Value
ToDate
Gets or sets the date and time that the duty status violation ended.
[ExcelColumnHeader(new ReportHeading[] { ReportHeading.HosViolationEndDateTime })]
public DateTime? ToDate { get; set; }
Property Value
Type
Gets or sets the DutyStatusViolationType of the duty status violation.
[ExcelColumnHeader(new ReportHeading[] { ReportHeading.HosViolationType })]
public DutyStatusViolationType? Type { get; set; }
Property Value
Methods
Clone()
Creates a new object that is a copy of the current instance.
public override IEntity Clone()
Returns
- IEntity
A new object that is a copy of this instance.