model
Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (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
Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (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
This commit is contained in:
parent
2eaa6a9067
commit
0884ecd911
2 changed files with 1349 additions and 0 deletions
40
mnemo_cards_common_backend/lib/src/models/voice_model.dart
Normal file
40
mnemo_cards_common_backend/lib/src/models/voice_model.dart
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import 'package:copy_with_extension/copy_with_extension.dart';
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import 'game_card_model.dart';
|
||||
|
||||
part 'voice_model.g.dart';
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
@Collection()
|
||||
@CopyWith()
|
||||
class VoiceModel {
|
||||
Id? id;
|
||||
final String phrase;
|
||||
final String path;
|
||||
final String speaker;
|
||||
@JsonKey(includeFromJson: true, includeToJson: false)
|
||||
final DateTime? createdAt;
|
||||
@JsonKey(includeFromJson: true, includeToJson: false)
|
||||
final DateTime? updatedAt;
|
||||
@JsonKey(defaultValue: false)
|
||||
final bool isDeleted;
|
||||
@Backlink(to: 'voices')
|
||||
final IsarLinks<GameCardModel> cards = IsarLinks<GameCardModel>();
|
||||
|
||||
VoiceModel({
|
||||
required this.phrase,
|
||||
required this.path,
|
||||
required this.speaker,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.id,
|
||||
this.isDeleted = false,
|
||||
});
|
||||
|
||||
factory VoiceModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$VoiceModelFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$VoiceModelToJson(this);
|
||||
}
|
||||
1309
mnemo_cards_common_backend/lib/src/models/voice_model.g.dart
Normal file
1309
mnemo_cards_common_backend/lib/src/models/voice_model.g.dart
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue