29 lines
583 B
TypeScript
29 lines
583 B
TypeScript
import {
|
|
IsNotEmpty,
|
|
IsDate,
|
|
IsUrl,
|
|
IsOptional,
|
|
ValidateNested,
|
|
} from "class-validator";
|
|
import UserHasNotification from "./UserHasNotification";
|
|
import Resource from "../Resource";
|
|
import { Type } from "class-transformer";
|
|
|
|
export default class Notification extends Resource {
|
|
public uid?: string;
|
|
|
|
public message!: string;
|
|
|
|
@IsUrl()
|
|
public redirection_url!: string;
|
|
|
|
@IsDate()
|
|
public created_at: Date | null = null;
|
|
|
|
@IsDate()
|
|
public updated_at: Date | null = null;
|
|
|
|
@Type(() => UserHasNotification)
|
|
user_has_notifications?: UserHasNotification[];
|
|
}
|