Documentation ¶
Overview ¶
Package ntime ******************************************************************************
- @DESC 为Beego的ORM,数据库字段中无法返回时间戳,定义的时间类型,用于API中时间为时间戳
- @AUTH Neo
- @DATE 2022-03-14
- @CHANGE LOGS
- DATE CHANGER DETAIL *****************************************************************************
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NTime ¶
NTime ******************************************************************************
- @DESC 扩展Time类型的处理方法 *****************************************************************************
func (*NTime) FieldType ¶
FieldType ******************************************************************************
- @DESC 数据类型
- @PARAMS
- @RETURN int Beego的ORM中定义的时间类型TypeDateTimeField
- @AUTH Neo
- @DATE 2022-03-14
- @CHANGE LOGS
- DATE CHANGER DETAIL *****************************************************************************
func (NTime) MarshalJSON ¶
MarshalJSON ******************************************************************************
- @DESC 序列化为JSON
- @PARAMS
- @RETURN []byte 序列化后的JSON字节
- @AUTH Neo
- @DATE 2022-03-14
- @CHANGE LOGS
- DATE CHANGER DETAIL *****************************************************************************
func (*NTime) RawValue ¶
func (t *NTime) RawValue() interface{}
RawValue ******************************************************************************
- @DESC 写入数据库,写入数据库中,因此为Raw
- @PARAMS
- @RETURN interface{} 写入数据库中的值
- @AUTH Neo
- @DATE 2022-03-14
- @CHANGE LOGS
- DATE CHANGER DETAIL *****************************************************************************
func (*NTime) SetRaw ¶
SetRaw ******************************************************************************
- @DESC 读取数据库值,由数据库中读出设置到自身中,因此为Set
- @PARAMS value interface{} 数据库中的值
- @RETURN
- @AUTH Neo
- @DATE 2022-03-14
- @CHANGE LOGS
- DATE CHANGER DETAIL *****************************************************************************
func (*NTime) String ¶
String ******************************************************************************
- @DESC 相当于重写Time类型String方法
- @PARAMS
- @RETURN string 字符串化
- @AUTH Neo
- @DATE 2022-03-14
- @CHANGE LOGS
- DATE CHANGER DETAIL *****************************************************************************
func (*NTime) UnmarshalJSON ¶
UnmarshalJSON ******************************************************************************
- @DESC 反序列化为JSON
- @PARAMS data []byte 需要反序列化的JSON字节
- @RETURN
- @AUTH Neo
- @DATE 2022-03-14
- @CHANGE LOGS
- DATE CHANGER DETAIL *****************************************************************************