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>
30 lines
656 B
TypeScript
30 lines
656 B
TypeScript
import {
|
|
Entity,
|
|
PrimaryGeneratedColumn,
|
|
Column,
|
|
OneToOne,
|
|
JoinColumn,
|
|
Index,
|
|
} from 'typeorm';
|
|
import { Attachment } from './attachment.entity';
|
|
|
|
@Entity('Contents')
|
|
export class Content {
|
|
@PrimaryGeneratedColumn({ type: 'int' })
|
|
Id!: number;
|
|
|
|
@Index('IX_Contents_AttachmentEntityId', { unique: true })
|
|
@Column({ type: 'int' })
|
|
AttachmentEntityId!: number;
|
|
|
|
@Column({ name: 'Content', type: 'longblob' })
|
|
Content1!: Buffer;
|
|
|
|
@Column({ type: 'bigint' })
|
|
ContentLength!: number;
|
|
|
|
@OneToOne(() => Attachment, (attachment) => attachment.Content)
|
|
@JoinColumn({ name: 'AttachmentEntityId' })
|
|
AttachmentEntity!: Attachment;
|
|
}
|