github.com/sharovik/devbot@v1.0.1-0.20240308094637-4a0387c40516/internal/dto/databasedto/MigrationModel.go (about)

     1  package databasedto
     2  
     3  import "github.com/sharovik/orm/dto"
     4  
     5  // MigrationStruct struct for MigrationModel object
     6  type MigrationStruct struct {
     7  	dto.BaseModel
     8  }
     9  
    10  // MigrationModel model for migrations table
    11  var MigrationModel = New(
    12  	"migration",
    13  	[]interface{}{
    14  		dto.ModelField{
    15  			Name:   "version",
    16  			Type:   dto.VarcharColumnType,
    17  			Length: 255,
    18  		},
    19  	},
    20  	dto.ModelField{
    21  		Name:          "id",
    22  		Type:          dto.IntegerColumnType,
    23  		AutoIncrement: true,
    24  		IsPrimaryKey:  true,
    25  	},
    26  	&MigrationStruct{},
    27  )