models

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FCMData

type FCMData struct {
	Title       string    `json:"title"`
	Body        string    `gorm:"column:body" json:"body"`
	Sound       string    `json:"sound"`
	Icon        string    `json:"icon"`
	ClickAction string    `gorm:"column:click_action" json:"click_action"`
	Link        string    `gorm:"column:link" json:"link"`
	FirstName   string    `gorm:"column:first_name" json:"first_name"`
	CreatedAt   time.Time `gorm:"column:created_at" json:"created_at"`
	ID          int64     `gorm:"column:id" json:"id"`
}

type FCMNotification

type FCMNotification struct {
	Title       string `json:"title"`
	Body        string `gorm:"column:body" json:"body"`
	Sound       string `json:"sound"`
	Link        string `gorm:"column:link" json:"link"`
	ClickAction string `gorm:"column:click_action" json:"click_action"`
	Icon        string `json:"icon"`
}

type Notification

type Notification struct {
	ID        int64     `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
	Link      string    `gorm:"column:link" json:"link"`
	Sender    uint      `gorm:"column:sender" json:"sender"`
	Title     string    `gorm:"column:title" json:"title"`
	Body      string    `gorm:"column:body" json:"body"`
	Data      string    `gorm:"column:data" json:"data"`
	CreatedAt time.Time `gorm:"column:created_at" json:"created_at"`
}

func (*Notification) TableName

func (n *Notification) TableName() string

type NotificationData

type NotificationData struct {
	Users        []int
	Roles        []int
	Data         FCMData         `json:"data"`
	Notification FCMNotification `json:"notification"`
}

type NotificationOracle

type NotificationOracle struct {
	ID        int64     `gorm:"column:ID;primaryKey;autoIncrement" json:"id"`
	Link      string    `gorm:"column:LINK" json:"link"`
	Sender    uint      `gorm:"column:SENDER" json:"sender"`
	Title     string    `gorm:"column:TITLE" json:"title"`
	Body      string    `gorm:"column:BODY" json:"body"`
	Data      string    `gorm:"column:DATA" json:"data"`
	CreatedAt time.Time `gorm:"column:CREATED_AT" json:"created_at"`
}

func (*NotificationOracle) TableName

func (n *NotificationOracle) TableName() string

type NotificationStatus

type NotificationStatus struct {
	ID         int64     `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
	NotifID    int64     `gorm:"column:notif_id" json:"notif_id"`
	ReceiverID int64     `gorm:"column:receiver_id" json:"receiver_id"`
	Seen       int       `gorm:"column:seen" json:"seen"`
	SeenTime   time.Time `gorm:"column:seen_time" json:"seen_time"`
}

func (*NotificationStatus) TableName

func (n *NotificationStatus) TableName() string

type NotificationStatusOracle

type NotificationStatusOracle struct {
	ID         int64     `gorm:"column:ID;primaryKey;autoIncrement" json:"id"`
	NotifID    int64     `gorm:"column:NOTIF_ID" json:"notif_id"`
	ReceiverID int64     `gorm:"column:RECEIVER_ID" json:"receiver_id"`
	Seen       int       `gorm:"column:SEEN" json:"seen"`
	SeenTime   time.Time `gorm:"column:SEEN_TIME" json:"seen_time"`
}

func (*NotificationStatusOracle) TableName

func (n *NotificationStatusOracle) TableName() string

type NotificationStatusUUID

type NotificationStatusUUID struct {
	ID         string    `gorm:"column:id;primaryKey;autoIncrement;default:gen_random_uuid();type:uuid" json:"id"`
	NotifID    string    `gorm:"column:notif_id;type:uuid" json:"notif_id"`
	ReceiverID string    `gorm:"column:receiver_id;type:uuid" json:"receiver_id"`
	Seen       int       `gorm:"column:seen" json:"seen"`
	SeenTime   time.Time `gorm:"column:seen_time" json:"seen_time"`
}

func (*NotificationStatusUUID) TableName

func (n *NotificationStatusUUID) TableName() string

type NotificationTarget

