프로젝트 최초 커밋
This commit is contained in:
35
lib/models/license_model.dart
Normal file
35
lib/models/license_model.dart
Normal file
@@ -0,0 +1,35 @@
|
||||
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,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user