refactor(mobile): entities and models (#9182)

* refactor(mobile): entities

* store entity

* refactor: models

* remove domain

* save all

* bad refactor
This commit is contained in:
Alex 2024-04-30 21:36:40 -05:00 committed by GitHub
parent eba42b245d
commit f057fe045e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
237 changed files with 444 additions and 434 deletions

View file

@ -1,50 +0,0 @@
import 'package:openapi/api.dart';
class ServerVersion {
final int major;
final int minor;
final int patch;
const ServerVersion({
required this.major,
required this.minor,
required this.patch,
});
ServerVersion copyWith({
int? major,
int? minor,
int? patch,
}) {
return ServerVersion(
major: major ?? this.major,
minor: minor ?? this.minor,
patch: patch ?? this.patch,
);
}
@override
String toString() {
return 'ServerVersion(major: $major, minor: $minor, patch: $patch)';
}
ServerVersion.fromDto(ServerVersionResponseDto dto)
: major = dto.major,
minor = dto.minor,
patch = dto.patch_;
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
return other is ServerVersion &&
other.major == major &&
other.minor == minor &&
other.patch == patch;
}
@override
int get hashCode {
return major.hashCode ^ minor.hashCode ^ patch.hashCode;
}
}