Skip to content

Commit

Permalink
fix(all): Sequelize base members demand declare keyword on timestamp …
Browse files Browse the repository at this point in the history
…fields.
  • Loading branch information
rodrigorodriguez committed Jun 13, 2021
1 parent 0202ed0 commit 493889b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions packages/admin.gbapp/models/AdminModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ export class GuaribasAdmin extends Model<GuaribasAdmin> {

@Column
@CreatedAt
public createdAt: Date;
declare public createdAt: Date;

@Column
@UpdatedAt
public updatedAt: Date;
declare public updatedAt: Date;
}
6 changes: 3 additions & 3 deletions packages/analytics.gblib/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class GuaribasConversation extends Model<GuaribasConversation> {

@Column
@CreatedAt
public createdAt: Date;
declare public createdAt: Date;

@Column public text: string;

Expand Down Expand Up @@ -128,11 +128,11 @@ export class GuaribasConversationMessage extends Model<GuaribasConversationMessa

@Column
@CreatedAt
public createdAt: Date;
declare public createdAt: Date;

@Column
@UpdatedAt
public updatedAt: Date;
declare public updatedAt: Date;

//tslint:disable-next-line:no-use-before-declare
@ForeignKey(() => GuaribasConversation)
Expand Down
4 changes: 2 additions & 2 deletions packages/basic.gblib/models/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ export class GuaribasSchedule extends Model<GuaribasSchedule> {

@Column
@CreatedAt
public createdAt: Date;
declare public createdAt: Date;

@Column
@UpdatedAt
public updatedAt: Date;
declare public updatedAt: Date;
}
24 changes: 12 additions & 12 deletions packages/core.gbapp/models/GBModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,11 @@ export class GuaribasInstance extends Model<GuaribasInstance>

@Column
@CreatedAt
public createdAt: Date;
declare public createdAt: Date;

@Column
@UpdatedAt
public updatedAt: Date;
declare public updatedAt: Date;

@Column(DataType.STRING(4000))
public params: string;
Expand Down Expand Up @@ -276,11 +276,11 @@ export class GuaribasPackage extends Model<GuaribasPackage> {

@Column
@CreatedAt
public createdAt: Date;
declare public createdAt: Date;

@Column
@UpdatedAt
public updatedAt: Date;
declare public updatedAt: Date;

@Column({ type: DataType.STRING(512) })
public custom: string;
Expand All @@ -301,11 +301,11 @@ export class GuaribasChannel extends Model<GuaribasChannel> {

@Column
@CreatedAt
public createdAt: Date;
declare public createdAt: Date;

@Column
@UpdatedAt
public updatedAt: Date;
declare public updatedAt: Date;
}

/**
Expand All @@ -331,11 +331,11 @@ export class GuaribasException extends Model<GuaribasException> {

@Column
@CreatedAt
public createdAt: Date;
declare public createdAt: Date;

@Column
@UpdatedAt
public updatedAt: Date;
declare public updatedAt: Date;
}

@Table
Expand All @@ -354,11 +354,11 @@ export class GuaribasApplications extends Model<GuaribasApplications> {

@Column
@CreatedAt
public createdAt: Date;
declare public createdAt: Date;

@Column
@UpdatedAt
public updatedAt: Date;
declare public updatedAt: Date;
}

@Table
Expand All @@ -380,9 +380,9 @@ export class GuaribasSchedule extends Model<GuaribasSchedule> {

@Column
@CreatedAt
public createdAt: Date;
declare public createdAt: Date;

@Column
@UpdatedAt
public updatedAt: Date;
declare public updatedAt: Date;
}
8 changes: 4 additions & 4 deletions packages/kb.gbapp/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ export class GuaribasQuestion extends Model<GuaribasQuestion> {

@Column
@CreatedAt
public createdAt: Date;
declare public createdAt: Date;

@Column
@UpdatedAt
public updatedAt: Date;
declare public updatedAt: Date;

//tslint:disable-next-line:no-use-before-declare
@ForeignKey(() => GuaribasAnswer)
Expand Down Expand Up @@ -207,11 +207,11 @@ export class GuaribasAnswer extends Model<GuaribasAnswer> {

@Column
@CreatedAt
public createdAt: Date;
declare public createdAt: Date;

@Column
@UpdatedAt
public updatedAt: Date;
declare public updatedAt: Date;

@HasMany(() => GuaribasQuestion)
public questions: GuaribasQuestion[];
Expand Down

0 comments on commit 493889b

Please sign in to comment.