Table of Contents

Class PostImage

Namespace
GastroSky.Models
Assembly
GastroSky.Models.dll

Image upload DB entry in the context of a Post.

[Table("PostImages")]
public class PostImage
Inheritance
PostImage
Inherited Members

Properties

BlurHash

Blur Hash placeholder (https://blurha.sh/)

public string? BlurHash { get; set; }

Property Value

string

ContentType

Content type of the Image uploaded

public required string ContentType { get; set; }

Property Value

string

CreationTimestampUTC

Unix-timestamp of when this image was uploaded.

public required long CreationTimestampUTC { get; set; }

Property Value

long

FileName

File name.

public required string FileName { get; set; }

Property Value

string

FileSizeBytes

File size in bytes.

public required long FileSizeBytes { get; set; }

Property Value

long

Guid

File Guid.

[Key]
public Guid Guid { get; set; }

Property Value

Guid

Notes

Optional notes that describe the image. Only visible by author.

public string? Notes { get; set; }

Property Value

string

Post

Post with which this PostImage is associated.

[ForeignKey("PostId")]
public Post? Post { get; set; }

Property Value

Post

PostId

Id of the Post with which this PostImage is associated.

public long PostId { get; set; }

Property Value

long

SHA256

SHA-256 checksum of the file's bytes.

[MaxLength(64)]
[JsonPropertyName("SHA256")]
public required string SHA256 { get; set; }

Property Value

string