#68 fix model DateTimeTask

parent db6eba31
...@@ -3,6 +3,7 @@ import {User} from './models/User'; ...@@ -3,6 +3,7 @@ import {User} from './models/User';
import {Task} from './models/Task'; import {Task} from './models/Task';
import { Project } from "./models/Project"; import { Project } from "./models/Project";
import { Member } from "./models/Member"; import { Member } from "./models/Member";
import { DateTimeTask } from "./models/DateTimeTask";
export const myDataSource = new DataSource({ export const myDataSource = new DataSource({
type: "postgres", type: "postgres",
...@@ -11,7 +12,7 @@ export const myDataSource = new DataSource({ ...@@ -11,7 +12,7 @@ export const myDataSource = new DataSource({
username: "pluser", username: "pluser",
password: "pluser", password: "pluser",
database: "planner", database: "planner",
entities: [User,Task,Project,Member], entities: [User,Task,Project,Member,DateTimeTask],
logging: true, logging: true,
synchronize: true, // in build switch to false synchronize: true, // in build switch to false
migrationsRun: false migrationsRun: false
......
import { import {
Column,
Entity, Entity,
PrimaryGeneratedColumn, PrimaryGeneratedColumn,
CreateDateColumn, CreateDateColumn,
...@@ -29,10 +28,10 @@ import { ...@@ -29,10 +28,10 @@ import {
@CreateDateColumn({ name: 'createdAt', type: Date, default: new Date() }) @CreateDateColumn({ name: 'createdAt', type: Date, default: new Date() })
createdAt!: Date; createdAt!: Date;
@CreateDateColumn({ name: 'createdAt', type: Date, nullable:false }) @CreateDateColumn({ name: 'dateTimeStart', type: Date, nullable:false })
dateTimeStart!: Date; dateTimeStart!: Date;
@CreateDateColumn({ name: 'createdAt', type: Date, nullable:false }) @CreateDateColumn({ name: 'dateTimeDue', type: Date, nullable:false })
dateTimeDue!: Date; dateTimeDue!: Date;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment