Track usage of media files and add a job to clean them
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { IPicture } from "@/types/picture.model";
|
||||
import { IMedia } from "@/types/media.model";
|
||||
|
||||
export enum ActorType {
|
||||
PERSON = "PERSON",
|
||||
@@ -17,17 +17,17 @@ export interface IActor {
|
||||
summary: string;
|
||||
preferredUsername: string;
|
||||
suspended: boolean;
|
||||
avatar?: IPicture | null;
|
||||
banner?: IPicture | null;
|
||||
avatar?: IMedia | null;
|
||||
banner?: IMedia | null;
|
||||
type: ActorType;
|
||||
}
|
||||
|
||||
export class Actor implements IActor {
|
||||
id?: string;
|
||||
|
||||
avatar: IPicture | null = null;
|
||||
avatar: IMedia | null = null;
|
||||
|
||||
banner: IPicture | null = null;
|
||||
banner: IMedia | null = null;
|
||||
|
||||
domain: string | null = null;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Address, IAddress } from "@/types/address.model";
|
||||
import { ITag } from "@/types/tag.model";
|
||||
import { IPicture } from "@/types/picture.model";
|
||||
import { IMedia } from "@/types/media.model";
|
||||
import { IComment } from "@/types/comment.model";
|
||||
import { Paginate } from "@/types/paginate";
|
||||
import { Actor, Group, IActor, IGroup, IPerson } from "./actor";
|
||||
@@ -69,7 +69,7 @@ interface IEventEditJSON {
|
||||
visibility: EventVisibility;
|
||||
joinOptions: EventJoinOptions;
|
||||
draft: boolean;
|
||||
picture?: IPicture | { pictureId: string } | null;
|
||||
picture?: IMedia | { mediaId: string } | null;
|
||||
attributedToId: string | null;
|
||||
onlineAddress?: string;
|
||||
phoneAddress?: string;
|
||||
@@ -96,7 +96,7 @@ export interface IEvent {
|
||||
joinOptions: EventJoinOptions;
|
||||
draft: boolean;
|
||||
|
||||
picture: IPicture | null;
|
||||
picture: IMedia | null;
|
||||
|
||||
organizerActor?: IActor;
|
||||
attributedTo?: IGroup;
|
||||
@@ -142,7 +142,7 @@ export class EventModel implements IEvent {
|
||||
|
||||
physicalAddress?: IAddress;
|
||||
|
||||
picture: IPicture | null = null;
|
||||
picture: IMedia | null = null;
|
||||
|
||||
visibility = EventVisibility.PUBLIC;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
export interface IPicture {
|
||||
export interface IMedia {
|
||||
id: string;
|
||||
url: string;
|
||||
name: string;
|
||||
alt: string;
|
||||
}
|
||||
|
||||
export interface IPictureUpload {
|
||||
export interface IMediaUpload {
|
||||
file: File;
|
||||
name: string;
|
||||
alt: string | null;
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ITag } from "./tag.model";
|
||||
import { IPicture } from "./picture.model";
|
||||
import { IMedia } from "./media.model";
|
||||
import { IActor } from "./actor";
|
||||
|
||||
export enum PostVisibility {
|
||||
@@ -17,7 +17,7 @@ export interface IPost {
|
||||
title: string;
|
||||
body: string;
|
||||
tags?: ITag[];
|
||||
picture?: IPicture | null;
|
||||
picture?: IMedia | null;
|
||||
draft: boolean;
|
||||
visibility: PostVisibility;
|
||||
author?: IActor;
|
||||
|
||||
Reference in New Issue
Block a user