// Copyright 2023 Anlity <leo@leocode.net>. All rights reserved.
// Use of this source code is governed by a AGPL v3.0 style
// license that can be found in the LICENSE file.

// ==========================================================================
// This is auto-generated by gf cli tool. DO NOT EDIT THIS FILE MANUALLY.
// ==========================================================================

package internal

import (
	"github.com/gogf/gf/database/gdb"
	"github.com/gogf/gf/frame/g"
	"github.com/gogf/gf/frame/gmvc"
)

// DomainCertDao is the manager for logic model data accessing
// and custom defined data operations functions management.
type DomainCertDao struct {
	gmvc.M                    // M is the core and embedded struct that inherits all chaining operations from gdb.Model.
	DB      gdb.DB            // DB is the raw underlying database management object.
	Table   string            // Table is the table name of the DAO.
	Columns domainCertColumns // Columns contains all the columns of Table that for convenient usage.
}

// DomainCertColumns defines and stores column names for table c_domain_cert.
type domainCertColumns struct {
	CertKey     string // cert_key
	Domains     string // 域名逗号分隔
	ExpireDate  string // 有效日期
	CertContent string // 证书内容
	IsBan       string // 是否被禁用
	BanReason   string // 禁用原因
	CallNum     string // 接口被请求次数
	CreatedAt   string // 创建时间
	UpdatedAt   string // 更新时间
}

func NewDomainCertDao() *DomainCertDao {
	return &DomainCertDao{
		M:     g.DB("default").Model("c_domain_cert").Safe(),
		DB:    g.DB("default"),
		Table: "c_domain_cert",
		Columns: domainCertColumns{
			CertKey:     "cert_key",
			Domains:     "domains",
			ExpireDate:  "expire_date",
			CertContent: "cert_content",
			IsBan:       "is_ban",
			BanReason:   "ban_reason",
			CallNum:     "call_num",
			CreatedAt:   "created_at",
			UpdatedAt:   "updated_at",
		},
	}
}
