// Code generated by entc, DO NOT EDIT. package article import ( "time" ) const ( // Label holds the string label denoting the article type in the database. Label = "article" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldTitle holds the string denoting the title field in the database. FieldTitle = "title" // FieldContent holds the string denoting the content field in the database. FieldContent = "content" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // EdgeComments holds the string denoting the comments edge name in mutations. EdgeComments = "comments" // EdgeTags holds the string denoting the tags edge name in mutations. EdgeTags = "tags" // Table holds the table name of the article in the database. Table = "articles" // CommentsTable is the table the holds the comments relation/edge. CommentsTable = "comments" // CommentsInverseTable is the table name for the Comment entity. // It exists in this package in order to avoid circular dependency with the "comment" package. CommentsInverseTable = "comments" // CommentsColumn is the table column denoting the comments relation/edge. CommentsColumn = "article_comments" // TagsTable is the table the holds the tags relation/edge. The primary key declared below. TagsTable = "tag_posts" // TagsInverseTable is the table name for the Tag entity. // It exists in this package in order to avoid circular dependency with the "tag" package. TagsInverseTable = "tags" ) // Columns holds all SQL columns for article fields. var Columns = []string{ FieldID, FieldTitle, FieldContent, FieldCreatedAt, FieldUpdatedAt, } var ( // TagsPrimaryKey and TagsColumn2 are the table columns denoting the // primary key for the tags relation (M2M). TagsPrimaryKey = []string{"tag_id", "article_id"} ) // ValidColumn reports if the column name is valid (part of the table columns). func ValidColumn(column string) bool { for i := range Columns { if column == Columns[i] { return true } } return false } var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. DefaultUpdatedAt func() time.Time )