2021-02-23 18:03:37 +08:00
|
|
|
using System;
|
|
|
|
using BililiveRecorder.Core.Event;
|
|
|
|
|
|
|
|
#nullable enable
|
|
|
|
namespace BililiveRecorder.Core.SimpleWebhook
|
|
|
|
{
|
2022-05-16 23:28:31 +08:00
|
|
|
internal class RecordEndData
|
2021-02-23 18:03:37 +08:00
|
|
|
{
|
|
|
|
public RecordEndData(RecordFileClosedEventArgs args)
|
|
|
|
{
|
|
|
|
if (args is null)
|
|
|
|
throw new ArgumentNullException(nameof(args));
|
|
|
|
|
|
|
|
this.RoomId = args.RoomId;
|
|
|
|
this.Name = args.Name;
|
|
|
|
this.Title = args.Title;
|
|
|
|
this.RelativePath = args.RelativePath;
|
|
|
|
this.FileSize = args.FileSize;
|
|
|
|
this.StartRecordTime = args.FileOpenTime;
|
|
|
|
this.EndRecordTime = args.FileCloseTime;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Guid EventRandomId { get; set; } = Guid.NewGuid();
|
|
|
|
|
|
|
|
public int RoomId { get; set; } = 0;
|
|
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
public string Title { get; set; } = string.Empty;
|
|
|
|
public string RelativePath { get; set; } = string.Empty;
|
|
|
|
public long FileSize { get; set; }
|
|
|
|
public DateTimeOffset StartRecordTime { get; set; }
|
|
|
|
public DateTimeOffset EndRecordTime { get; set; }
|
|
|
|
}
|
|
|
|
}
|