Skip to content

Commit

Permalink
Adding basic models and dtos
Browse files Browse the repository at this point in the history
  • Loading branch information
John Nolette committed Jan 8, 2020
1 parent f1c0f07 commit 4a729fd
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 15 deletions.
22 changes: 22 additions & 0 deletions Database.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.ComponentModel.DataAnnotations;

namespace dot_social.Database {
public class User {
}

public class Relationship {
}

public class Profile {
}

public class Location {
}

public class Tag {
}

public class Post {
}
}
31 changes: 31 additions & 0 deletions Models.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;

namespace dot_social.Models {
public class UserDto {
public DateTime Date { get; set; }

public int TemperatureC { get; set; }

public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);

public string Summary { get; set; }
}

public class UserCollectionDto {
}

public class UserProfileDto {
}

public class TagDto {
}

public class TagCollectionDto {
}

public class PostDto {
}

public class PostCollectionDto {
}
}
15 changes: 0 additions & 15 deletions WeatherForecast.cs

This file was deleted.

6 changes: 6 additions & 0 deletions journal/2020-01-08.goal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* [-] TODO: Create defintiions for data transfer objects (DTOs).
* [ ] Create model for `User` entity.
* [ ] Create model for `Post` entity.
* [ ] Decide whether or not a `Comment` entity is necessary.
* [ ] Create model for `Tag` entity.

0 comments on commit 4a729fd

Please sign in to comment.