Compare commits

..

No commits in common. "52e9d3a9088f2086779c267bc75f388deac331f4" and "7bbf769bddaa92ec263d06adb5ccd3199feb8bc4" have entirely different histories.

8 changed files with 22 additions and 23 deletions

View File

@ -25,7 +25,7 @@ export class Address {
/**
* The address's description.
*/
@Column({nullable: true})
@Column()
@IsString()
@IsOptional()
description?: string;
@ -43,7 +43,7 @@ export class Address {
* The address's second line.
* Containing optional information.
*/
@Column({nullable: true})
@Column()
@IsString()
@IsOptional()
address2?: string;

View File

@ -5,7 +5,6 @@ import {
IsNotEmpty,
IsOptional,
IsPhoneNumber,
IsPositive,
IsString,
} from "class-validator";
import { Address } from "./Address";
@ -37,7 +36,7 @@ export class GroupContact {
* The contact's middle name.
* Optional
*/
@Column({nullable: true})
@Column()
@IsOptional()
@IsString()
middlename?: string;
@ -46,7 +45,7 @@ export class GroupContact {
* The contact's last name.
*/
@Column()
@IsNotEmpty()
@IsOptional()
@IsString()
lastname: string;
@ -62,7 +61,7 @@ export class GroupContact {
* The contact's phone number.
* Optional
*/
@Column({nullable: true})
@Column()
@IsOptional()
@IsPhoneNumber("DE")
phone?: string;
@ -71,7 +70,7 @@ export class GroupContact {
* The contact's email address.
* Optional
*/
@Column({nullable: true})
@Column()
@IsOptional()
@IsEmail()
email?: string;

View File

@ -5,7 +5,6 @@ import {
IsNotEmpty,
IsOptional,
IsPhoneNumber,
IsPositive,
IsString,
} from "class-validator";
import { Address } from "./Address";
@ -36,7 +35,7 @@ export abstract class Participant {
* The participant's middle name.
* Optional
*/
@Column({nullable: true})
@Column()
@IsOptional()
@IsString()
middlename?: string;
@ -45,7 +44,7 @@ export abstract class Participant {
* The participant's last name.
*/
@Column()
@IsNotEmpty()
@IsOptional()
@IsString()
lastname: string;
@ -53,6 +52,7 @@ export abstract class Participant {
* The participant's address.
* Optional
*/
@IsOptional()
@ManyToOne(() => Address, address => address.participants)
address?: Address;
@ -60,7 +60,7 @@ export abstract class Participant {
* The participant's phone number.
* Optional
*/
@Column({nullable: true})
@Column()
@IsOptional()
@IsPhoneNumber("DE")
phone?: string;
@ -69,7 +69,7 @@ export abstract class Participant {
* The participant's email address.
* Optional
*/
@Column({nullable: true})
@Column()
@IsOptional()
@IsEmail()
email?: string;

View File

@ -25,10 +25,10 @@ export class ScanStation {
/**
* The station's description.
*/
@Column({nullable: true})
@IsOptional()
@Column()
@IsNotEmpty()
@IsString()
description?: string;
description: string;
/**
* The track this station is associated with.

View File

@ -20,7 +20,7 @@ export class Track {
@PrimaryGeneratedColumn()
@IsOptional()
@IsInt()
id: number;;
id: number;
/**
* The track's name.

View File

@ -41,7 +41,7 @@ export class UserAction {
/**
* The description of change (before-> after; e.g. distance:15->17)
*/
@Column({nullable: true})
@Column()
@IsOptional()
@IsString()
changed: string;

View File

@ -37,8 +37,8 @@ export abstract class UserGroup {
/**
* The group's description
*/
@Column({nullable: true})
@Column()
@IsOptional()
@IsString()
description?: string;
description: string;
}