mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-09 09:31:13 +00:00
fix: Regenerate codegen for updated model name
This commit is contained in:
parent
725c592086
commit
21c0e200a9
|
@ -20,7 +20,7 @@ class HiveConfig {
|
||||||
Hive.registerAdapter(ServerDomainAdapter());
|
Hive.registerAdapter(ServerDomainAdapter());
|
||||||
Hive.registerAdapter(BackupsCredentialAdapter());
|
Hive.registerAdapter(BackupsCredentialAdapter());
|
||||||
Hive.registerAdapter(BackblazeBucketAdapter());
|
Hive.registerAdapter(BackblazeBucketAdapter());
|
||||||
Hive.registerAdapter(ServerVolumeAdapter());
|
Hive.registerAdapter(ServerProviderVolumeAdapter());
|
||||||
Hive.registerAdapter(UserTypeAdapter());
|
Hive.registerAdapter(UserTypeAdapter());
|
||||||
Hive.registerAdapter(DnsProviderTypeAdapter());
|
Hive.registerAdapter(DnsProviderTypeAdapter());
|
||||||
Hive.registerAdapter(ServerProviderTypeAdapter());
|
Hive.registerAdapter(ServerProviderTypeAdapter());
|
||||||
|
|
|
@ -20,7 +20,7 @@ class ServerHostingDetailsAdapter extends TypeAdapter<ServerHostingDetails> {
|
||||||
ip4: fields[0] as String,
|
ip4: fields[0] as String,
|
||||||
id: fields[1] as int,
|
id: fields[1] as int,
|
||||||
createTime: fields[3] as DateTime?,
|
createTime: fields[3] as DateTime?,
|
||||||
volume: fields[4] as ServerVolume,
|
volume: fields[4] as ServerProviderVolume,
|
||||||
apiToken: fields[5] as String,
|
apiToken: fields[5] as String,
|
||||||
provider: fields[6] == null
|
provider: fields[6] == null
|
||||||
? ServerProviderType.hetzner
|
? ServerProviderType.hetzner
|
||||||
|
@ -60,17 +60,17 @@ class ServerHostingDetailsAdapter extends TypeAdapter<ServerHostingDetails> {
|
||||||
typeId == other.typeId;
|
typeId == other.typeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
class ServerVolumeAdapter extends TypeAdapter<ServerVolume> {
|
class ServerProviderVolumeAdapter extends TypeAdapter<ServerProviderVolume> {
|
||||||
@override
|
@override
|
||||||
final int typeId = 5;
|
final int typeId = 5;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ServerVolume read(BinaryReader reader) {
|
ServerProviderVolume read(BinaryReader reader) {
|
||||||
final numOfFields = reader.readByte();
|
final numOfFields = reader.readByte();
|
||||||
final fields = <int, dynamic>{
|
final fields = <int, dynamic>{
|
||||||
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||||
};
|
};
|
||||||
return ServerVolume(
|
return ServerProviderVolume(
|
||||||
id: fields[1] as int,
|
id: fields[1] as int,
|
||||||
name: fields[2] as String,
|
name: fields[2] as String,
|
||||||
sizeByte: fields[3] == null ? 10737418240 : fields[3] as int,
|
sizeByte: fields[3] == null ? 10737418240 : fields[3] as int,
|
||||||
|
@ -81,7 +81,7 @@ class ServerVolumeAdapter extends TypeAdapter<ServerVolume> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void write(BinaryWriter writer, ServerVolume obj) {
|
void write(BinaryWriter writer, ServerProviderVolume obj) {
|
||||||
writer
|
writer
|
||||||
..writeByte(6)
|
..writeByte(6)
|
||||||
..writeByte(1)
|
..writeByte(1)
|
||||||
|
@ -104,7 +104,7 @@ class ServerVolumeAdapter extends TypeAdapter<ServerVolume> {
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
other is ServerVolumeAdapter &&
|
other is ServerProviderVolumeAdapter &&
|
||||||
runtimeType == other.runtimeType &&
|
runtimeType == other.runtimeType &&
|
||||||
typeId == other.typeId;
|
typeId == other.typeId;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue