1 /**
2 * Copyright © DiamondMVC 2019
3 * License: MIT (https://github.com/DiamondMVC/Diamond/blob/master/LICENSE)
4 * Author: Jacob Jensen (bausshf)
5 */
6 module diamond.seo.schema.structures.organizations.localbusiness;
7 
8 import diamond.core.apptype;
9 
10 static if (isWeb)
11 {
12   import diamond.seo.schema.structures.organization;
13 
14   /// http://schema.org/LocalBusiness
15   class LocalBusiness : Organization
16   {
17     private:
18     /// The image.
19     string _image;
20     /// The opening hours.
21     string[] _openingHours;
22     /// The price range.
23     string _priceRange;
24 
25     public:
26     /// Creates a new local business.
27     this()
28     {
29       super("LocalBusiness");
30     }
31 
32     /**
33     * Creates a new local business.
34     * Params:
35     *   localBusinessType = The type of the local business.
36     */
37     protected this(string localBusinessType)
38     {
39       super(localBusinessType);
40     }
41 
42     @property
43     {
44       final
45       {
46         /// Gets the image.
47         string image() { return _image; }
48 
49         /// Sets the image.
50         void image(string newImage)
51         {
52           _image = newImage;
53 
54           super.addField("image", _image);
55         }
56 
57         /// Gets the opening hours.
58         string[] openingHours() { return _openingHours; }
59 
60         /// Sets the opening hours.
61         void openingHours(string[] newOpeningHours)
62         {
63           _openingHours = newOpeningHours;
64 
65           super.addField("openingHours", _openingHours);
66         }
67 
68         /// Gets the price range.
69         string priceRange() { return _priceRange; }
70 
71         /// Sets the price range.
72         void priceRange(string newPriceRange)
73         {
74           _priceRange = newPriceRange;
75 
76           super.addField("priceRange", _priceRange);
77         }
78       }
79     }
80   }
81 }