当前位置:网站首页>Serialize common default values and column parameters
Serialize common default values and column parameters
2022-07-25 23:17:00 【Intern Sen】
1 defaultValue The default value is
Set character defaults .
name: {
type: DataTypes.STRING, defaultValue: 'zhangsan' },
status: {
type: DataTypes.INTEGER, defaultValue: 1 },
flag: {
type: DataTypes.BOOLEAN, allowNull: false, defaultValue: true },
Default value of date => current time
createdTime: {
type: DataTypes.DATE, defaultValue: DataTypes.NOW },
2 allowNull Allow null
allowNull Allow null , The default is true.
If the allowNull Set to false The column will be added not null, This means that the column cannot be empty .
title: {
type: DataTypes.STRING, allowNull: false },
3 unique Unique constraint
unique Short for creating unique constraints .
someUnique: {
type: DataTypes.STRING, unique: true },
4 primaryKey Primary key
someUnique: {
type: DataTypes.STRING, primaryKey: true },
5 field
Can pass field Property specifies the custom column name :
name: {
type: DataTypes.STRING, field: 'username' },
边栏推荐
- Learning notes of technical art hundred people plan (1) -- basic rendering pipeline
- Notification设置的小图标显示的是小方块
- 动态内存管理
- Take away applet with main version of traffic / repair to add main access function of traffic
- ASP date function (what if the disk function is incorrect)
- Kotlin 常用知识点汇总
- 赋能合作伙伴,亚马逊云科技如何落地“扶上马,送一程”?
- 【接口性能优化】索引失效的原因以及如何进行SQL优化
- serialization and deserialization
- Wechat official account, wechat payment development
猜你喜欢

The fifth article in the series of radar Fundamentals: the function of radar modulation style

The new UI people help task help PHP source code with a value of 1500 / reward task Tiktok Kwai headline like source code / with three-level distribution can be packaged applet

Unity 使用宏

General paging function

Discuz atmosphere game style template / imitation lol hero League game DZ game template GBK

Secure code warrior learning record (IV)

连续三年成为云AI服务领导者,亚马逊云科技做对了什么?

第二周学习:卷积神经网络

赋能合作伙伴,亚马逊云科技如何落地“扶上马,送一程”?

Enterprise level inventory management system of code audit
随机推荐
Basic knowledge of radar
Secure code warrior learning record (III)
Learning notes of technical art hundred people plan (1) -- basic rendering pipeline
驱动板网线直连电脑共享网络配置
ASP date function (what if the disk function is incorrect)
Kotlin 常用知识点汇总
推荐系统——An Embedding Learning Framework for Numerical Features in CTR Prediction
AI chief architect 12 AICA industrial landing analysis under the industrial production process optimization scenario
Week 2: convolutional neural network
Call Gaode map -- address is converted into longitude and latitude
Simulink learning notes (III) - Simulink automatic code generation (II) "suggestions collection"
通用分页功能
@Autowired annotation required attribute
Take away applet with main version of traffic / repair to add main access function of traffic
QT operation to solve large amount of duplicate data
Flight control implementation of four rotor aircraft "suggestions collection"
Very simple vsplayaudio online music player plug-in
QT add mouse event to control
Circle detection and line detection of PCL
5 ROS simulation modeling (3-rviz+gazebo+ control simulation robot)