File

lib/common/file/entity/audio-file-metadata.entity.ts

Description

The entity stores the audio metadata of the file

Index

Properties

Properties

album
Type : string
Decorators :
@Index()
@Column('varchar', {nullable: true})
artist
Type : string
Decorators :
@Index()
@Column('varchar', {nullable: true})
bitrate
Type : number
Decorators :
@Index()
@Column('int', {nullable: true})
codec
Type : string
Decorators :
@Index()
@Column('varchar', {nullable: true})
codecProfile
Type : string
Decorators :
@Index()
@Column('varchar', {name: 'codec_profile', nullable: true})
container
Type : string
Decorators :
@Index()
@Column('varchar', {nullable: true})
duration
Type : number
Decorators :
@Index()
@Column('decimal', {nullable: true, default: undefined, precision: 15, scale: 10})
genre
Type : string
Decorators :
@Index()
@Column('varchar', {nullable: true})
id
Type : number
Decorators :
@PrimaryGeneratedColumn({zerofill: true})
label
Type : string
Decorators :
@Index()
@Column('varchar', {nullable: true})
numberOfChannels
Type : number
Decorators :
@Index()
@Column('int', {name: 'number_of_channels', nullable: true})
sampleRate
Type : number
Decorators :
@Index()
@Column('int', {name: 'sample_rate', nullable: true})
title
Type : string
Decorators :
@Index()
@Column('varchar', {nullable: true})
tool
Type : string
Decorators :
@Index()
@Column('varchar', {nullable: true})
year
Type : number
Decorators :
@Index()
@Column('int', {nullable: true})
import { Column, Entity, Index, PrimaryGeneratedColumn } from "typeorm";
import { AudioFileMetadata } from "../file.types";

/**
 * The entity stores the audio metadata of the file
 */
@Entity("file_metadata_audio")
export class AudioFileMetadataEntity implements AudioFileMetadata {
  @PrimaryGeneratedColumn({ zerofill: true })
  id: number;

  @Index()
  @Column("varchar", { nullable: true })
  container: string;

  @Index()
  @Column("varchar", { nullable: true })
  codec: string;

  @Index()
  @Column("int", { name: "sample_rate", nullable: true })
  sampleRate: number;

  @Index()
  @Column("int", { name: "number_of_channels", nullable: true })
  numberOfChannels: number;

  @Index()
  @Column("int", { nullable: true })
  bitrate: number;

  @Index()
  @Column("varchar", { name: "codec_profile", nullable: true })
  codecProfile: string;

  @Index()
  @Column("varchar", { nullable: true })
  tool: string;

  @Index()
  @Column("decimal", {
    nullable: true,
    default: null,
    precision: 15,
    scale: 10,
  })
  duration: number;

  @Index()
  @Column("varchar", { nullable: true })
  title: string;

  @Index()
  @Column("varchar", { nullable: true })
  artist: string;

  @Index()
  @Column("varchar", { nullable: true })
  album: string;

  @Index()
  @Column("int", { nullable: true })
  year: number;

  @Index()
  @Column("varchar", { nullable: true })
  genre: string;

  @Index()
  @Column("varchar", { nullable: true })
  label: string;
}

results matching ""

    No results matching ""