elCaribe app - customization and branding

This commit is contained in:
2025-12-12 19:09:42 -04:00
parent 9e5d0d8ebf
commit ba7deac9f3
402 changed files with 31833 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
import 'package:news/data/models/authorModel.dart';
import 'package:news/utils/strings.dart';
class AuthModel {
String? id;
String? name;
String? email;
String? mobile;
String? profile;
String? type;
String? status;
String? isFirstLogin; // 0 - new user, 1 - existing user
String? role;
String? jwtToken;
int? isAuthor;
Author? authorDetails;
AuthModel({this.id, this.name, this.email, this.mobile, this.profile, this.type, this.status, this.isFirstLogin, this.role, this.jwtToken, this.authorDetails, this.isAuthor = 0});
AuthModel.fromJson(Map<String, dynamic> json) {
id = json[ID].toString();
name = json[NAME] ?? "";
email = json[EMAIL] ?? "";
mobile = json[MOBILE] ?? "";
profile = json[PROFILE] ?? "";
type = json[TYPE] ?? "";
status = json[STATUS].toString();
isFirstLogin = (json[IS_LOGIN] != null) ? json[IS_LOGIN].toString() : "";
role = json[ROLE].toString();
jwtToken = json[TOKEN] ?? "";
isAuthor = json[IS_AUTHOR];
authorDetails = (isAuthor == 1 && json[AUTHOR] != null) ? Author.fromJson(json[AUTHOR]) : null;
}
}