How to use the @fullstack-one/db.PrimaryGeneratedColumn function in @fullstack-one/db

To help you get started, we’ve selected a few @fullstack-one/db examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fullstack-build / fullstack-one / examples / fullstack-one-example / models / Photo.ts View on Github external
import * as ORM from "@fullstack-one/db";

@ORM.Entity("Photo")
export class Photo extends ORM.BaseEntity {
  @ORM.PrimaryGeneratedColumn("uuid")
  public id: number;

  @ORM.Column()
  public name: string;

  @ORM.Column()
  public description: string;

  @ORM.Column()
  public filename: string;

  @ORM.Column()
  public views: number;

  @ORM.ComputedColumn()
  public isPublished: boolean;