dao

package
v0.0.0-...-f435a84 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID            uint      `gorm:"id;primaryKey;autoIncrement"`
	Platform      string    `gorm:"platform"`
	Name          string    `gorm:"name"`
	ChannelCredit string    `gorm:"channel_credit"`
	CreateAt      time.Time `gorm:"create_at"`
	UpdateAt      time.Time `gorm:"update_at"`
}

func (Channel) TableName

func (Channel) TableName() string

type ChannelMapper

type ChannelMapper struct {
	*db.BasicMapper[Channel]
}

func NewChannelMapper

func NewChannelMapper(ds *db.DatabaseSource) (*ChannelMapper, error)

type Content

type Content struct {
	ID            uint         `gorm:"id;primaryKey;autoIncrement"`
	Platform      string       `gorm:"platform"`
	ChannelCredit string       `gorm:"channel_credit"`
	Title         string       `gorm:"title"`
	Thumbnail     string       `gorm:"thumbnail"`
	ContentCredit string       `gorm:"content_credit"`
	State         ContentState `gorm:"state"`
	Path          string       `gorm:"path"`
	CreateAt      time.Time    `gorm:"create_at"`
	UpdateAt      time.Time    `gorm:"update_at"`
}

func (Content) TableName

func (Content) TableName() string

type ContentMapper

type ContentMapper struct {
	*db.BasicMapper[Content]
}

func NewContentMapper

func NewContentMapper(ds *db.DatabaseSource) (*ContentMapper, error)

type ContentState

type ContentState int
const (
	ContentStateInited ContentState = iota
	ContentStateDownloading
	ContentStateDownloaded
)

type Subscription

type Subscription struct {
	ID            uint      `gorm:"id;primaryKey;autoIncrement"`
	UserCredit    string    `gorm:"user_credit"`
	ChannelCredit string    `gorm:"channel_credit"`
	CreateAt      time.Time `gorm:"create_at"`
	UpdateAt      time.Time `gorm:"update_at"`
}

func (Subscription) TableName

func (Subscription) TableName() string

type SubscriptionMapper

type SubscriptionMapper struct {
	*db.BasicMapper[Subscription]
}

func NewSubscriptionMapper

func NewSubscriptionMapper(ds *db.DatabaseSource) (*SubscriptionMapper, error)

type UnionMapper

type UnionMapper struct {
	ChannelMapper      *ChannelMapper
	SubscriptionMapper *SubscriptionMapper
	ContentMapper      *ContentMapper
	UserMapper         *UserMapper
}

func NewUnionMapper

func NewUnionMapper(ds *db.DatabaseSource) (*UnionMapper, error)

type User

type User struct {
	ID       uint      `gorm:"id;primaryKey;autoIncrement"`
	Credit   string    `gorm:"credit"`
	Name     string    `gorm:"name"`
	CreateAt time.Time `gorm:"create_at"`
	UpdateAt time.Time `gorm:"update_at"`
}

func (User) TableName

func (User) TableName() string

type UserMapper

type UserMapper struct {
	*db.BasicMapper[User]
}

func NewUserMapper

func NewUserMapper(ds *db.DatabaseSource) (*UserMapper, error)

Jump to

Keyboard shortcuts

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