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

5 years ago
5 years ago
5 years ago
4 years ago
5 years ago
5 years ago
5 years ago
  1. package models
  2. import (
  3. "time"
  4. "github.com/ouxuanserver/osmanthuswine/src/core"
  5. )
  6. const ArchTableName = TableNamePrefix + "arch"
  7. type Arch struct {
  8. Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
  9. CustomerId int `json:"customer_id"`
  10. ActivityId int `json:"activity_id"`
  11. Date string `json:"date"`
  12. Name string `json:"name"`
  13. IsDelete int `json:"is_delete"`
  14. CreatedAt time.Time `json:"created_at"`
  15. UpdatedAt time.Time `json:"updated_at"`
  16. }
  17. func (t *Arch) TableName() string {
  18. return ArchTableName
  19. }
  20. func (t *Arch) Count(activityId interface{}) (int64, error) {
  21. return core.GetXormAuto().Where("is_delete=0 and activity_id=?", activityId).Count(t)
  22. }