Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add reels models final #188

Open
wants to merge 3 commits into
base: feature/add-reels
Choose a base branch
from

Conversation

MarcosFleury
Copy link

No description provided.

@MarcosFleury MarcosFleury self-assigned this Mar 2, 2022
public long MaxThumbnailsPerSprite { get; set; }
public long TotalThumbnailNumPerSprite { get; set; }

bool IEquatable<AnimatedThumbnail>.Equals(AnimatedThumbnail other) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My impressions is that this check should consider fewer fields. For example, when comparing two thumbnails, one could come with a nulled/zeroed ThumbnailsPerRow, and then, even though all the other fields are the same, the program would identify them as being two different entities. I think ThumbnailsPerRow or MaxThumbnailsPerSprite is not an ontological attribute (omg how pedantic) of the AnimatedThumbnail. Also, regarding FileSizeKb, the encoding used by Instagram could change, compression level and other stuff, and this would result in them being different, when, for the end-users, they would be the same


namespace DataLakeModels.Models.Reels {
public class Caption : IEquatable<Caption> {
public string Pk { get; set; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is Pk? Primary Key?

namespace DataLakeModels.Models.Reels {
public class Caption : IEquatable<Caption> {
public string Pk { get; set; }
public string Text { get; set; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TEXT is not a reserved word in PSQL, and even then, quoted strings can always be used, even if they are reserved words. However, I would consider avoiding this, in order not to have any kind of confusion during development

public string ReelId { get; set; }
public string Status { get; set; }
public string MediaId { get; set; }
public long BitFlags { get; set; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this encode?

ContentType == other.ContentType &&
ShareEnabled == other.ShareEnabled &&
CreatedAtUTC == other.CreatedAtUTC &&
DidReportAsSpam == other.DidReportAsSpam &&
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not necessary for equality check

public MashupInfo MashupInfo { get; set; }
public string ShoppingInfo { get; set; }
public string TemplateInfo { get; set; }
public string ChallengeInfo { get; set; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just taking note, this is also something that TikTok has

public string ClipsCreationEntryPoint { get; set; }
public string ViewerInteractionSettings { get; set; }

bool IEquatable<ClipsMeta>.Equals(ClipsMeta other) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the Id enough to guarantee equality? Given that it will be generated by the DB as identity

public bool AllowCreatorToRename { get; set; }
public string ProgressiveDownloadUrl { get; set; }
public bool CanRemixBeSharedToFb { get; set; }
public long? FormattedClipsMediaCount { get; set; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should this be nullable? Can we just set the count to zero if there is no information available?

public string Code { get; set; }
public User User { get; set; }
public string UserId { get; set; }
public Caption Caption { get; set; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can keep all the entity relationships (foreign keys) at the top, for better readability


public ICollection<ReelStats> Stats { get; set; }

bool IEquatable<Reel>.Equals(Reel other) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is too much information. Not only it makes hard to debug, but might hurt performance, if we need to check new entries against thousands of existing entries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants