blog_category.go 862 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package fetdata
  2. import (
  3. "golang-fave/utils"
  4. )
  5. type BlogCategory struct {
  6. object *utils.MySql_blog_category
  7. }
  8. func (this *BlogCategory) Id() int {
  9. if this == nil {
  10. return 0
  11. }
  12. return this.object.A_id
  13. }
  14. func (this *BlogCategory) User() int {
  15. if this == nil {
  16. return 0
  17. }
  18. return this.object.A_user
  19. }
  20. func (this *BlogCategory) Name() string {
  21. if this == nil {
  22. return ""
  23. }
  24. return this.object.A_name
  25. }
  26. func (this *BlogCategory) Alias() string {
  27. if this == nil {
  28. return ""
  29. }
  30. return this.object.A_alias
  31. }
  32. func (this *BlogCategory) Left() int {
  33. if this == nil {
  34. return 0
  35. }
  36. return this.object.A_lft
  37. }
  38. func (this *BlogCategory) Right() int {
  39. if this == nil {
  40. return 0
  41. }
  42. return this.object.A_rgt
  43. }
  44. func (this *BlogCategory) Permalink() string {
  45. if this == nil {
  46. return ""
  47. }
  48. return "/blog/category/" + this.object.A_alias + "/"
  49. }