36 lines
787 B
Dart
36 lines
787 B
Dart
class License {
|
|
final int? id;
|
|
final int companyId;
|
|
final String name;
|
|
final int durationMonths;
|
|
final String visitCycle; // 방문주기(월, 격월, 분기 등)
|
|
|
|
License({
|
|
this.id,
|
|
required this.companyId,
|
|
required this.name,
|
|
required this.durationMonths,
|
|
required this.visitCycle,
|
|
});
|
|
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
'id': id,
|
|
'companyId': companyId,
|
|
'name': name,
|
|
'durationMonths': durationMonths,
|
|
'visitCycle': visitCycle,
|
|
};
|
|
}
|
|
|
|
factory License.fromJson(Map<String, dynamic> json) {
|
|
return License(
|
|
id: json['id'],
|
|
companyId: json['companyId'],
|
|
name: json['name'],
|
|
durationMonths: json['durationMonths'],
|
|
visitCycle: json['visitCycle'] as String,
|
|
);
|
|
}
|
|
}
|