mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-13 11:03:09 +02:00
eccc90c843
* wip * store ip and headers * Update admin-file.vue * require admin for view ip/headers * IP (recent) 消した * admin必須 * opt in * clean ips periodically * respect logging setting in drive/files/create
24 lines
520 B
TypeScript
24 lines
520 B
TypeScript
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';
|
|
import { id } from '../id.js';
|
|
import { Note } from './note.js';
|
|
import { User } from './user.js';
|
|
|
|
@Entity()
|
|
@Index(['userId', 'ip'], { unique: true })
|
|
export class UserIp {
|
|
@PrimaryGeneratedColumn()
|
|
public id: string;
|
|
|
|
@Column('timestamp with time zone', {
|
|
})
|
|
public createdAt: Date;
|
|
|
|
@Index()
|
|
@Column(id())
|
|
public userId: User['id'];
|
|
|
|
@Column('varchar', {
|
|
length: 128,
|
|
})
|
|
public ip: string;
|
|
}
|