(#22)(#56) Add student info data ware.

This commit is contained in:
MrKBear 2022-01-25 17:11:29 +08:00
parent b2854908a4
commit afae6b7903
2 changed files with 81 additions and 6 deletions

View File

@ -13,22 +13,22 @@ interface IDataParamSettingItem {
/**
*
*/
get: (...P: any) => this["type"] | INone;
get?: ((...P: any) => this["type"]) | INone;
/**
*
*/
set: (...P: [this["type"], ...any]) => any | INone;
set?: ((...P: [this["type"], ...any]) => any) | INone;
/**
*
*/
getAsync?: (...P: any) => Promise<this["type"]> | INone;
getAsync?: ((...P: any) => Promise<this["type"]>) | INone;
/**
*
*/
setAsync?: (...P: [this["type"], ...any]) => Promise<any> | INone;
setAsync?: ((...P: [this["type"], ...any]) => Promise<any>) | INone;
}
/**
@ -54,7 +54,7 @@ type IRegistryItem<S extends IDataParamSettingItem> = {
*
*/
getAsync: S["getAsync"] extends Function ? S["getAsync"] :
S["get"] extends Function ? (...param: Parameters<S["get"]>) => Promise<S["type"]> : INone;
S["get"] extends ((...P: any) => S["type"]) ? (...param: Parameters<S["get"]>) => Promise<S["type"]> : INone;
/**
*
@ -65,7 +65,7 @@ type IRegistryItem<S extends IDataParamSettingItem> = {
*
*/
setAsync: S["setAsync"] extends Function ? S["setAsync"] :
S["set"] extends Function ? (...param: Parameters<S["set"]>) => Promise<ReturnType<S["set"]>> : INone;
S["set"] extends ((...P: [S["type"], ...any]) => any) ? (...param: Parameters<S["set"]>) => Promise<ReturnType<S["set"]>> : INone;
}
/**

View File

@ -0,0 +1,75 @@
import { Data } from "../core/Data";
/**
*
*/
enum LoginStatus {
}
/**
*
*/
type IStudentInfoData = {
/**
*
*/
studentId: {
type: string,
};
/**
*
*/
password: {
type: string
};
/**
*
*
*/
idCardLast6: {
type: string
};
/**
* 使
*/
eduService: {
type: string
};
/**
*
*/
actualName: {
type: string
};
/**
*
*/
isSubscribeWxAccount: {
type: boolean
};
/**
* session
*/
eduSession: {
type: string
};
}
/**
*
*/
class StudentInfo extends Data<IStudentInfoData> {
public override onLoad() {
}
}