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.
27 lines
683 B
27 lines
683 B
package models
|
|
|
|
import (
|
|
"github.com/ouxuanserver/osmanthuswine/src/core"
|
|
"time"
|
|
)
|
|
|
|
const ArchTableName = TableNamePrefix + "arch"
|
|
|
|
type Arch struct {
|
|
Id int `json:"id"`
|
|
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).Get(t)
|
|
}
|