Adjusted the comments for tsdoc

ref #8 #3
This commit is contained in:
2020-11-27 22:19:07 +01:00
parent 15552eff54
commit f0a7cbbcae
3 changed files with 24 additions and 9 deletions

View File

@@ -8,23 +8,29 @@ import {
} from "class-validator";
/**
* @classdesc Defines a track of given length.
* @property {number} id - Autogenerated unique id
* @property {string} name - The track's name
* @property {number} lenth - The track's length in meters
* Defines a track of given length.
*/
@Entity()
export class Track {
/**
* Autogenerated unique id (primary key).
*/
@PrimaryGeneratedColumn()
@IsOptional()
@IsInt()
id: number;
/**
* The track's name.
*/
@Column()
@IsString()
@IsNotEmpty()
name: string;
/**
* The track's length in meters.
*/
@Column()
@IsInt()
@IsPositive()