26 lines
359 B
Dart
26 lines
359 B
Dart
|
|
class CategoryResponse {
|
|
|
|
CategoryResponse({
|
|
this.id,
|
|
this.code,
|
|
this.name
|
|
});
|
|
|
|
|
|
|
|
int id;
|
|
String code;
|
|
String name;
|
|
Map<String,dynamic> config;
|
|
|
|
static CategoryResponse fromResponse(dynamic result){
|
|
return CategoryResponse(
|
|
id: int.parse(result["id"]),
|
|
code: result["code"],
|
|
name: result["name"]
|
|
);
|
|
}
|
|
}
|
|
|