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.
24 lines
528 B
24 lines
528 B
package models
|
|
|
|
import (
|
|
"git.ouxuan.net/tommy/osmanthuswine/src/core"
|
|
)
|
|
|
|
const ArchTableName = TableNamePrefix + "arch"
|
|
|
|
type Arch struct {
|
|
Model `xorm:"extends"`
|
|
|
|
CustomerId int `json:"customer_id"`
|
|
ActivityId int `json:"activity_id"`
|
|
Date string `json:"date"`
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
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)
|
|
}
|