package models

import (
   // "gorm.io/gorm"

	"go-admin/common/models"
	"time"
)

type OrgAd struct {
    models.Model
    
    UserId string `json:"userId" gorm:"type:bigint(20);comment:sys_user表id"` 
    AdName string `json:"adName" gorm:"type:varchar(255);comment:广告名称"` 
    AdType string `json:"adType" gorm:"type:varchar(255);comment:类型"` 
    AdImg string `json:"adImg" gorm:"type:varchar(255);comment:广告图"` 
    AdUrl string `json:"adUrl" gorm:"type:varchar(255);comment:链接地址"` 
    Status string `json:"status" gorm:"type:bigint(20);comment:广告状态 1 开启 0关闭"` 
    StartTime time.Time `json:"startTime" gorm:"type:datetime;comment:广告有效期 开始时间"` 
    EndTime time.Time `json:"endTime" gorm:"type:datetime;comment:广告有效期 结束时间"` 
    models.ModelTime
    models.ControlBy
}

func (OrgAd) TableName() string {
    return "org_ad"
}

func (e *OrgAd) Generate() models.ActiveRecord {
	o := *e
	return &o
}

func (e *OrgAd) GetId() interface{} {
	return e.Id
}