Skip to content
Snippets Groups Projects
Commit 11b954e7 authored by areynold's avatar areynold
Browse files

Merge branch 'feature/cafe-v2' into develop

parents 10d06490 d764aa1f
No related branches found
No related tags found
No related merge requests found
......@@ -16,4 +16,8 @@
<PackageReference Include="System.Xml.XmlSerializer" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="V2\Cafe\" />
</ItemGroup>
</Project>
......@@ -2,39 +2,40 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>BeckmanComms.Api.DataTransferObjects</id>
<version>2.0.0-alpha01</version>
<version>2.0.0-alpha02</version>
<title>Beckman API Data Transfer Objects</title>
<authors>areynold</authors>
<owners>Beckman Institute; University of Illinois</owners>
<projectUrl>https://gitlab.engr.illinois.edu/beckmancomms/beckman-api</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<projectUrl>https://gitlab.engr.illinois.edu/beckmancomms/beckmancomms-api-datatransferobjects</projectUrl>
<description>Model classes for use with the Beckman Institute web API.</description>
<summary>Model classes for use with the Beckman Institute web API.</summary>
<releaseNotes>
<releaseNotes>2.0.0-alpha02:
* Add V2 cafe DTOs.
2.0.0-alpha01:
* Correct class namespaces to reference assembly name.
1.1.0-alpha01:
* Add initial V2 directory DTOs
* Add initial V2 directory DTOs.
1.0.0:
* Migrate to .net standard library project.
* Rename project. (Was Api.DataTransferObjects.)
* Include only live (v1) api DTOs
* Rename project. (Was Api.DataTransferObjects.).
* Include only live (v1) api DTOs.
0.0.4:
* Correct project link
* Set System.Xml.XmlSerializer dependency
* Correct project link.
* Set System.Xml.XmlSerializer dependency.
0.0.3:
* Correct docstring typo
* Correct docstring typo.
0.0.2:
* Add v1, v2 docstrings
* Add v1, v2 docstrings.
0.0.1:
* Package initial v1, v2 data transfer objects.
</releaseNotes>
* Package initial v1, v2 data transfer objects.</releaseNotes>
<copyright>Copyright 2017, University of Illinois Board of Trustees</copyright>
<language>en-US</language>
<tags>mvc, dto, api, beckman, uiuc, illinois</tags>
......@@ -60,6 +61,6 @@
<file src="bin\Release\netstandard1.4\BeckmanComms.Api.DataTransferObjects.deps.json" target="lib\netstandard1.4\BeckmanComms.Api.DataTransferObjects.deps.json" />
<file src="bin\Release\netstandard1.4\BeckmanComms.Api.DataTransferObjects.dll" target="lib\netstandard1.4\BeckmanComms.Api.DataTransferObjects.dll" />
<file src="bin\Release\netstandard1.4\BeckmanComms.Api.DataTransferObjects.pdb" target="lib\netstandard1.4\BeckmanComms.Api.DataTransferObjects.pdb" />
<file src="bin\Release\netstandard1.4\BeckmanComms.Api.DataTransferObjects.xml" target="lib\netstandard1.4\BeckmanComms.Api.DataTransferObjects.xml" />
<file src="bin\Release\shared\BeckmanComms.Api.DataTransferObjects.xml" target="lib\netstandard1.4\BeckmanComms.Api.DataTransferObjects.xml" />
</files>
</package>
\ No newline at end of file
......@@ -18,7 +18,7 @@ The DTO project should be repackaged and published with each update to the `Api.
* Summarize version changes in the **Release Notes** field.
* Update package dependencies if needed.
7. Save Metadata (**File > Save Metadata As...**) `Api.DataTransferObjects.nuspec` in the Api.DataTransferObjects project folder and commit to version control.
8. Save package (**File > Save As...**) `G:\External Relations\CommsInternalNuGetFeed\Api.DataTransferObjects.{version}`.
8. Save package (**File > Save As...**) `G:\NuGetFeed\BeckmanComms.Api.DataTransferObjects.{version}`.
### Resources
......@@ -31,7 +31,7 @@ The DTO project should be repackaged and published with each update to the `Api.
0. In Visual Studio, open your NuGet package sources config (**Tools > Options > NuGet Package Manager > Package Sources**).
1. Click the **+** icon to add a new source with default settings.
* In the **Name** field, give the feed a meaningful name (e.g., "Beckman Internal Feed").
* Use the **...** icon next to the **Source** field to browse to `G:\External Relations\CommsInternalNuGetFeed`.
* Use the **...** icon next to the **Source** field to browse to `G:\NuGetFeed`.
2. Click **Update**.
3. Click **OK**.
4. Search and install NuGet packages as usual.
\ No newline at end of file
using System;
namespace BeckmanComms.Api.DataTransferObjects.V2.Cafe
{
/// <summary>
/// Data Transfer Object representing a cafe announcement.
/// </summary>
public class CafeAnnouncementDto
{
/// <summary>
/// Date to post the announcement.
/// </summary>
public DateTime Date { get; set; }
/// <summary>
/// Message to be displayed in the announcement.
/// </summary>
public string Message { get; set; }
}
}
\ No newline at end of file
using System.Collections.Generic;
namespace BeckmanComms.Api.DataTransferObjects.V2.Cafe
{
/// <summary>
/// Data Transfer Object representing a
/// </summary>
public class DishDto
{
/// <summary>
/// The name of the dish.
/// </summary>
public string Name { get; set; }
/// <summary>
/// The category of the dish (e.g., Soup, Sandwich, Salad).
/// </summary>
public string Category { get; set; }
/// <summary>
/// The description of the dish.
/// </summary>
public string Description { get; set; }
/// <summary>
/// The path to the image of the dish.
/// </summary>
public string Image { get; set; }
/// <summary>
/// The description of the image of the dish, suitable for use as alt text.
/// </summary>
public string ImageDescription { get; set; }
/// <summary>
/// The standard price of the dish.
/// </summary>
public double StandardPrice { get; set; }
/// <summary>
/// The price of a half-order of the dish, when available.
/// </summary>
public double? HalfPrice { get; set; }
/// <summary>
/// Indicates whether the item is available every day ( <c>DishDto.Specialty == false</c>) or
/// as an occasional specialty item ( <c>DishDto.Specialty == true</c>).
/// </summary>
public bool Specialty { get; set; }
/// <summary>
/// Indicates whether the item is in-stock ( <c>DishDto.SoldOut == false</c>) or sold-out (
/// <c>DishDto.SoldOut == true</c>).
/// </summary>
public bool SoldOut { get; set; }
/// <summary>
/// Indicates whether the item should not be displayed as a featured item (
/// <c>DishDto.Featured == false</c>) or should be displayed as a featured item (
/// <c>DishDto.SoldOut == true</c>).
/// </summary>
public bool Featured { get; set; }
/// <summary>
/// The qualities of a dish (e.g., Vegetarian, Vegan, Gluten Free).
/// </summary>
public IEnumerable<DishQualityDto> DishQualities { get; set; }
}
}
\ No newline at end of file
namespace BeckmanComms.Api.DataTransferObjects.V2.Cafe
{
/// <summary>
/// Data Transfer Object representing a dish quality.
/// </summary>
/// <example>Gluten Free</example>
/// <example>Spicy</example>
/// <example>Vegan</example>
public class DishQualityDto
{
/// <summary>
/// The name of the dish quality.
/// </summary>
public string Name { get; set; }
/// <summary>
/// The icon representing the dish quality.
/// </summary>
public string Icon { get; set; }
/// <summary>
/// The description of the icon representing the dish quality.
/// </summary>
public string IconDescription { get; set; }
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
namespace BeckmanComms.Api.DataTransferObjects.V2.Cafe
{
/// <summary>
/// Data Transfer Object containing combined menu database fields.
/// </summary>
public class MenuDto
{
/// <summary>
/// Menu date in a human-readable format.
/// </summary>
public string Title { get; set; }
/// <summary>
/// Menu date.
/// </summary>
public DateTime Date { get; set; }
/// <summary>
/// Collection containing dishes that belong to this menu.
/// </summary>
public IEnumerable<DishDto> Dishes { get; set; }
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment