Changed nameing scheme for the abstract classes since we're not useing interfaces

ref #11
This commit is contained in:
2020-12-01 17:21:44 +01:00
parent f350007ae5
commit f8e1bf715b
2 changed files with 3 additions and 3 deletions

35
src/models/Scan.ts Normal file
View File

@@ -0,0 +1,35 @@
import { Entity, PrimaryGeneratedColumn, Column } from "typeorm";
import {
IsInt,
IsNotEmpty,
IsOptional,
IsPositive,
} from "class-validator";
/**
* Defines the scan interface.
*/
export abstract class Scan {
/**
* 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;
}