Skip to content
This repository was archived by the owner on Feb 2, 2020. It is now read-only.

Comment

Michał B edited this page Feb 10, 2018 · 4 revisions

Description

  • The class describes a comment to the project, created by the user.
  • This class is responsible for modeling the table representation in the database.
  • This class contains methods responsible for acting on it.
  • This class inherits from the Entity class.

Properties

Name Type Access Description
CommentText string public The content of the comment.
CreatedAt DateTime public The date the comment was created.
Deleted bool public A logical variable that indicates the removal of the comment.
CommenterId Guid public User ID 'one to many' relationship in Entity Framework Core.
ProjectID Guid public Project ID for 'one to many' relationship in Entity Framework Core.
Commenter User public Virtual user variable for 'one to many' relationship in Entity Framework Core.
Project Project public Virtual project variable for 'one to many' relationship in Entity Framework Core.

Methods

Name Type Access Description
Comment - public Constructor initializing all object fields, including those related to Entity Framework Core.
SetCommentText void private A method for validating and setting the comment content. Throws an ForbiddenValueException if the context of the comment does not pass the validation.
SetStartDate void private A method for validating and setting the brand start date. Throws an ForbiddenValueException if the brand start date does not pass the validation.
Delete Comment public A method to mark a comment as deleted.

General


Technical documentation

  1. Models

Clone this wiki locally