2023-07-27 07:31:52 +02:00
|
|
|
/*
|
2024-02-13 16:59:27 +01:00
|
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
2023-07-27 07:31:52 +02:00
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2022-12-25 01:09:46 +01:00
|
|
|
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
|
2023-09-20 04:33:36 +02:00
|
|
|
import { id } from './util/id.js';
|
2023-08-16 10:51:28 +02:00
|
|
|
import type { MiUser } from './User.js';
|
2022-12-25 01:09:46 +01:00
|
|
|
|
2023-08-16 10:51:28 +02:00
|
|
|
@Entity('retention_aggregation')
|
|
|
|
export class MiRetentionAggregation {
|
2022-12-25 01:09:46 +01:00
|
|
|
@PrimaryColumn(id())
|
|
|
|
public id: string;
|
|
|
|
|
|
|
|
@Index()
|
|
|
|
@Column('timestamp with time zone', {
|
|
|
|
comment: 'The created date of the Note.',
|
|
|
|
})
|
|
|
|
public createdAt: Date;
|
|
|
|
|
|
|
|
@Column('timestamp with time zone', {
|
|
|
|
comment: 'The updated date of the GalleryPost.',
|
|
|
|
})
|
|
|
|
public updatedAt: Date;
|
|
|
|
|
2023-03-15 09:43:13 +01:00
|
|
|
@Index({ unique: true })
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 512, nullable: false,
|
|
|
|
})
|
|
|
|
public dateKey: string;
|
|
|
|
|
2022-12-25 01:09:46 +01:00
|
|
|
@Column({
|
|
|
|
...id(),
|
|
|
|
array: true,
|
|
|
|
})
|
2023-08-16 10:51:28 +02:00
|
|
|
public userIds: MiUser['id'][];
|
2022-12-25 01:09:46 +01:00
|
|
|
|
|
|
|
@Column('integer', {
|
|
|
|
})
|
|
|
|
public usersCount: number;
|
|
|
|
|
|
|
|
@Column('jsonb', {
|
|
|
|
default: {},
|
|
|
|
})
|
|
|
|
public data: Record<string, number>;
|
|
|
|
}
|