Initial commit: EKAI v2 - Portal de Notícias IA (React + NestJS)
This commit is contained in:
16
backend/src/entities/admin.entity.ts
Normal file
16
backend/src/entities/admin.entity.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn } from 'typeorm';
|
||||
|
||||
@Entity('admins')
|
||||
export class Admin {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@Column({ unique: true })
|
||||
email: string;
|
||||
|
||||
@Column()
|
||||
password: string;
|
||||
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
}
|
||||
22
backend/src/entities/dica.entity.ts
Normal file
22
backend/src/entities/dica.entity.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn } from 'typeorm';
|
||||
|
||||
@Entity('dicas')
|
||||
export class Dica {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@Column()
|
||||
titulo: string;
|
||||
|
||||
@Column({ type: 'text' })
|
||||
conteudo: string;
|
||||
|
||||
@Column({ type: 'date', nullable: true })
|
||||
data_publicacao: string;
|
||||
|
||||
@Column({ default: true })
|
||||
ativa: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
}
|
||||
25
backend/src/entities/hype.entity.ts
Normal file
25
backend/src/entities/hype.entity.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn } from 'typeorm';
|
||||
|
||||
@Entity('hypes')
|
||||
export class Hype {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@Column()
|
||||
nome: string;
|
||||
|
||||
@Column({ type: 'int' })
|
||||
percentual: number;
|
||||
|
||||
@Column({ nullable: true })
|
||||
icone: string;
|
||||
|
||||
@Column({ type: 'int', default: 0 })
|
||||
ordem: number;
|
||||
|
||||
@Column({ default: true })
|
||||
ativo: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
}
|
||||
16
backend/src/entities/inscrito.entity.ts
Normal file
16
backend/src/entities/inscrito.entity.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn } from 'typeorm';
|
||||
|
||||
@Entity('inscritos')
|
||||
export class Inscrito {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@Column({ unique: true })
|
||||
email: string;
|
||||
|
||||
@Column({ default: true })
|
||||
ativo: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
}
|
||||
37
backend/src/entities/noticia.entity.ts
Normal file
37
backend/src/entities/noticia.entity.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn } from 'typeorm';
|
||||
|
||||
@Entity('noticias')
|
||||
export class Noticia {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@Column()
|
||||
titulo: string;
|
||||
|
||||
@Column({ type: 'text', nullable: true })
|
||||
preview: string;
|
||||
|
||||
@Column({ type: 'text' })
|
||||
conteudo: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
imagem_url: string;
|
||||
|
||||
@Column({ type: 'date', nullable: true })
|
||||
data_publicacao: string;
|
||||
|
||||
@Column({ default: 'normal' })
|
||||
categoria: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
fonte: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
link_fonte: string;
|
||||
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updated_at: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user