parent
4f4b3b145d
commit
5905d35f5c
@ -0,0 +1,31 @@
|
|||||||
|
import 'package:common_utils/common_utils.dart';
|
||||||
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
|
|
||||||
|
part 'key_manage_record_list_model.g.dart';
|
||||||
|
|
||||||
|
@JsonSerializable()
|
||||||
|
class KeyManageRecordListModel {
|
||||||
|
int id;
|
||||||
|
String code;
|
||||||
|
int status;
|
||||||
|
String? facilityName;
|
||||||
|
String? correspondingPosition;
|
||||||
|
String? storageLocation;
|
||||||
|
String? auditDate;
|
||||||
|
String? reason;
|
||||||
|
factory KeyManageRecordListModel.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$KeyManageRecordListModelFromJson(json);
|
||||||
|
String get auditDateString =>
|
||||||
|
DateUtil.formatDateStr(auditDate ?? '', format: 'yyyy-MM-dd HH:mm');
|
||||||
|
|
||||||
|
KeyManageRecordListModel({
|
||||||
|
required this.id,
|
||||||
|
required this.code,
|
||||||
|
required this.status,
|
||||||
|
this.facilityName,
|
||||||
|
this.correspondingPosition,
|
||||||
|
this.storageLocation,
|
||||||
|
this.auditDate,
|
||||||
|
this.reason,
|
||||||
|
});
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'key_manage_record_list_model.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
KeyManageRecordListModel _$KeyManageRecordListModelFromJson(
|
||||||
|
Map<String, dynamic> json) {
|
||||||
|
return KeyManageRecordListModel(
|
||||||
|
id: json['id'] as int,
|
||||||
|
code: json['code'] as String,
|
||||||
|
status: json['status'] as int,
|
||||||
|
facilityName: json['facilityName'] as String?,
|
||||||
|
correspondingPosition: json['correspondingPosition'] as String?,
|
||||||
|
storageLocation: json['storageLocation'] as String?,
|
||||||
|
auditDate: json['auditDate'] as String?,
|
||||||
|
reason: json['reason'] as String?,
|
||||||
|
);
|
||||||
|
}
|
@ -1,48 +1,47 @@
|
|||||||
import 'package:common_utils/common_utils.dart';
|
// import 'package:common_utils/common_utils.dart';
|
||||||
|
//
|
||||||
class KeyManageRecordListModel {
|
// class KeyManageRecordListModel {
|
||||||
int? id;
|
// int? id;
|
||||||
String? code;
|
// String? code;
|
||||||
int? status;
|
// int? status;
|
||||||
String? facilityName;
|
// String? facilityName;
|
||||||
String? correspondingPosition;
|
// String? correspondingPosition;
|
||||||
String? storageLocation;
|
// String? storageLocation;
|
||||||
String? auditDate;
|
// String? auditDate;
|
||||||
String? reason;
|
// String? reason;
|
||||||
|
//
|
||||||
KeyManageRecordListModel(
|
// KeyManageRecordListModel(
|
||||||
{required this.id,
|
// {required this.id,
|
||||||
this.code,
|
// this.code,
|
||||||
this.status,
|
// this.status,
|
||||||
this.facilityName,
|
// this.facilityName,
|
||||||
this.correspondingPosition,
|
// this.correspondingPosition,
|
||||||
this.storageLocation,
|
// this.storageLocation,
|
||||||
this.auditDate,
|
// this.auditDate,
|
||||||
this.reason});
|
// this.reason});
|
||||||
|
//
|
||||||
KeyManageRecordListModel.fromJson(Map<String, dynamic> json) {
|
// KeyManageRecordListModel.fromJson(Map<String, dynamic> json) {
|
||||||
id = json['id'];
|
// id = json['id'];
|
||||||
code = json['code'];
|
// code = json['code'];
|
||||||
status = json['status'];
|
// status = json['status'];
|
||||||
facilityName = json['facilityName'];
|
// facilityName = json['facilityName'];
|
||||||
correspondingPosition = json['correspondingPosition'];
|
// correspondingPosition = json['correspondingPosition'];
|
||||||
storageLocation = json['storageLocation'];
|
// storageLocation = json['storageLocation'];
|
||||||
auditDate = json['auditDate'];
|
// auditDate = json['auditDate'];
|
||||||
reason = json['reason'];
|
// reason = json['reason'];
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
Map<String, dynamic> toJson() {
|
// Map<String, dynamic> toJson() {
|
||||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
// final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
data['id'] = this.id;
|
// data['id'] = this.id;
|
||||||
data['code'] = this.code;
|
// data['code'] = this.code;
|
||||||
data['status'] = this.status;
|
// data['status'] = this.status;
|
||||||
data['facilityName'] = this.facilityName;
|
// data['facilityName'] = this.facilityName;
|
||||||
data['correspondingPosition'] = this.correspondingPosition;
|
// data['correspondingPosition'] = this.correspondingPosition;
|
||||||
data['storageLocation'] = this.storageLocation;
|
// data['storageLocation'] = this.storageLocation;
|
||||||
data['auditDate'] = this.auditDate;
|
// data['auditDate'] = this.auditDate;
|
||||||
data['reason'] = this.reason;
|
// data['reason'] = this.reason;
|
||||||
return data;
|
// return data;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
String get auditDateString => DateUtil.formatDateStr(this.auditDate!,format: 'yyyy-MM-dd HH:mm');
|
// }
|
||||||
}
|
|
||||||
|
Loading…
Reference in new issue