2023-07-27 05:31:52 +00:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2022-12-25 00:09:46 +00:00
|
|
|
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
|
2023-09-20 02:33:36 +00:00
|
|
|
import { id } from './util/id.js';
|
2023-08-16 08:51:28 +00:00
|
|
|
import type { MiUser } from './User.js';
|
2022-12-25 00:09:46 +00:00
|
|
|
|
2023-08-16 08:51:28 +00:00
|
|
|
@Entity('retention_aggregation')
|
|
|
|
export class MiRetentionAggregation {
|
2022-12-25 00:09:46 +00: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 08:43:13 +00:00
|
|
|
@Index({ unique: true })
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 512, nullable: false,
|
|
|
|
})
|
|
|
|
public dateKey: string;
|
|
|
|
|
2022-12-25 00:09:46 +00:00
|
|
|
@Column({
|
|
|
|
...id(),
|
|
|
|
array: true,
|
|
|
|
})
|
2023-08-16 08:51:28 +00:00
|
|
|
public userIds: MiUser['id'][];
|
2022-12-25 00:09:46 +00:00
|
|
|
|
|
|
|
@Column('integer', {
|
|
|
|
})
|
|
|
|
public usersCount: number;
|
|
|
|
|
|
|
|
@Column('jsonb', {
|
|
|
|
default: {},
|
|
|
|
})
|
|
|
|
public data: Record<string, number>;
|
|
|
|
}
|