All checks were successful
Anatid Blog CI Workflow / test (./backend) (push) Successful in 28s
Anatid Blog CI Workflow / test (./frontend) (push) Successful in 29s
Anatid Blog CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/anatid-blog-backend, ./backend) (push) Successful in 51s
Anatid Blog CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/anatid-blog-frontend, ./frontend) (push) Successful in 43s
Anatid Blog CI Workflow / deploy (push) Successful in 23s
20 lines
348 B
TypeScript
20 lines
348 B
TypeScript
import { Entity, Column, PrimaryGeneratedColumn, OneToMany } from 'typeorm';
|
|
import { Comment } from '../comment/comment.entity';
|
|
|
|
@Entity()
|
|
export class Post {
|
|
|
|
@PrimaryGeneratedColumn()
|
|
id: number;
|
|
|
|
@Column()
|
|
title: string;
|
|
|
|
@Column()
|
|
content: string;
|
|
|
|
@OneToMany(() => Comment, (comment) => comment.post)
|
|
comments: Comment[];
|
|
|
|
}
|