/* Options: Date: 2024-07-03 12:46:21 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //GlobalNamespace: //MakePartial: True //MakeVirtual: True //MakeInternal: False //MakeDataContractsExtensible: False //AddNullableAnnotations: False //AddReturnMarker: True //AddDescriptionAsComments: True //AddDataContractAttributes: False //AddIndexesToDataMembers: False //AddGeneratedCodeAttributes: False //AddResponseStatus: False //AddImplicitVersion: //InitializeCollections: True //ExportValueTypes: False IncludeTypes: NewsItemQuery.* //ExcludeTypes: //AddNamespaces: //AddDefaultXmlNamespace: http://schemas.servicestack.net/types */ using System; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using ServiceStack; using ServiceStack.DataAnnotations; using System.Globalization; using System.IO; using BokaMera.API.ServiceModel.Interfaces; using BokaMera.API.ServiceModel.Db; using BokaMera.API.ServiceModel.Dtos; namespace BokaMera.API.ServiceModel.Db { public partial class BaseModel { } public partial class NewsItem : BaseModel, IInterval { [Ignore] public virtual bool Active { get; set; } [Required] public virtual Guid CompanyId { get; set; } public virtual int Id { get; set; } [Required] public virtual string Heading { get; set; } [Required] public virtual string Body { get; set; } public virtual string ImageUrl { get; set; } [Required] public virtual DateTime Updated { get; set; } [Required] public virtual DateTime Created { get; set; } public virtual DateTimeOffset? ModifiedDate { get; set; } [Required] public virtual DateTime From { get; set; } [Required] public virtual DateTime To { get; set; } } } namespace BokaMera.API.ServiceModel.Dtos { [Route("/news", "GET")] public partial class NewsItemQuery : QueryDb, IReturn> { /// ///Enter the company you want to see news for, if blank and you are an admin, your company id will be used /// [ApiMember(Description="Enter the company you want to see news for, if blank and you are an admin, your company id will be used", ParameterType="query")] public virtual Guid? CompanyId { get; set; } /// ///Enter the From Date you want to see news from, only allowed if admin /// [ApiMember(DataType="dateTime", Description="Enter the From Date you want to see news from, only allowed if admin", ParameterType="query")] public virtual DateTime? From { get; set; } /// ///Enter the To Date you want to see news to, only allowed if admin /// [ApiMember(DataType="dateTime", Description="Enter the To Date you want to see news to, only allowed if admin", ParameterType="query")] public virtual DateTime? To { get; set; } /// ///Use this parameter if you want to only show active news /// [ApiMember(DataType="boolean", Description="Use this parameter if you want to only show active news")] public virtual bool? Active { get; set; } /// ///The homeage sitepath. /// [ApiMember(Description="The homeage sitepath.")] public virtual string SitePath { get; set; } /// ///If you want to remove Html tags from newsbody and show as plain text. /// [ApiMember(Description="If you want to remove Html tags from newsbody and show as plain text.")] public virtual bool PlainText { get; set; } } public partial class NewsItemQueryResponse { /// ///The news item id /// [ApiMember(Description="The news item id")] public virtual int Id { get; set; } /// ///Heading of the news item /// [ApiMember(Description="Heading of the news item")] public virtual string Heading { get; set; } /// ///Body of the news item /// [ApiMember(Description="Body of the news item")] public virtual string Body { get; set; } /// ///Url to a image associated with the news /// [ApiMember(Description="Url to a image associated with the news")] public virtual Uri ImageUrl { get; set; } /// ///The timestamp from which the newsitem should be visible from /// [ApiMember(Description="The timestamp from which the newsitem should be visible from", IsRequired=true)] public virtual DateTime From { get; set; } /// ///The timestamp to which the newsitem should be visible to /// [ApiMember(Description="The timestamp to which the newsitem should be visible to", IsRequired=true)] public virtual DateTime To { get; set; } /// ///The timestamp when news was created /// [ApiMember(Description="The timestamp when news was created", IsRequired=true)] public virtual DateTime Created { get; set; } public virtual ResponseStatus ResponseStatus { get; set; } } } namespace BokaMera.API.ServiceModel.Interfaces { public partial interface IInterval { DateTime From { get; set; } DateTime To { get; set; } } }