You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
334 B
17 lines
334 B
import 'entity_factory.dart';
|
|
|
|
class BaseEntity<T> {
|
|
int? code;
|
|
String? message;
|
|
T? data;
|
|
|
|
BaseEntity({this.code, this.message, this.data});
|
|
|
|
factory BaseEntity.fromJson(json) {
|
|
return BaseEntity(
|
|
code: json["code"],
|
|
message: json["msg"],
|
|
data: EntityFactory.generateOBJ<T>(json["data"]),
|
|
);
|
|
}
|
|
}
|
|
|