Skip to content
Snippets Groups Projects

Resolve "Ler/Escrever formulário da base"

Merged Matheus Horstmann requested to merge 7-ler-escrever-formulario-da-base into develop
Files
8
+ 14
10
@@ -20,28 +20,32 @@
*/
import { Input } from "./input";
/**
* Form Class to manage project's forms
*/
export class Form {
/** Form Header, as name and propose */
public readonly header: string;
/** Unique identifier of a Form instance */
public readonly id: number;
/** Form's title. An human-understandable identifier. Not unique */
public readonly title: string;
/** Form Description, as propose */
public readonly description: string;
/** Array of input. containing question */
public readonly inputs: Input[];
/** Version, a incremental numbert */
public readonly version: number;
/**
* Creates a new instance of Input Class
* @param header - Forms's name and propose.
* @param title - Form's title.
* @param description - Form's description
* @param inputs - Forms's question
* @param version - Incremental version of Form
* @param id - Form's identifier
*/
constructor(header: string, inputs: Input[], version: number) {
this.header = header;
constructor(title: string, description: string, inputs: Input[], id?: number) {
this.id = id ? id : null;
this.title = title;
this.description = description;
this.inputs = inputs;
this.version = version;
}
}
Loading