Table of Contents

Class News

Namespace
GastroSky.Models
Assembly
GastroSky.Models.dll

News article.

[Table("News")]
[Index("Slug", new string[] { }, IsUnique = true)]
[Index("AuthorName", new string[] { }, IsUnique = false)]
[Index("PublicationTimestampUTC", new string[] { }, IsUnique = false)]
public class News
Inheritance
News
Inherited Members

Properties

AuthorName

The news article's author name.

public string? AuthorName { get; set; }

Property Value

string

AuthorUser

User responsible for this News article.

[ForeignKey("AuthorUserId")]
public User? AuthorUser { get; set; }

Property Value

User

AuthorUserId

Id of the User responsible for this News article.

public long? AuthorUserId { get; set; }

Property Value

long?

CreationTimestampUTC

Unix-timestamp of when this News article was inserted into the DB for the first time (as a draft).

public required long CreationTimestampUTC { get; set; }

Property Value

long

Id

Sequential integer primary key.

[Key]
public long Id { get; set; }

Property Value

long

LastModificationTimestampUTC

Unix-timestamp of when this News article was last modified.

public long? LastModificationTimestampUTC { get; set; }

Property Value

long?

LastModifiedByUserId

Id of the User who last modified this News article.

public long? LastModifiedByUserId { get; set; }

Property Value

long?

MarkdownTranslationsJson

Translations payload in JSON format for the news article's main body (in markdown format).

[Column(TypeName = "jsonb")]
public required TranslatableField MarkdownTranslationsJson { get; set; }

Property Value

TranslatableField

NewsPictureBytes

News picture bytes. Could be PNG, could be JPG, could be anything. Client implementation decides. The only important thing to keep in mind here is that response DTO's (and requests too) encode this as Base64!

[NotMapped]
public byte[]? NewsPictureBytes { get; set; }

Property Value

byte[]

NewsPictureFileGuid

Remote file access token of the news picture. Could be PNG, could be JPG, could be anything.

public Guid? NewsPictureFileGuid { get; set; }

Property Value

Guid?

Remarks

Client implementation decides. The only important thing to keep in mind here is that response DTO's (and requests too) encode this as Base64!

PublicationTimestampUTC

Unix-timestamp of when this Post was published. null if it has not been published yet.

public long? PublicationTimestampUTC { get; set; }

Property Value

long?

Slug

Slug string that uniquely identifies the news article.

[MaxLength(8)]
public required string Slug { get; set; }

Property Value

string

SubtitleTranslationsJson

Translations payload for the various subtitle variants.

[Column(TypeName = "jsonb")]
public TranslatableField? SubtitleTranslationsJson { get; set; }

Property Value

TranslatableField

TitleTranslationsJson

Translations payload for the various title variants.

[Column(TypeName = "jsonb")]
public required TranslatableField TitleTranslationsJson { get; set; }

Property Value

TranslatableField