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