type NotificationTarget struct {
	ID            int64  `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
	Link          string `gorm:"column:link" json:"link"`
	Title         string `gorm:"column:title" json:"title"`
	Body          string `gorm:"column:body" json:"body"`
	SchemaId      int    `gorm:"column:schema_id" json:"schema_id"`
	TargetRole    int    `gorm:"column:target_role" json:"target_role"`
	Condition     string `gorm:"column:condition" json:"condition"`
	TargetActions string `gorm:"column:target_actions" json:"target_actions"`
}

func (*NotificationTarget) TableName

func (n *NotificationTarget) TableName() string

type NotificationTargetOracle

type NotificationTargetOracle struct {
	ID            int64  `gorm:"column:ID;primaryKey;autoIncrement" json:"id"`
	Link          string `gorm:"column:LINK" json:"link"`
	Title         string `gorm:"column:TITLE" json:"title"`
	Body          string `gorm:"column:BODY" json:"body"`
	SchemaId      int    `gorm:"column:SCHEMA_ID" json:"schema_id"`
	TargetRole    int    `gorm:"column:TARGET_ROLE" json:"target_role"`
	Condition     string `gorm:"column:CONDITION" json:"condition"`
	TargetActions string `gorm:"column:TARGET_ACTIONS" json:"target_actions"`
}

func (*NotificationTargetOracle) TableName

func (n *NotificationTargetOracle) TableName() string

type NotificationUUID

type NotificationUUID struct {
	ID        string    `gorm:"column:id;primaryKey;autoIncrement;default:gen_random_uuid();type:uuid" json:"id"`
	Link      string    `gorm:"column:link" json:"link"`
	Sender    string    `gorm:"column:sender" json:"sender"`
	Title     string    `gorm:"column:title" json:"title"`
	Body      string    `gorm:"column:body" json:"body"`
	Data      string    `gorm:"column:data" json:"data"`
	CreatedAt time.Time `gorm:"column:created_at" json:"created_at"`
}

func (*NotificationUUID) TableName

func (n *NotificationUUID) TableName() string

type Payload

type Payload struct {
	RegistrationIds []string        `json:"registration_ids"`
	Data            interface{}     `json:"data"`
	Notification    FCMNotification `json:"notification"`
}

type UserFcmTokens

type UserFcmTokens struct {
	ID       int64  `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
	UserID   int    `gorm:"column:user_id" json:"user_id"`
	FcmToken string `gorm:"column:fcm_token" json:"fcm_token"`
}

func (*UserFcmTokens) TableName

func (u *UserFcmTokens) TableName() string

type UserFcmTokensOracle

type UserFcmTokensOracle struct {
	ID       int64  `gorm:"column:ID;primaryKey;autoIncrement" json:"id"`
	UserID   int    `gorm:"column:USER_ID" json:"user_id"`
	FcmToken string `gorm:"column:FCM_TOKEN" json:"fcm_token"`
}

func (*UserFcmTokensOracle) TableName

func (u *UserFcmTokensOracle) TableName() string

type UserFcmTokensUUID

type UserFcmTokensUUID struct {
	ID       string `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
	UserID   string `gorm:"column:user_id" json:"user_id"`
	FcmToken string `gorm:"column:fcm_token" json:"fcm_token"`
}

func (*UserFcmTokensUUID) TableName

func (u *UserFcmTokensUUID) TableName() string

type UserNotifications

type UserNotifications struct {
	ID         int64      `gorm:"column:id;primaryKey;autoIncrement;" json:"id"`
	Link       string     `gorm:"column:link" json:"link"`
	Sender     string     `gorm:"column:sender" json:"sender"`
	Title      string     `gorm:"column:title" json:"title"`
	Body       string     `gorm:"column:body" json:"body"`
	Data       string     `gorm:"column:data" json:"data"`
	CreatedAt  *time.Time `gorm:"column:created_at" json:"created_at"`
	SID        int64      `gorm:"column:sid" json:"sid"`
	ReceiverID int64      `gorm:"column:receiver_id" json:"receiver_id"`
	Seen       int        `gorm:"column:seen" json:"seen"`
	SeenTime   *time.Time `gorm:"column:seen_time" json:"seen_time"`
	FirstName  string     `gorm:"column:first_name" json:"first_name"`
	Login      string     `gorm:"column:login" json:"login"`
}

type UserNotificationsOracle

type UserNotificationsOracle struct {
	ID         int64      `gorm:"column:ID;primaryKey;autoIncrement;" json:"id"`
	Link       string     `gorm:"column:LINK" json:"link"`
	Sender     string     `gorm:"column:SENDER" json:"sender"`
	Title      string     `gorm:"column:TITLE" json:"title"`
	Body       string     `gorm:"column:BODY" json:"body"`
	CreatedAt  *time.Time `gorm:"column:CREATED_AT" json:"created_at"`
	SID        int64      `gorm:"column:SID" json:"sid"`
	ReceiverID int64      `gorm:"column:RECEIVER_ID" json:"receiver_id"`
	Seen       int        `gorm:"column:SEEN" json:"seen"`
	SeenTime   *time.Time `gorm:"column:SEEN_TIME" json:"seen_time"`
	FirstName  string     `gorm:"column:FIRST_NAME" json:"first_name"`
	Login      string     `gorm:"column:LOGIN" json:"login"`
}

type UserNotificationsUUID

type UserNotificationsUUID struct {
	ID         string     `gorm:"column:id" json:"id"`
	Link       string     `gorm:"column:link" json:"link"`
	Sender     string     `gorm:"column:sender" json:"sender"`
	Title      string     `gorm:"column:title" json:"title"`
	Body       string     `gorm:"column:body" json:"body"`
	Data       string     `gorm:"column:data" json:"data"`
	CreatedAt  *time.Time `gorm:"column:created_at" json:"created_at"`
	SID        string     `gorm:"column:sid" json:"sid"`
	ReceiverID string     `gorm:"column:receiver_id" json:"receiver_id"`
	Seen       int        `gorm:"column:seen" json:"seen"`
	SeenTime   *time.Time `gorm:"column:seen_time" json:"seen_time"`
	FirstName  string     `gorm:"column:first_name" json:"first_name"`
	Login      string     `gorm:"column:login" json:"login"`
}

Jump to

Keyboard shortcuts

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