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