From b390dbf2142156fb43be8dc6c15d2a2dfda078fa Mon Sep 17 00:00:00 2001 From: AndyChen1024 Date: Fri, 11 Sep 2026 20:47:37 +0800 Subject: [PATCH] =?UTF-8?q?feat(entry):=20=E6=96=B0=E5=A2=9E=E5=9B=9B?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=E9=A2=86=E5=9F=9F=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/model/CheckinModels.ets | 56 ++++++++++++++++++++++ entry/src/main/ets/model/HomeModels.ets | 32 +++++++++++++ entry/src/main/ets/model/PlanModels.ets | 53 ++++++++++++++++++++ entry/src/main/ets/model/ProfileModels.ets | 25 ++++++++++ 4 files changed, 166 insertions(+) create mode 100644 entry/src/main/ets/model/CheckinModels.ets create mode 100644 entry/src/main/ets/model/HomeModels.ets create mode 100644 entry/src/main/ets/model/PlanModels.ets create mode 100644 entry/src/main/ets/model/ProfileModels.ets diff --git a/entry/src/main/ets/model/CheckinModels.ets b/entry/src/main/ets/model/CheckinModels.ets new file mode 100644 index 0000000..5b84cb8 --- /dev/null +++ b/entry/src/main/ets/model/CheckinModels.ets @@ -0,0 +1,56 @@ +/** + * 打卡状态常量(值即中文状态名,与小程序一致)。 + */ +export class CheckinStatus { + static readonly NORMAL: string = '正常'; + static readonly LATE: string = '迟到'; + static readonly LEAVE: string = '请假'; + static readonly ABSENT: string = '不参加讨论'; + static readonly EARLY_LEAVE: string = '早退'; + + static readonly ALL: string[] = [ + CheckinStatus.NORMAL, + CheckinStatus.LATE, + CheckinStatus.LEAVE, + CheckinStatus.ABSENT, + CheckinStatus.EARLY_LEAVE + ]; +} + +/** + * 小组成员(打卡视图)。 + */ +@ObservedV2 +export class GroupMember { + @Trace id: string = ''; + @Trace name: string = ''; + @Trace checkedIn: boolean = false; + @Trace checkinTime: string = ''; + @Trace status: string = ''; +} + +/** + * 个人打卡历史记录。 + */ +@ObservedV2 +export class PersonalCheckinRecord { + @Trace id: string = ''; + @Trace date: string = ''; + @Trace status: string = ''; + @Trace time: string = ''; +} + +/** + * 打卡页数据。 + */ +@ObservedV2 +export class CheckinRecord { + @Trace classDate: string = ''; + @Trace weekday: string = ''; + @Trace dayNum: string = ''; + @Trace checked: boolean = false; + @Trace status: string = ''; + @Trace groupName: string = ''; + @Trace groupMembers: GroupMember[] = []; + @Trace personalHistory: PersonalCheckinRecord[] = []; +} diff --git a/entry/src/main/ets/model/HomeModels.ets b/entry/src/main/ets/model/HomeModels.ets new file mode 100644 index 0000000..f8962cf --- /dev/null +++ b/entry/src/main/ets/model/HomeModels.ets @@ -0,0 +1,32 @@ +/** + * 首页功能模块。 + */ +@ObservedV2 +export class HomeModule { + @Trace id: string = ''; + @Trace emoji: string = ''; + @Trace title: string = ''; + @Trace description: string = ''; +} + +/** + * 产品介绍卡片。 + */ +@ObservedV2 +export class IntroCard { + @Trace emoji: string = ''; + @Trace heading: string = ''; + @Trace body: string = ''; +} + +/** + * 首页数据(登录态与游客态共用结构)。 + */ +@ObservedV2 +export class HomeData { + @Trace greeting: string = ''; + @Trace displayName: string = ''; + @Trace encouragement: string = ''; + @Trace modules: HomeModule[] = []; + @Trace intros: IntroCard[] = []; +} diff --git a/entry/src/main/ets/model/PlanModels.ets b/entry/src/main/ets/model/PlanModels.ets new file mode 100644 index 0000000..f37896c --- /dev/null +++ b/entry/src/main/ets/model/PlanModels.ets @@ -0,0 +1,53 @@ +/** + * 计划类型常量(值即中文名,与小程序一致)。 + */ +export class PlanType { + static readonly WEEKLY: string = '周计划'; + static readonly MONTHLY: string = '月计划'; + static readonly YEARLY: string = '年计划'; + + static readonly ALL: string[] = [ + PlanType.WEEKLY, + PlanType.MONTHLY, + PlanType.YEARLY + ]; +} + +/** + * 计划小组成员。 + */ +@ObservedV2 +export class PlanMember { + @Trace id: string = ''; + @Trace name: string = ''; + @Trace filled: boolean = false; +} + +/** + * 计划小组(含进度与成员)。 + */ +@ObservedV2 +export class PlanGroup { + @Trace id: string = ''; + @Trace name: string = ''; + @Trace checkedCount: number = 0; + @Trace memberCount: number = 0; + @Trace members: PlanMember[] = []; +} + +/** + * 计划页数据。 + */ +@ObservedV2 +export class PlanRecord { + @Trace type: string = PlanType.WEEKLY; + @Trace periodKey: string = ''; + @Trace canSubmit: boolean = true; + @Trace message: string = ''; + @Trace myChecked: boolean = false; + @Trace myContent: string = ''; + @Trace mySubmittedTime: string = ''; + @Trace groups: PlanGroup[] = []; + @Trace members: PlanMember[] = []; + @Trace unassignedCount: number = 0; +} diff --git a/entry/src/main/ets/model/ProfileModels.ets b/entry/src/main/ets/model/ProfileModels.ets new file mode 100644 index 0000000..63151c9 --- /dev/null +++ b/entry/src/main/ets/model/ProfileModels.ets @@ -0,0 +1,25 @@ +/** + * 班级分组(我的页)。 + */ +@ObservedV2 +export class ClassGroup { + @Trace period: string = ''; + @Trace group: string = ''; + @Trace role: string = ''; +} + +/** + * 用户资料。 + */ +@ObservedV2 +export class UserProfile { + @Trace displayName: string = ''; + @Trace name: string = ''; + @Trace studentId: string = ''; + @Trace phone: string = ''; + @Trace role: string = ''; + @Trace group: string = ''; + @Trace loginType: string = ''; + @Trace avatarUrl: string = ''; + @Trace classGroups: ClassGroup[] = []; +}