互动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
722 B

package models
import (
"time"
"github.com/ouxuanserver/osmanthuswine/src/core"
)
const ArchTableName = TableNamePrefix + "arch"
type Arch struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
CustomerId int `json:"customer_id"`
ActivityId int `json:"activity_id"`
Date string `json:"date"`
Name string `json:"name"`
IsDelete int `json:"is_delete"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (t *Arch) TableName() string {
return ArchTableName
}
func (t *Arch) Count(activityId interface{}) (int64, error) {
return core.GetXormAuto().Where("is_delete=0 and activity_id=?", activityId).Count(t)
}