feature/11-new_classes #15

Merged
niggl merged 55 commits from feature/11-new_classes into dev 2020-12-02 17:48:19 +00:00
Showing only changes of commit a2cf8d1f2c - Show all commits

View File

@ -1,19 +1,35 @@
import { Entity, PrimaryGeneratedColumn, Column } from "typeorm";
import {
IsInt,
IsNotEmpty,
IsOptional,
IsPositive,
} from "class-validator";
/**
* Defines the scan interface.
*/
export interface IScan {
export abstract class IScan {
/**
* Autogenerated unique id (primary key).
*/
@PrimaryGeneratedColumn()
@IsOptional()
@IsInt()
id: number;
/**
* The associated runner.
*/
@Column()
@IsNotEmpty()
runner: Runner;
/**
* The scan's distance in meters.
*/
@Column()
@IsInt()
@IsPositive()
distance: number;
}