Files
daily-timer/frontend/wailsjs/go/models.ts
2026-02-10 15:39:17 +03:00

462 lines
14 KiB
TypeScript
Executable File

export namespace models {
export class ParticipantBreakdown {
participantId: number;
name: string;
sessionsAttended: number;
totalSpeakingTime: number;
averageSpeakingTime: number;
overtimeCount: number;
skipCount: number;
attendanceRate: number;
static createFrom(source: any = {}) {
return new ParticipantBreakdown(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.participantId = source["participantId"];
this.name = source["name"];
this.sessionsAttended = source["sessionsAttended"];
this.totalSpeakingTime = source["totalSpeakingTime"];
this.averageSpeakingTime = source["averageSpeakingTime"];
this.overtimeCount = source["overtimeCount"];
this.skipCount = source["skipCount"];
this.attendanceRate = source["attendanceRate"];
}
}
export class AggregatedStats {
totalSessions: number;
totalMeetingTime: number;
averageMeetingTime: number;
overtimeSessions: number;
overtimePercentage: number;
averageAttendance: number;
participantBreakdown: ParticipantBreakdown[];
static createFrom(source: any = {}) {
return new AggregatedStats(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.totalSessions = source["totalSessions"];
this.totalMeetingTime = source["totalMeetingTime"];
this.averageMeetingTime = source["averageMeetingTime"];
this.overtimeSessions = source["overtimeSessions"];
this.overtimePercentage = source["overtimePercentage"];
this.averageAttendance = source["averageAttendance"];
this.participantBreakdown = this.convertValues(source["participantBreakdown"], ParticipantBreakdown);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
export class SessionAttendance {
id: number;
sessionId: number;
participantId: number;
participant?: Participant;
present: boolean;
joinedLate: boolean;
static createFrom(source: any = {}) {
return new SessionAttendance(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.sessionId = source["sessionId"];
this.participantId = source["participantId"];
this.participant = this.convertValues(source["participant"], Participant);
this.present = source["present"];
this.joinedLate = source["joinedLate"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
export class Participant {
id: number;
name: string;
email?: string;
timeLimit: number;
order: number;
active: boolean;
// Go type: time
createdAt: any;
// Go type: time
updatedAt: any;
static createFrom(source: any = {}) {
return new Participant(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.name = source["name"];
this.email = source["email"];
this.timeLimit = source["timeLimit"];
this.order = source["order"];
this.active = source["active"];
this.createdAt = this.convertValues(source["createdAt"], null);
this.updatedAt = this.convertValues(source["updatedAt"], null);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
export class ParticipantLog {
id: number;
sessionId: number;
participantId: number;
participant?: Participant;
// Go type: time
startedAt: any;
// Go type: time
endedAt?: any;
duration: number;
skipped: boolean;
overtime: boolean;
order: number;
static createFrom(source: any = {}) {
return new ParticipantLog(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.sessionId = source["sessionId"];
this.participantId = source["participantId"];
this.participant = this.convertValues(source["participant"], Participant);
this.startedAt = this.convertValues(source["startedAt"], null);
this.endedAt = this.convertValues(source["endedAt"], null);
this.duration = source["duration"];
this.skipped = source["skipped"];
this.overtime = source["overtime"];
this.order = source["order"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
export class MeetingSession {
id: number;
meetingId: number;
// Go type: time
startedAt: any;
// Go type: time
endedAt?: any;
totalDuration: number;
completed: boolean;
participantLogs?: ParticipantLog[];
attendance?: SessionAttendance[];
static createFrom(source: any = {}) {
return new MeetingSession(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.meetingId = source["meetingId"];
this.startedAt = this.convertValues(source["startedAt"], null);
this.endedAt = this.convertValues(source["endedAt"], null);
this.totalDuration = source["totalDuration"];
this.completed = source["completed"];
this.participantLogs = this.convertValues(source["participantLogs"], ParticipantLog);
this.attendance = this.convertValues(source["attendance"], SessionAttendance);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
export class Meeting {
id: number;
name: string;
timeLimit: number;
sessions?: MeetingSession[];
// Go type: time
createdAt: any;
// Go type: time
updatedAt: any;
static createFrom(source: any = {}) {
return new Meeting(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.name = source["name"];
this.timeLimit = source["timeLimit"];
this.sessions = this.convertValues(source["sessions"], MeetingSession);
this.createdAt = this.convertValues(source["createdAt"], null);
this.updatedAt = this.convertValues(source["updatedAt"], null);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
export class QueuedSpeaker {
id: number;
name: string;
timeLimit: number;
order: number;
static createFrom(source: any = {}) {
return new QueuedSpeaker(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.name = source["name"];
this.timeLimit = source["timeLimit"];
this.order = source["order"];
}
}
export class Settings {
id: number;
defaultParticipantTime: number;
defaultMeetingTime: number;
soundEnabled: boolean;
soundWarning: string;
soundTimeUp: string;
soundMeetingEnd: string;
warningThreshold: number;
theme: string;
windowWidth: number;
windowFullHeight: boolean;
static createFrom(source: any = {}) {
return new Settings(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.defaultParticipantTime = source["defaultParticipantTime"];
this.defaultMeetingTime = source["defaultMeetingTime"];
this.soundEnabled = source["soundEnabled"];
this.soundWarning = source["soundWarning"];
this.soundTimeUp = source["soundTimeUp"];
this.soundMeetingEnd = source["soundMeetingEnd"];
this.warningThreshold = source["warningThreshold"];
this.theme = source["theme"];
this.windowWidth = source["windowWidth"];
this.windowFullHeight = source["windowFullHeight"];
}
}
export class SpeakerInfo {
id: number;
name: string;
timeLimit: number;
order: number;
status: string;
static createFrom(source: any = {}) {
return new SpeakerInfo(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.name = source["name"];
this.timeLimit = source["timeLimit"];
this.order = source["order"];
this.status = source["status"];
}
}
export class TimerState {
running: boolean;
paused: boolean;
currentSpeakerId: number;
currentSpeaker: string;
speakerElapsed: number;
speakerLimit: number;
meetingElapsed: number;
meetingLimit: number;
speakerOvertime: boolean;
meetingOvertime: boolean;
warning: boolean;
warningSeconds: number;
totalSpeakersTime: number;
speakingOrder: number;
totalSpeakers: number;
remainingQueue: QueuedSpeaker[];
allSpeakers: SpeakerInfo[];
static createFrom(source: any = {}) {
return new TimerState(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.running = source["running"];
this.paused = source["paused"];
this.currentSpeakerId = source["currentSpeakerId"];
this.currentSpeaker = source["currentSpeaker"];
this.speakerElapsed = source["speakerElapsed"];
this.speakerLimit = source["speakerLimit"];
this.meetingElapsed = source["meetingElapsed"];
this.meetingLimit = source["meetingLimit"];
this.speakerOvertime = source["speakerOvertime"];
this.meetingOvertime = source["meetingOvertime"];
this.warning = source["warning"];
this.warningSeconds = source["warningSeconds"];
this.totalSpeakersTime = source["totalSpeakersTime"];
this.speakingOrder = source["speakingOrder"];
this.totalSpeakers = source["totalSpeakers"];
this.remainingQueue = this.convertValues(source["remainingQueue"], QueuedSpeaker);
this.allSpeakers = this.convertValues(source["allSpeakers"], SpeakerInfo);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
}
export namespace updater {
export class UpdateInfo {
available: boolean;
currentVersion: string;
latestVersion: string;
releaseNotes: string;
downloadURL: string;
downloadSize: number;
static createFrom(source: any = {}) {
return new UpdateInfo(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.available = source["available"];
this.currentVersion = source["currentVersion"];
this.latestVersion = source["latestVersion"];
this.releaseNotes = source["releaseNotes"];
this.downloadURL = source["downloadURL"];
this.downloadSize = source["downloadSize"];
}
}
}