Initial project

This commit is contained in:
Cody
2026-03-06 14:56:17 +08:00
parent 977b627b15
commit bf9e099747
1180 changed files with 50973 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
import '../entities/user.dart';
/// 认证 Repository 接口(依赖倒置)
///
/// Domain 层定义 WhatData 层实现 How。
/// ViewModel 依赖此接口,不依赖具体实现 [AuthRepositoryImpl]。
///
/// ## 数据流位置
///
/// ```
/// ViewModel
/// → ★ AuthRepository.login() ★ ← 你在这里(接口)
/// → AuthRepositoryImpl.login() ← data/repositories/(实现)
/// → _client.executeRequest(LoginRequest)
/// → 服务端
/// ```
abstract interface class AuthRepository {
/// 登录,返回 Domain Entity [User]
Future<User> login({required String email, required String password});
/// 获取当前登录用户信息
Future<User?> getCurrentUser();
/// 退出登录
Future<void> logout();
}