models

package
v0.0.0-...-81f846a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Campaign

type Campaign struct {
	ID               int            `json:"campaignid"`
	CampaignName     sql.NullString `json:"campaignname" validate:"required,min=1,max=100"`
	ReferenceArtists sql.NullString `json:"referenceartists" validate:"required"`
	TrelloLink       sql.NullString `json:"trello_link"`
	SpotifyLink      sql.NullString `json:"spotify_link"`
	LaunchDate       sql.NullString `json:"launch_date" validate:"required,datetime=2006-01-02"`
	PromotedArtist   sql.NullString `json:"promoted_artist" validate:"required,min=1,max=100"`
}

func (Campaign) MarshalJSON

func (c Campaign) MarshalJSON() ([]byte, error)

MarshalJSON implements a custom JSON marshaler for Campaign

type Playlist

type Playlist struct {
	ID                    int            `json:"playlistid"`
	PlaylisterId          int            `json:"playlisterid" validate:"required,min=1"`
	PlaylistSpotifyId     sql.NullString `json:"playlistspotifyid" validate:"required,min=10,max=100"`
	NumberOfFollowers     int            `json:"numberoffollowers" validate:"min=0"`
	CurrentPlaylistName   sql.NullString `json:"current_playlist_name" validate:"required,min=1,max=200"`
	LastFollowerCountDate sql.NullString `json:"lastfollowercountdate" validate:"omitempty,datetime=2006-01-02"`
	LastExposed           sql.NullString `json:"last_exposed" validate:"omitempty,datetime=2006-01-02"`
}

func (Playlist) MarshalJSON

func (p Playlist) MarshalJSON() ([]byte, error)

MarshalJSON implements a custom JSON marshaler for Playlist

type PlaylistCampaign

type PlaylistCampaign struct {
	PlaylistID       int            `json:"playlistid" validate:"required,min=1"`
	CampaignID       int            `json:"campaignid" validate:"required,min=1"`
	PlaylisterId     int            `json:"playlisterid" validate:"required,min=1"`
	ReferenceArtists sql.NullString `json:"referenceartists" validate:"required"`
	PlacementStatus  sql.NullString `json:"placementstatus" validate:"required,oneof=Pending Placed Rejected"`
	NumberOfMessages int            `json:"numberofmessages" validate:"min=0"`
	Purchased        bool           `json:"purchased"`
}

func (PlaylistCampaign) MarshalJSON

func (pc PlaylistCampaign) MarshalJSON() ([]byte, error)

type Playlister

type Playlister struct {
	ID                int            `json:"playlisterid"`
	SpotifyUserID     sql.NullString `json:"spotifyuserid" validate:"required,min=5,max=50"`
	CuratorFullName   sql.NullString `json:"curatorfullname" validate:"required,min=2,max=100"`
	Email             sql.NullString `json:"email" validate:"required,email"`
	Instagram         sql.NullString `json:"instagram" validate:"omitempty,min=3,max=30"`
	Facebook          sql.NullString `json:"facebook" validate:"omitempty,min=5,max=50"`
	Whatsapp          sql.NullString `json:"whatsapp" validate:"omitempty,e164"`
	LastContacted     sql.NullString `json:"lastcontacted" validate:"omitempty,datetime=2006-01-02"`
	PreferredLanguage sql.NullString `json:"preferredlanguage" validate:"required,iso639_1"`
	FollowupStatus    sql.NullString `json:"followupstatus" validate:"required,oneof=Pending InProgress Completed"`
}

func (Playlister) MarshalJSON

func (p Playlister) MarshalJSON() ([]byte, error)

MarshalJSON implements a custom JSON marshaler for Playlister

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL