Remove unused model
This commit is contained in:
parent
9f3fe7b05b
commit
3007c4c7dd
2 changed files with 0 additions and 48 deletions
|
@ -25,17 +25,6 @@ bool sqlIntToBool(int? value, {bool defaultValue = false}) {
|
|||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> mapToFaceDB(PersonFace personFace) {
|
||||
return {
|
||||
faceIDColumn: personFace.face.faceID,
|
||||
faceDetectionColumn: json.encode(personFace.face.detection.toJson()),
|
||||
faceConfirmedColumn: boolToSQLInt(personFace.confirmed),
|
||||
faceClusterId: personFace.personID,
|
||||
faceClosestDistColumn: personFace.closeDist,
|
||||
faceClosestFaceID: personFace.closeFaceID,
|
||||
};
|
||||
}
|
||||
|
||||
Map<String, dynamic> mapPersonToRow(Person p) {
|
||||
return {
|
||||
idColumn: p.remoteID,
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
import 'package:photos/face/model/face.dart';
|
||||
|
||||
class PersonFace {
|
||||
final Face face;
|
||||
int? personID;
|
||||
bool? confirmed;
|
||||
double? closeDist;
|
||||
String? closeFaceID;
|
||||
|
||||
PersonFace(
|
||||
this.face,
|
||||
this.personID,
|
||||
this.closeDist,
|
||||
this.closeFaceID, {
|
||||
this.confirmed,
|
||||
});
|
||||
|
||||
// toJson
|
||||
Map<String, dynamic> toJson() => {
|
||||
'face': face.toJson(),
|
||||
'personID': personID,
|
||||
'confirmed': confirmed ?? false,
|
||||
'close_dist': closeDist,
|
||||
'close_face_id': closeFaceID,
|
||||
};
|
||||
|
||||
// fromJson
|
||||
factory PersonFace.fromJson(Map<String, dynamic> json) {
|
||||
return PersonFace(
|
||||
Face.fromJson(json['face'] as Map<String, dynamic>),
|
||||
json['personID'] as int?,
|
||||
json['close_dist'] as double?,
|
||||
json['close_face_id'] as String?,
|
||||
confirmed: json['confirmed'] as bool?,
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue