File

lib/common/media/entity/media-format.entity.ts

Description

The entity stores the formats of media objects

Index

Properties

Properties

code
Type : string
Decorators :
@Index({unique: true})
@PrimaryColumn('varchar')
height
Type : string
Decorators :
@Column('smallint', {nullable: true})
name
Type : string
Decorators :
@Index()
@Column('varchar', {nullable: false})
width
Type : string
Decorators :
@Column('smallint', {nullable: true})
import { Column, Entity, Index, PrimaryColumn } from "typeorm";
import { MediaFormat } from "../media.types";

/**
 * The entity stores the formats of media objects
 */
@Entity("medias_format")
export class MediaFormatEntity implements MediaFormat {
  @Index({ unique: true })
  @PrimaryColumn("varchar")
  code: string;

  @Index()
  @Column("varchar", { nullable: false })
  name: string;

  @Column("smallint", { nullable: true })
  width: string;

  @Column("smallint", { nullable: true })
  height: string;
}

results matching ""

    No results matching ""