parent
a78bbb1de5
commit
aa565c6b34
@ -25,7 +25,7 @@ export class Address {
|
|||||||
/**
|
/**
|
||||||
* The address's description.
|
* The address's description.
|
||||||
*/
|
*/
|
||||||
@Column()
|
@Column({nullable: true})
|
||||||
@IsString()
|
@IsString()
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
description?: string;
|
description?: string;
|
||||||
@ -43,7 +43,7 @@ export class Address {
|
|||||||
* The address's second line.
|
* The address's second line.
|
||||||
* Containing optional information.
|
* Containing optional information.
|
||||||
*/
|
*/
|
||||||
@Column()
|
@Column({nullable: true})
|
||||||
@IsString()
|
@IsString()
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
address2?: string;
|
address2?: string;
|
||||||
|
@ -5,6 +5,7 @@ import {
|
|||||||
IsNotEmpty,
|
IsNotEmpty,
|
||||||
IsOptional,
|
IsOptional,
|
||||||
IsPhoneNumber,
|
IsPhoneNumber,
|
||||||
|
IsPositive,
|
||||||
IsString,
|
IsString,
|
||||||
} from "class-validator";
|
} from "class-validator";
|
||||||
import { Address } from "./Address";
|
import { Address } from "./Address";
|
||||||
@ -36,7 +37,7 @@ export class GroupContact {
|
|||||||
* The contact's middle name.
|
* The contact's middle name.
|
||||||
* Optional
|
* Optional
|
||||||
*/
|
*/
|
||||||
@Column()
|
@Column({nullable: true})
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsString()
|
@IsString()
|
||||||
middlename?: string;
|
middlename?: string;
|
||||||
@ -45,7 +46,7 @@ export class GroupContact {
|
|||||||
* The contact's last name.
|
* The contact's last name.
|
||||||
*/
|
*/
|
||||||
@Column()
|
@Column()
|
||||||
@IsOptional()
|
@IsNotEmpty()
|
||||||
@IsString()
|
@IsString()
|
||||||
lastname: string;
|
lastname: string;
|
||||||
|
|
||||||
@ -61,7 +62,7 @@ export class GroupContact {
|
|||||||
* The contact's phone number.
|
* The contact's phone number.
|
||||||
* Optional
|
* Optional
|
||||||
*/
|
*/
|
||||||
@Column()
|
@Column({nullable: true})
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsPhoneNumber("DE")
|
@IsPhoneNumber("DE")
|
||||||
phone?: string;
|
phone?: string;
|
||||||
@ -70,7 +71,7 @@ export class GroupContact {
|
|||||||
* The contact's email address.
|
* The contact's email address.
|
||||||
* Optional
|
* Optional
|
||||||
*/
|
*/
|
||||||
@Column()
|
@Column({nullable: true})
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsEmail()
|
@IsEmail()
|
||||||
email?: string;
|
email?: string;
|
||||||
|
@ -5,6 +5,7 @@ import {
|
|||||||
IsNotEmpty,
|
IsNotEmpty,
|
||||||
IsOptional,
|
IsOptional,
|
||||||
IsPhoneNumber,
|
IsPhoneNumber,
|
||||||
|
IsPositive,
|
||||||
IsString,
|
IsString,
|
||||||
} from "class-validator";
|
} from "class-validator";
|
||||||
import { Address } from "./Address";
|
import { Address } from "./Address";
|
||||||
@ -35,7 +36,7 @@ export abstract class Participant {
|
|||||||
* The participant's middle name.
|
* The participant's middle name.
|
||||||
* Optional
|
* Optional
|
||||||
*/
|
*/
|
||||||
@Column()
|
@Column({nullable: true})
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsString()
|
@IsString()
|
||||||
middlename?: string;
|
middlename?: string;
|
||||||
@ -44,7 +45,7 @@ export abstract class Participant {
|
|||||||
* The participant's last name.
|
* The participant's last name.
|
||||||
*/
|
*/
|
||||||
@Column()
|
@Column()
|
||||||
@IsOptional()
|
@IsNotEmpty()
|
||||||
@IsString()
|
@IsString()
|
||||||
lastname: string;
|
lastname: string;
|
||||||
|
|
||||||
@ -52,7 +53,6 @@ export abstract class Participant {
|
|||||||
* The participant's address.
|
* The participant's address.
|
||||||
* Optional
|
* Optional
|
||||||
*/
|
*/
|
||||||
@IsOptional()
|
|
||||||
@ManyToOne(() => Address, address => address.participants)
|
@ManyToOne(() => Address, address => address.participants)
|
||||||
address?: Address;
|
address?: Address;
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ export abstract class Participant {
|
|||||||
* The participant's phone number.
|
* The participant's phone number.
|
||||||
* Optional
|
* Optional
|
||||||
*/
|
*/
|
||||||
@Column()
|
@Column({nullable: true})
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsPhoneNumber("DE")
|
@IsPhoneNumber("DE")
|
||||||
phone?: string;
|
phone?: string;
|
||||||
@ -69,7 +69,7 @@ export abstract class Participant {
|
|||||||
* The participant's email address.
|
* The participant's email address.
|
||||||
* Optional
|
* Optional
|
||||||
*/
|
*/
|
||||||
@Column()
|
@Column({nullable: true})
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsEmail()
|
@IsEmail()
|
||||||
email?: string;
|
email?: string;
|
||||||
|
@ -25,10 +25,10 @@ export class ScanStation {
|
|||||||
/**
|
/**
|
||||||
* The station's description.
|
* The station's description.
|
||||||
*/
|
*/
|
||||||
@Column()
|
@Column({nullable: true})
|
||||||
@IsNotEmpty()
|
@IsOptional()
|
||||||
@IsString()
|
@IsString()
|
||||||
description: string;
|
description?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The track this station is associated with.
|
* The track this station is associated with.
|
||||||
|
@ -20,7 +20,7 @@ export class Track {
|
|||||||
@PrimaryGeneratedColumn()
|
@PrimaryGeneratedColumn()
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsInt()
|
@IsInt()
|
||||||
id: number;
|
id: number;;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The track's name.
|
* The track's name.
|
||||||
|
@ -41,7 +41,7 @@ export class UserAction {
|
|||||||
/**
|
/**
|
||||||
* The description of change (before-> after; e.g. distance:15->17)
|
* The description of change (before-> after; e.g. distance:15->17)
|
||||||
*/
|
*/
|
||||||
@Column()
|
@Column({nullable: true})
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsString()
|
@IsString()
|
||||||
changed: string;
|
changed: string;
|
||||||
|
@ -37,8 +37,8 @@ export abstract class UserGroup {
|
|||||||
/**
|
/**
|
||||||
* The group's description
|
* The group's description
|
||||||
*/
|
*/
|
||||||
@Column()
|
@Column({nullable: true})
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsString()
|
@IsString()
|
||||||
description: string;
|
description?: string;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user