26 lines
637 B
TypeScript
26 lines
637 B
TypeScript
import { IsNotEmpty, IsDate } from "class-validator";
|
|
import type Notification from "./Notification";
|
|
import type User from "../Notary/User";
|
|
|
|
namespace UserHasNotification {
|
|
export class IUserHasNotification {
|
|
@IsNotEmpty()
|
|
public uuid!: string;
|
|
|
|
@IsNotEmpty({ groups: ["create"] })
|
|
public user!: User.IUser;
|
|
|
|
@IsNotEmpty({ groups: ["create"] })
|
|
public notification!: Notification.INotification;
|
|
|
|
@IsDate()
|
|
public created_at: Date | null = null;
|
|
|
|
@IsDate()
|
|
public updated_at: Date | null = null;
|
|
}
|
|
export type ENotificationStatus = "READ" | "UNREAD";
|
|
}
|
|
|
|
export default UserHasNotification;
|