import 'package:floor/floor.dart'; import 'package:equatable/equatable.dart'; import 'package:json_annotation/json_annotation.dart'; part 'face_entity.g.dart'; @JsonSerializable() @Entity(tableName: "face") class FaceEntity extends Equatable { /// 自增ID @PrimaryKey(autoGenerate: true) int? id; /// 用户id String userId; /// 样本id String sampleId; /// 用户名 String userName; /// 部门id String? deptId; /// 部门名 String? deptName; /// 图片路径 String imagePath; /// 本地位置 String? path; /// 人脸模型数据 List? faceModel; /// 创建时间 DateTime? createTime; /// 同步时间 DateTime? updateTime; FaceEntity({ this.id, required this.userId, required this.sampleId, required this.userName, this.deptId, this.deptName, required this.imagePath, this.path, this.faceModel, this.createTime, this.updateTime, }); factory FaceEntity.fromJson(Map json) => _$FaceEntityFromJson(json); Map toJson() => _$FaceEntityToJson(this); @override List get props => [userId, sampleId, userName, imagePath]; }