Wonky.Client/Wonky.Entity/DTO/ActivityDto.cs

212 lines
7.2 KiB
C#
Raw Normal View History

2022-03-11 14:21:04 +01:00
// Copyright (C) 2022 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
2022-05-31 19:07:39 +02:00
// it under the terms of the GNU Affero General Public License as
2022-03-11 14:21:04 +01:00
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2022-05-31 19:07:39 +02:00
// GNU Affero General Public License for more details.
2022-03-11 14:21:04 +01:00
//
2022-05-31 19:07:39 +02:00
// You should have received a copy of the GNU Affero General Public License
2022-03-11 14:21:04 +01:00
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
//
using System.ComponentModel.DataAnnotations;
2022-04-18 11:02:03 +02:00
namespace Wonky.Entity.DTO
2022-03-11 14:21:04 +01:00
{
2022-05-31 19:07:39 +02:00
public class ActivityDto
2022-03-11 14:21:04 +01:00
{
2022-06-30 13:47:01 +02:00
/// <summary>
2022-07-01 10:02:29 +02:00
/// Sales representative identification
2022-06-30 13:47:01 +02:00
/// </summary>
2022-06-12 11:43:45 +02:00
public string SalesRep { get; set; } = "";
2022-06-30 13:47:01 +02:00
/// <summary>
2022-07-01 10:02:29 +02:00
/// Sales representative entity Id
2022-06-30 13:47:01 +02:00
/// </summary>
2022-06-12 11:43:45 +02:00
public string SalesRepId { get; set; } = "";
2022-06-30 13:47:01 +02:00
/// <summary>
2022-07-01 10:02:29 +02:00
/// Company entity Id
2022-06-30 13:47:01 +02:00
/// </summary>
2022-04-18 11:02:03 +02:00
public string CompanyId { get; set; } = "";
2022-06-30 13:47:01 +02:00
/// <summary>
2022-07-01 10:02:29 +02:00
/// Business Central entity Id
2022-06-30 13:47:01 +02:00
/// </summary>
2022-06-12 11:43:45 +02:00
public string BcId { get; set; } = "";
2022-06-30 13:47:01 +02:00
/// <summary>
2022-07-01 10:02:29 +02:00
/// Customer account
2022-06-30 13:47:01 +02:00
/// </summary>
2022-04-30 10:06:59 +02:00
public string Account { get; set; } = "";
2022-06-30 13:47:01 +02:00
/// <summary>
2022-07-01 10:02:29 +02:00
/// VAT number
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
public string VatNumber { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Customer name
2022-06-30 13:47:01 +02:00
/// </summary>
[Required(ErrorMessage = "Navn skal udfyldes")]
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
public string Name { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Customer address city name
2022-06-30 13:47:01 +02:00
/// </summary>
[Required(ErrorMessage = "Byanvn skal udfyldes")]
[MaxLength(30, ErrorMessage = "Du kan højst bruge 30 tegn")]
public string City { get; set; }= "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Customer address postal code
2022-06-30 13:47:01 +02:00
/// </summary>
[Required(ErrorMessage = "Postnr. skal udfyldes")]
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
public string ZipCode { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Customer address line 1
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
public string Address1 { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Customer address line 2
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(50, ErrorMessage = "Du kan højst bruge 50 tegn")]
public string Address2 { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Customer office phone
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
public string Phone { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Customer mobile phone
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
public string Mobile { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Customer office email
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(80, ErrorMessage = "Du kan højst bruge 80 tegn")]
public string Email { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Customer attention description
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
public string Attention { get; set; } = "";
2022-03-11 14:21:04 +01:00
// Form entries
2022-06-30 13:47:01 +02:00
/// <summary>
2022-07-01 10:02:29 +02:00
/// Activity type enum as string
2022-06-30 13:47:01 +02:00
/// </summary>
[Required(ErrorMessage = "Vælg aktivitetstype")]
public string ActivityTypeEnum { get; set; } = "";
2022-08-05 13:03:19 +02:00
/// <summary>
/// Flag express order
/// </summary>
public bool Express { get; set; }
2022-06-30 13:47:01 +02:00
/// <summary>
2022-07-01 10:02:29 +02:00
/// Activity status enum as string
2022-06-30 13:47:01 +02:00
/// </summary>
[Required(ErrorMessage = "Vælg status for besøg ")]
public string ActivityStatusEnum { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Visit type enum as string
2022-06-30 13:47:01 +02:00
/// </summary>
2022-06-10 13:26:48 +02:00
public string VisitTypeEnum { get; set; } = "recall";
2022-06-30 13:47:01 +02:00
/// <summary>
2022-07-01 10:02:29 +02:00
/// Activity date
2022-06-30 13:47:01 +02:00
/// </summary>
[Required(ErrorMessage = "Dato skal angives")]
public string ActivityDate { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Product demonstration
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(50, ErrorMessage = "Du kan højst bruge 50 tegn")]
public string Demo { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Our reference - system generated
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
public string OurRef { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Customer reference number
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
public string ReferenceNumber { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Customer reference description
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(35, ErrorMessage = "Du kan højst bruge 35 tegn")]
public string YourRef { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Processing note to office
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(255, ErrorMessage = "Du kan højst bruge 255 tegn")]
public string OrderMessage { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// CRM note for future reference
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(255, ErrorMessage = "Du kan højst bruge 255 tegn")]
public string CrmNote { get; set; } = "";
2022-04-13 15:16:35 +02:00
// Delivery address form entries
2022-06-30 13:47:01 +02:00
/// <summary>
2022-07-01 10:02:29 +02:00
/// Customer delivery name
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
public string DlvName { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Customer delivery address line 1
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
public string DlvAddress1 { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Customer delivery address line 2
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(50, ErrorMessage = "Du kan højst bruge 50 tegn")]
public string DlvAddress2 { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Customer delivery postal code
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
public string DlvZipCode { get; set; } = "";
/// <summary>
2022-07-01 10:02:29 +02:00
/// Customer delivery city name
2022-06-30 13:47:01 +02:00
/// </summary>
[MaxLength(30, ErrorMessage = "Du kan højst bruge 30 tegn")]
public string DlvCity { get; set; } = "";
2022-04-11 11:19:05 +02:00
// Lines
2022-06-30 13:47:01 +02:00
/// <summary>
2022-07-01 10:02:29 +02:00
/// Order lines
2022-06-30 13:47:01 +02:00
/// </summary>
2022-05-31 19:07:39 +02:00
public List<ActivityLineDto> Lines { get; set; } = new();
2022-03-11 14:21:04 +01:00
}
}