Added profile pics to all user related models

ref #79
This commit is contained in:
2021-01-08 19:11:50 +01:00
parent d948fe2631
commit 3c37aafe1f
4 changed files with 31 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
import { IsBoolean, IsEmail, IsInt, IsNotEmpty, IsOptional, IsPhoneNumber, IsString, IsUUID } from "class-validator";
import { IsBoolean, IsEmail, IsInt, IsNotEmpty, IsOptional, IsPhoneNumber, IsString, IsUrl, IsUUID } from "class-validator";
import { ChildEntity, Column, JoinTable, ManyToMany, OneToMany } from "typeorm";
import { config } from '../../config';
import { ResponsePrincipal } from '../responses/ResponsePrincipal';
@@ -106,10 +106,10 @@ export class User extends Principal {
* The user's profile picture.
* We haven't decided yet if this will be a bas64 encoded image or just a link to the profile picture.
*/
@Column({ nullable: true, unique: false })
@Column({ nullable: false, unique: false })
@IsString()
@IsOptional()
profilePic?: string;
@IsUrl()
profilePic: string;
/**
* The last time the user requested a password reset.