Skip to content
Snippets Groups Projects
Commit 1a627a7a authored by Matheus Horstmann's avatar Matheus Horstmann :horse:
Browse files

Issue #3: Create form class


Signed-off-by: default avatarMatheus Horstmann <mch15@inf.ufpr.br>
parent 9f4ec77c
No related branches found
No related tags found
2 merge requests!33Develop,!5Issue #3: Create form class
Pipeline #19328 passed
......@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## 0.0.4 - 12-02-2019
### Added
- Class Form #3 (Horstmann)
## 0.0.3 - 07-02-2019
### Changed
- Added a new type of enum ValitationType #2 (Horstmann)
......@@ -11,7 +17,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- ValidationHandle to valited answer given a input #2 (Horstmann)
## 0.0.2 - 05-02-2019
### Added
- EnunHandler to handle types of inputs #4 (Horstmann)
......
/*
* form-creator-api. RESTful API to manage and answer forms.
* Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
* Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
*
* This file is part of form-creator-api.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/*
* form-creator-api. RESTful API to manage and answer forms.
* Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
* Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
*
* This file is part of form-creator-api.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Input } from "./input";
/**
* Form Class to manage project's forms
*/
export class Form {
/** Form Header, as name and propose */
public readonly header: 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 inputs - Forms's question
* @param version - Incremental version of Form
*/
constructor(header: string, inputs: Input[], version: number) {
this.header = header;
this.inputs = inputs;
this.version = version;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment