创建时间仅在创建时填写

This commit is contained in:
2025-06-05 15:42:41 +08:00
parent 377913b5d4
commit dabc0f860c
10 changed files with 20 additions and 20 deletions

View File

@ -63,9 +63,9 @@ public class $!{tableInfo.name} extends Model<$!{tableInfo.name}> {
#if("createTime" == $!{column.name})
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
{% if cookiecutter.platform == "postgis" -%}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.OTHER)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.OTHER)
{% else %}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.DATETIMEOFFSET)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.DATETIMEOFFSET)
{% endif %}
#end
#if("updateTime" == $!{column.name})

View File

@ -92,9 +92,9 @@ public class Account extends Model<Account> {
@Schema(description = "创建时间")
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
{% if cookiecutter.platform == "postgis" -%}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.OTHER)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.OTHER)
{% else %}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.DATETIMEOFFSET)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.DATETIMEOFFSET)
{% endif %}
private OffsetDateTime createTime;

View File

@ -77,9 +77,9 @@ public class Authority extends Model<Authority> {
@Schema(description = "创建时间")
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
{% if cookiecutter.platform == "postgis" -%}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.OTHER)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.OTHER)
{% else %}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.DATETIMEOFFSET)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.DATETIMEOFFSET)
{% endif %}
private OffsetDateTime createTime;

View File

@ -62,9 +62,9 @@ public class Logger extends Model<Logger> {
@Schema(description = "创建时间")
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
{% if cookiecutter.platform == "postgis" -%}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.OTHER)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.OTHER)
{% else %}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.DATETIMEOFFSET)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.DATETIMEOFFSET)
{% endif %}
private OffsetDateTime createTime;

View File

@ -67,9 +67,9 @@ public class Message extends Model<Message> {
@Schema(description = "创建时间")
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
{% if cookiecutter.platform == "postgis" -%}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.OTHER)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.OTHER)
{% else %}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.DATETIMEOFFSET)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.DATETIMEOFFSET)
{% endif %}
private OffsetDateTime createTime;

View File

@ -60,9 +60,9 @@ public class Page extends Model<Page> {
@Schema(description = "创建时间")
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
{% if cookiecutter.platform == "postgis" -%}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.OTHER)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.OTHER)
{% else %}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.DATETIMEOFFSET)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.DATETIMEOFFSET)
{% endif %}
private OffsetDateTime createTime;

View File

@ -65,9 +65,9 @@ public class PageData extends Model<PageData> {
@Schema(description = "创建时间")
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
{% if cookiecutter.platform == "postgis" -%}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.OTHER)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.OTHER)
{% else %}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.DATETIMEOFFSET)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.DATETIMEOFFSET)
{% endif %}
private OffsetDateTime createTime;

View File

@ -60,9 +60,9 @@ public class Role extends Model<Role> {
@Schema(description = "创建时间")
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
{% if cookiecutter.platform == "postgis" -%}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.OTHER)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.OTHER)
{% else %}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.DATETIMEOFFSET)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.DATETIMEOFFSET)
{% endif %}
private OffsetDateTime createTime;

View File

@ -52,9 +52,9 @@ public class RoleAuthority extends Model<RoleAuthority> {
@Schema(description = "创建时间")
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
{% if cookiecutter.platform == "postgis" -%}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.OTHER)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.OTHER)
{% else %}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.DATETIMEOFFSET)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.DATETIMEOFFSET)
{% endif %}
private OffsetDateTime createTime;

View File

@ -64,9 +64,9 @@ public class Tenant extends Model<Tenant> {
@Schema(description = "创建时间")
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
{% if cookiecutter.platform == "postgis" -%}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.OTHER)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.OTHER)
{% else %}
@TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.DATETIMEOFFSET)
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.DATETIMEOFFSET)
{% endif %}
private OffsetDateTime createTime;