nuxt-spring-boot-showcase/frontend/app/types.ts
2025-11-19 20:22:22 -06:00

27 lines
661 B
TypeScript

// TypeScript variants of the Java classes.
// Typically, standalone DTOs (Data Transfer Objects) are used to communicate with the backend,
// but we'll keep it simple here.
export type UiPropertyType = "number" | "string" | "text";
export class TypeProperty {
constructor(public name: string, public type: UiPropertyType) {}
}
export class DataType {
constructor(
public id: string,
public name: string,
public properties: TypeProperty[]
) {}
static empty(): DataType {
return new DataType("", "", []);
}
}
export class DataTypeConfiguration {
constructor(public dataTypes: DataType[]) {}
}
export type Runnable = () => void;