dad0136365
Build and Push Multi-Platform Images / build-and-push (push) Successful in 41s
Reformats code style (line breaks, indentation, type annotations) without changing logic. Also includes minor feature additions bundled in the same lint run (stats service, user-settings groups, agrarmonitor polling improvements). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
35 lines
652 B
TypeScript
35 lines
652 B
TypeScript
import {
|
|
Entity,
|
|
PrimaryGeneratedColumn,
|
|
Column,
|
|
CreateDateColumn,
|
|
UpdateDateColumn,
|
|
} from 'typeorm';
|
|
|
|
@Entity('api_keys')
|
|
export class ApiKey {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id!: string;
|
|
|
|
@Column({ type: 'varchar', length: 100 })
|
|
name!: string;
|
|
|
|
@Column({ type: 'varchar', length: 10 })
|
|
keyPrefix!: string;
|
|
|
|
@Column({ type: 'varchar', length: 64, unique: true })
|
|
keyHash!: string;
|
|
|
|
@CreateDateColumn()
|
|
createdAt!: Date;
|
|
|
|
@UpdateDateColumn()
|
|
updatedAt!: Date;
|
|
|
|
@Column({ type: 'datetime', nullable: true })
|
|
lastUsedAt!: Date | null;
|
|
|
|
@Column({ type: 'datetime', nullable: true })
|
|
expiresAt!: Date | null;
|
|
}
|