Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a custom transformer URL <=> string #11

Open
github-actions bot opened this issue Sep 8, 2023 · 0 comments
Open

add a custom transformer URL <=> string #11

github-actions bot opened this issue Sep 8, 2023 · 0 comments
Labels

Comments

@github-actions
Copy link

github-actions bot commented Sep 8, 2023

https://api.github.com/vorant94/sofash/blob/fcb3ff714b19baf963f745027eebdd11e63af32c/libs/db/src/event/event.entity.ts#L23

import { Column, Entity, ManyToOne } from 'typeorm';
import { BaseEntity } from '../shared/base.entity.js';
import { EventSourceEntity } from '../event-source/event-source.entity.js';
import { EVENT_LANGUAGES, EventLanguage } from '../shared/event-language.js';

@Entity({ name: 'event' })
export class EventEntity extends BaseEntity {
  @Column()
  title!: string;

  @Column()
  description!: string;

  @Column()
  startingAt!: Date;

  @Column()
  endingAt!: Date;

  @Column({ nullable: true })
  price?: number;

  // TODO add a custom transformer URL <=> string
  @Column()
  detailsUrl!: string;

  @Column()
  city!: string;

  @Column({ type: 'enum', enum: EVENT_LANGUAGES })
  language!: EventLanguage;

  @Column()
  sourceMessageId!: string;

  @Column()
  sourceId!: string;

  @ManyToOne(() => EventSourceEntity)
  source!: EventSourceEntity;
}
@github-actions github-actions bot added the todo label Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

0 participants