-
-
Notifications
You must be signed in to change notification settings - Fork 163
Expand file tree
/
Copy pathStar.cs
More file actions
31 lines (23 loc) · 862 Bytes
/
Star.cs
File metadata and controls
31 lines (23 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using JetBrains.Annotations;
using JsonApiDotNetCore.Resources;
using JsonApiDotNetCore.Resources.Annotations;
namespace JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Reading;
[UsedImplicitly(ImplicitUseTargetFlags.Members)]
[Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Reading")]
public sealed class Star : Identifiable<int>
{
[Attr]
public string Name { get; set; } = null!;
[Attr]
public StarKind Kind { get; set; }
[Attr]
public decimal SolarRadius { get; set; }
[Attr]
public decimal SolarMass { get; set; }
[Attr]
public bool IsVisibleFromEarth { get; set; }
[HasMany]
public ISet<Planet> Planets { get; set; } = new HashSet<Planet>();
[HasMany]
public ISet<Constellation> IsPartOf { get; set; } = new HashSet<Constellation>();
}