From 887f31dde001a477c1b0048064df618779762299 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sun, 17 Mar 2024 04:23:26 +0100 Subject: [PATCH] goTypes generated from go code with tygo --- frontend/src/Types/goTypes.ts | 88 +++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 frontend/src/Types/goTypes.ts diff --git a/frontend/src/Types/goTypes.ts b/frontend/src/Types/goTypes.ts new file mode 100644 index 0000000..89084b7 --- /dev/null +++ b/frontend/src/Types/goTypes.ts @@ -0,0 +1,88 @@ +// Code generated by tygo. DO NOT EDIT. + +////////// +// source: WeeklyReport.go + +/** + * This is what should be submitted to the server, the username will be derived from the JWT token + */ +export interface NewWeeklyReport { + /** + * The name of the project, as it appears in the database + */ + projectName: string; + /** + * The week number + */ + week: number /* int */; + /** + * Total time spent on development + */ + developmentTime: number /* int */; + /** + * Total time spent in meetings + */ + meetingTime: number /* int */; + /** + * Total time spent on administrative tasks + */ + adminTime: number /* int */; + /** + * Total time spent on personal projects + */ + ownWorkTime: number /* int */; + /** + * Total time spent on studying + */ + studyTime: number /* int */; + /** + * Total time spent on testing + */ + testingTime: number /* int */; +} + +////////// +// source: project.go + +/** + * Project is a struct that holds the information about a project + */ +export interface Project { + id: number /* int */; + name: string; + description: string; + owner: string; +} +/** + * As it arrives from the client, Owner is derived from the JWT token + */ +export interface NewProject { + name: string; + description: string; +} + +////////// +// source: users.go + +/** + * User struct represents a user in the system + */ +export interface User { + userId: string; + username: string; + password: string; +} +/** + * Should be used when registering, for example + */ +export interface NewUser { + username: string; + password: string; +} +/** + * PublicUser represents a user that is safe to send over the API (no password) + */ +export interface PublicUser { + userId: string; + username: string; +}