Commit 448986fe authored by Lucas Fernandes de Oliveira's avatar Lucas Fernandes de Oliveira

Merge branch '3-criar-classe-campo-e-formulario' into 'develop'

Issue #3: Create form class

Closes #3

See merge request !5
parents 9f4ec77c 1a627a7a
Pipeline #19781 passed with stages
in 50 seconds
......@@ -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;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment