Add not null constrain to media type

pull/4/head
trivernis 5 years ago
parent 76c0574c74
commit 75a7a2cdec

@ -38,7 +38,8 @@ export class Media extends Model<Media> {
/**
* The type of media
*/
@Column({type: sqz.ENUM, values: ["IMAGE", "VIDEO"]})
@NotNull
@Column({type: sqz.ENUM, values: ["IMAGE", "VIDEO"], allowNull: false})
public type: MediaType;
/**

Loading…
Cancel
Save