Add jsdoc to all members
- Add jsdoc rule to tslint and fix the new issuespull/4/head
parent
ea8a97beb5
commit
29a1e7bfb3
@ -1,8 +1,10 @@
|
||||
import {BaseError} from "./BaseError";
|
||||
|
||||
/**
|
||||
* An error that is thrown when a group was not found for a specified id
|
||||
*/
|
||||
export class GroupNotFoundError extends BaseError {
|
||||
constructor(groupId: number) {
|
||||
super(`Group ${groupId} not found!`);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,9 +1,11 @@
|
||||
import dataaccess from "../dataAccess";
|
||||
import {BaseError} from "./BaseError";
|
||||
|
||||
/**
|
||||
* An error that is thrown when a request for a sender, receiver and type was not found
|
||||
*/
|
||||
export class RequestNotFoundError extends BaseError {
|
||||
constructor(sender: number, receiver: number, type: dataaccess.RequestType) {
|
||||
super(`Request with sender '${sender}' and receiver '${receiver}' of type '${type}' not found.`);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,18 +1,30 @@
|
||||
import * as sqz from "sequelize";
|
||||
import {Column, ForeignKey, Model, NotNull, Table, Unique} from "sequelize-typescript";
|
||||
import {Column, Model, NotNull, Table, Unique} from "sequelize-typescript";
|
||||
|
||||
/**
|
||||
* Represents an environmental friendly activity that provides points to level up
|
||||
*/
|
||||
@Table({underscored: true})
|
||||
export class Activity extends Model {
|
||||
|
||||
/**
|
||||
* The name of the Activity
|
||||
*/
|
||||
@Unique
|
||||
@NotNull
|
||||
@Column({type: sqz.STRING(128), allowNull: false, unique: true})
|
||||
public name: string;
|
||||
|
||||
/**
|
||||
* The description of the activity to describe what exactly has to be done
|
||||
*/
|
||||
@NotNull
|
||||
@Column({type: sqz.TEXT, allowNull: false})
|
||||
public description: string;
|
||||
|
||||
/**
|
||||
* The points one can get by completing the activity
|
||||
*/
|
||||
@Column
|
||||
public points: number;
|
||||
}
|
||||
|
Loading…
Reference in New Issue