feat(entry): 新增四入口领域模型
This commit is contained in:
56
entry/src/main/ets/model/CheckinModels.ets
Normal file
56
entry/src/main/ets/model/CheckinModels.ets
Normal file
@@ -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[] = [];
|
||||
}
|
||||
32
entry/src/main/ets/model/HomeModels.ets
Normal file
32
entry/src/main/ets/model/HomeModels.ets
Normal file
@@ -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[] = [];
|
||||
}
|
||||
53
entry/src/main/ets/model/PlanModels.ets
Normal file
53
entry/src/main/ets/model/PlanModels.ets
Normal file
@@ -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;
|
||||
}
|
||||
25
entry/src/main/ets/model/ProfileModels.ets
Normal file
25
entry/src/main/ets/model/ProfileModels.ets
Normal file
@@ -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[] = [];
|
||||
}
|
||||
Reference in New Issue
Block a user