
Renames `AuthStruct` to `AuthModel` and `ProductStruct` to `ProductModel` to align with a consistent data model naming convention. Updates all relevant imports, type declarations, and method signatures across the application to reflect these changes, improving codebase clarity and maintainability. Includes minor code style improvements and refactorings in other components.
20 lines
507 B
Dart
20 lines
507 B
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'auth_model.freezed.dart';
|
|
part 'auth_model.g.dart';
|
|
|
|
@Freezed(toJson: false)
|
|
abstract class AuthModel with _$AuthModel {
|
|
factory AuthModel({
|
|
@JsonKey(name: 'access_token') String? accessToken,
|
|
@JsonKey(name: 'db_name') String? dbName,
|
|
int? uid,
|
|
String? refreshToken,
|
|
String? name,
|
|
String? username,
|
|
}) = _AuthModel;
|
|
|
|
factory AuthModel.fromJson(Map<String, dynamic> json) =>
|
|
_$AuthModelFromJson(json);
|
|
}
|