add emoji + tags
This commit is contained in:
37
internal/db/model/emoji.go
Normal file
37
internal/db/model/emoji.go
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
GoToSocial
|
||||
Copyright (C) 2021 GoToSocial Authors admin@gotosocial.org
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type Emoji struct {
|
||||
ID string `pg:"type:uuid,default:gen_random_uuid(),pk,notnull"`
|
||||
Shortcode string `pg:"notnull"`
|
||||
CreatedAt time.Time `pg:"type:timestamp,notnull,default:now()"`
|
||||
UpdatedAt time.Time `pg:"type:timestamp,notnull,default:now()"`
|
||||
ImageFileName string
|
||||
ImageContentType string
|
||||
ImageFileSize string
|
||||
ImageUpdatedAt time.Time `pg:"type:timestamp,notnull,default:now()"`
|
||||
Disabled bool
|
||||
URI string
|
||||
ImageRemoteURL string
|
||||
VisibleInPicker bool
|
||||
CategoryID string
|
||||
}
|
||||
@ -51,6 +51,12 @@ type Status struct {
|
||||
// What is the activitystreams type of this status? See: https://www.w3.org/TR/activitystreams-vocabulary/#object-types
|
||||
// Will probably almost always be Note but who knows!.
|
||||
ActivityStreamsType ActivityStreamsObject
|
||||
// Mentions created in this status -- will not be put in the database along with the status
|
||||
Mentions []*Mention `pg:"-"`
|
||||
// Hashtags used in this status -- will not be put in the database along with the status
|
||||
Tags []*Tag `pg:"-"`
|
||||
// Emojis used in this status -- will not be put in the database along with the status
|
||||
Emojis []*Emoji `pg:"-"`
|
||||
}
|
||||
|
||||
// Visibility represents the visibility granularity of a status.
|
||||
|
||||
36
internal/db/model/tag.go
Normal file
36
internal/db/model/tag.go
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
GoToSocial
|
||||
Copyright (C) 2021 GoToSocial Authors admin@gotosocial.org
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type Tag struct {
|
||||
ID string `pg:"type:uuid,default:gen_random_uuid(),pk,notnull"`
|
||||
Name string `pg:"unique,notnull"`
|
||||
CreatedAt time.Time `pg:"type:timestamp,notnull,default:now()"`
|
||||
UpdatedAt time.Time `pg:"type:timestamp,notnull,default:now()"`
|
||||
Useable bool
|
||||
Trendable bool
|
||||
Listable bool
|
||||
ReviewedAt time.Time
|
||||
RequestedReviewAt time.Time
|
||||
LastStatusAt time.Time
|
||||
MaxScore float32
|
||||
MaxScoreAt time.Time
|
||||
}
|
||||
Reference in New Issue
Block a user