using AsbCloudApp.Data.SAUB; using AsbCloudApp.Repositories; using AsbCloudApp.Services; using AsbCloudDb.Model; using Mapster; namespace AsbCloudInfrastructure.Services.SAUB; public class TelemetryDataSpinService : TelemetryDataBaseService { public TelemetryDataSpinService( IAsbCloudDbContext db, ITelemetryService telemetryService, ITelemetryDataCache telemetryDataCache) : base(db, telemetryService, telemetryDataCache) { } protected override TelemetryDataSpin Convert(TelemetryDataSpinDto src, double timezoneOffset) { var entity = src.Adapt(); entity.DateTime = src.DateTime.ToUtcDateTimeOffset(timezoneOffset); return entity; } protected override TelemetryDataSpinDto Convert(TelemetryDataSpin src, double timezoneOffset) { var dto = src.Adapt(); dto.DateTime = src.DateTime.ToRemoteDateTime(timezoneOffset); return dto; } }