package dao

import (
	"gitdxz.51daxuetong.cn/go_dev/bids_rpcx/lib"
	"time"
)

type SemChannel struct {
	CreatedAt   time.Time `gorm:"column:created_at" json:"created_at" db:"created_at"`
	UpdatedAt   time.Time `gorm:"column:updated_at" json:"updated_at" db:"updated_at"`
	DeletedAt   time.Time `gorm:"column:deleted_at" json:"deleted_at" db:"deleted_at"`
	ID          int       `gorm:"column:id;primary_key" json:"id" db:"id"`
	ChannelName string    `gorm:"column:channel_name" json:"channel_name" db:"channel_name"`
	Status      int       `gorm:"column:status" json:"status" db:"status"`
}

// TableName sets the insert table name for this struct type
func (s *SemChannel) TableName() string {
	return "sem_channel"
}

func GetAllSemChan() (data []SemChannel, err error) {
	err = lib.GetDb().Find(&data).Error
	return
}