FR-08: Create Property Advertisement
Description
As an authenticated user, I want to create a new property advertisement so that I can rent or sell my property.
Data-model
The data-model should contain the following fields:
- Title (string)
- Description (string)
- Type (enum: rent | sell)
- Property type (enum: apartment | house | other)
- State (enum: available | reserved | unavailable), where unavailable means sold or rented
- Location (string)
- Room count (integer)
- Area (float)
- Floor (integer)
- Floor count (integer), required when property type is not a house
- Price (float)
- Author (reference to User)
Context
This page should be at /properties/new
and use a separate controller.
Acceptance Criteria
-
AC1 - An authenticated user should be able to create a new property advertisement. -
AC2 - The user should be asked for sufficient information about the advertisement. -
AC3 - The user should be prompted with error messages when invalid information is entered (see validation from data-model). -
AC4 - The user should be redirected to the newly created advertisement page after successfully creating it. -
AC5 - Unauthenticated user should be shown an error and redirected to the login page.
Edited by kerdo