package models

import "time"

type MasterDocumentType struct {
	ID         uint       `gorm:"primaryKey;column:id" json:"id"`
	Type       string     `gorm:"column:type;type:varchar(100);not null" json:"type"`
	Name       string     `gorm:"column:name;type:varchar(150);not null" json:"name"`
	Code       string     `gorm:"column:code;type:varchar(100);not null;unique" json:"code"`
	IsRequired bool       `gorm:"column:is_required;default:false" json:"is_required"`
	IsActive   bool       `gorm:"column:is_active;default:true" json:"is_active"`
	CreatedAt  *time.Time `gorm:"column:created_at;autoCreateTime" json:"created_at"`
	UpdatedAt  *time.Time `gorm:"column:updated_at;autoUpdateTime" json:"updated_at"`
}

func (MasterDocumentType) TableName() string {
	return "master_document_types"
}
