@@ -13,13 +13,14 @@ import { Address } from "./Address";
|
||||
import { RunnerGroup } from "./RunnerGroup";
|
||||
|
||||
/**
|
||||
* Defines a group's contact.
|
||||
* Defines the GroupContact entity.
|
||||
* Mainly it's own class to reduce duplicate code and enable contact's to be associated with multiple groups.
|
||||
*/
|
||||
@Entity()
|
||||
export class GroupContact {
|
||||
/**
|
||||
* Autogenerated unique id (primary key).
|
||||
*/
|
||||
* Autogenerated unique id (primary key).
|
||||
*/
|
||||
@PrimaryGeneratedColumn()
|
||||
@IsInt()
|
||||
id: number;
|
||||
@@ -34,7 +35,6 @@ export class GroupContact {
|
||||
|
||||
/**
|
||||
* The contact's middle name.
|
||||
* Optional
|
||||
*/
|
||||
@Column({ nullable: true })
|
||||
@IsOptional()
|
||||
@@ -51,7 +51,7 @@ export class GroupContact {
|
||||
|
||||
/**
|
||||
* The contact's address.
|
||||
* Optional
|
||||
* This is a address object to prevent any formatting differences.
|
||||
*/
|
||||
@IsOptional()
|
||||
@ManyToOne(() => Address, address => address.participants, { nullable: true })
|
||||
@@ -59,7 +59,7 @@ export class GroupContact {
|
||||
|
||||
/**
|
||||
* The contact's phone number.
|
||||
* Optional
|
||||
* This will be validated against the configured country phone numer syntax (default: international).
|
||||
*/
|
||||
@Column({ nullable: true })
|
||||
@IsOptional()
|
||||
@@ -68,7 +68,7 @@ export class GroupContact {
|
||||
|
||||
/**
|
||||
* The contact's email address.
|
||||
* Optional
|
||||
* Could later be used to automaticly send mails concerning the contact's associated groups.
|
||||
*/
|
||||
@Column({ nullable: true })
|
||||
@IsOptional()
|
||||
|
||||
Reference in New Issue
Block a user