48 lines
1001 B
TypeScript
48 lines
1001 B
TypeScript
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm"
|
|
|
|
@Entity()
|
|
export class Photo {
|
|
@PrimaryGeneratedColumn()
|
|
id!: number
|
|
|
|
@Column("text", { unique: true })
|
|
src!: string;
|
|
|
|
@Column()
|
|
width!: number
|
|
|
|
@Column()
|
|
height!: number
|
|
|
|
@Column("blob")
|
|
blur!: string
|
|
|
|
@Column("text", { nullable: true })
|
|
camera: string | null = null;
|
|
|
|
// Manually input data
|
|
@Column("text", { nullable: true })
|
|
title: string | null = null;
|
|
|
|
@Column("text", { nullable: true })
|
|
description: string | null = null;
|
|
|
|
// Exif data
|
|
@Column("int", { nullable: true })
|
|
exposureBiasValue: number | null = null
|
|
|
|
@Column("float", { nullable: true })
|
|
fNumber: number | null = null
|
|
|
|
@Column("int", { nullable: true })
|
|
isoSpeedRatings: number | null = null
|
|
|
|
@Column("int", { nullable: true })
|
|
focalLength: number | null = null
|
|
|
|
@Column("date", { nullable: true })
|
|
dateTimeOriginal: Date | null = null
|
|
|
|
@Column("text", { nullable: true })
|
|
lensModel: string | null = null
|
|
} |