Last active
March 30, 2018 21:05
-
-
Save TripleMap/18763f16e58b724ec119613726877507 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class users_layers extends Model<users_layers> { | |
@AutoIncrement | |
@PrimaryKey | |
@Column(DataType.INTEGER) | |
id: number; | |
@ForeignKey(() => users) | |
@Column(DataType.CHAR(100)) | |
@BelongsTo(() => users) | |
user_id: string; | |
@Column(DataType.CHAR(100)) | |
layer_id: string; | |
} | |
export class users extends Model<users> { | |
@IsUUID(4) | |
@PrimaryKey | |
@Column(DataType.CHAR(100)) | |
@HasMany(() => users_layers) | |
user_layers: users_layers[] | |
id: string; | |
@Column(DataType.CHAR(2044)) | |
user_name: string; | |
@Column(DataType.CHAR(2044)) | |
password: string; | |
@IsEmail | |
@Column(DataType.CHAR(2044)) | |
email: Date; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment