Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Mobile App CI / test (push) Waiting to run
Mobile App CI / build-android (push) Blocked by required conditions
Mobile App CI / build-ios (push) Blocked by required conditions
Web App CI / test (push) Waiting to run
Web App CI / build (push) Blocked by required conditions
Deploy Admin Panel / Deploy Admin Panel (push) Waiting to run
Deploy Admin Panel / Admin Panel Verification (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions
Deploy Telegram Bot / Deploy Telegram Bot (push) Waiting to run
21 lines
545 B
Dart
21 lines
545 B
Dart
import 'package:mnemo_cards_common/mnemo_cards_common.dart';
|
|
import 'package:mnemo_cards_common_backend/mnemo_cards_common_backend.dart';
|
|
|
|
extension VoiceModelExtension on VoiceModel {
|
|
VoiceDto toDto({String? url}) => VoiceDto(
|
|
id: id ?? -1,
|
|
phrase: phrase,
|
|
path: path,
|
|
speaker: speaker,
|
|
url: url,
|
|
);
|
|
}
|
|
|
|
extension VoiceDtoExtension on VoiceDto {
|
|
VoiceModel toModel() => VoiceModel(
|
|
id: id < 0 ? null : id,
|
|
phrase: phrase,
|
|
path: path,
|
|
speaker: speaker,
|
|
);
|
|
}
|