snowballtools-base/packages/backend/src/entity/User.ts
Ashwin Phatak ea3addfd61
Backend package with db models (#43)
* Setup backend package with express server (#11)

* Setup backend package with express server

* Rename ts.config.json to tsconfig.json

* Update lint setup in backend package

* Add a dummy typeorm entity

* Remove dummy entity

---------

Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>

* Setup database connection (#13)

* Setup database connection

* Refactor database initialization into separate function

* Rename index.ts to server.ts

* Use debug package for logging

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>

* Create entities for ER models (#14)

* Add entity for domain

* Add entity for environment variable

* Add entity for project

* Add entity for deployment

* git ignore db directory

* Add entity for organization

* Add entity for user organization and project member

* Add foreign key user and organization to project

---------

Co-authored-by: neerajvijay1997 <111040298+neerajvijay1997@users.noreply.github.com>
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-authored-by: neeraj <neeraj.rtly@gmail.com>
2024-01-16 13:40:14 +05:30

25 lines
351 B
TypeScript

import {
Entity,
PrimaryGeneratedColumn,
Column,
CreateDateColumn
} from 'typeorm';
@Entity()
export class User {
@PrimaryGeneratedColumn()
id!: number;
@Column('varchar', { length: 255 })
name!: string;
@Column()
email!: string;
@CreateDateColumn()
createdAt!: Date;
@CreateDateColumn()
updatedAt!: Date;
}