互动
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

5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
5 years ago
5 years ago
  1. package models
  2. import (
  3. "git.ouxuan.net/tommy/osmanthuswine/src/core"
  4. )
  5. const ArchTableName = TableNamePrefix + "arch"
  6. type Arch struct {
  7. Model `xorm:"extends"`
  8. CustomerId int `json:"customer_id"`
  9. ActivityId int `json:"activity_id"`
  10. Date string `json:"date"`
  11. Name string `json:"name"`
  12. }
  13. func (t *Arch) TableName() string {
  14. return ArchTableName
  15. }
  16. func (t *Arch) Count(activityId interface{}) (int64, error) {
  17. return core.GetXormAuto().Where("is_delete=0 and activity_id=?", activityId).Count(t)
  18. }